From 311863e0171945a3c5f4999c2f38f49f223c4127 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Thu, 7 Dec 2023 18:06:15 -0500 Subject: [PATCH] feat: allow overriding the default local-path-provisioner path for PVC data Signed-off-by: Devin Buhl --- .github/renovate.json5 | 10 ++++++++++ .../local-path-provisioner/app/helmrelease.yaml.j2 | 5 ++++- bootstrap/vars/config.sample.yaml | 5 +++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index a6946d5d..31cab5c1 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -68,6 +68,16 @@ }, "separateMinorPatch": true }, + { + "description": "Local Path Provisioner Group", + "groupName": "Local Path Provisioner", + "matchPackagePatterns": ["local-path-provisioner"], + "matchDatasources": ["docker", "github-tags"], + "group": { + "commitMessageTopic": "{{{groupName}}} group" + }, + "separateMinorPatch": true + }, { "description": "System Upgrade Controller Group", "groupName": "System Upgrade Controller", diff --git a/bootstrap/templates/kubernetes/apps/kube-system/local-path-provisioner/app/helmrelease.yaml.j2 b/bootstrap/templates/kubernetes/apps/kube-system/local-path-provisioner/app/helmrelease.yaml.j2 index a9205a15..727ab5c3 100644 --- a/bootstrap/templates/kubernetes/apps/kube-system/local-path-provisioner/app/helmrelease.yaml.j2 +++ b/bootstrap/templates/kubernetes/apps/kube-system/local-path-provisioner/app/helmrelease.yaml.j2 @@ -23,6 +23,9 @@ spec: uninstall: keepHistory: false values: + image: + repository: docker.io/rancher/local-path-provisioner + tag: v0.0.26 helperImage: repository: public.ecr.aws/docker/library/busybox tag: latest @@ -30,7 +33,7 @@ spec: defaultClass: false nodePathMap: - node: DEFAULT_PATH_FOR_NON_LISTED_NODES - paths: ["/var/lib/rancher/k3s/storage"] + paths: ["{{ bootstrap_local_path_provisioner_path | default('/var/lib/rancher/k3s/storage', true) }}"] # NOTE: Do not enable Flux variable substitution on this HelmRelease configmap: setup: |- diff --git a/bootstrap/vars/config.sample.yaml b/bootstrap/vars/config.sample.yaml index 7361a432..464efabe 100644 --- a/bootstrap/vars/config.sample.yaml +++ b/bootstrap/vars/config.sample.yaml @@ -56,6 +56,11 @@ bootstrap_cluster_cidr: 10.42.0.0/16 # (Advanced) For ipv6 use format 10.43.0.0/16,fd78:c889:47fb:e0::/112 bootstrap_service_cidr: 10.43.0.0/16 +# (Advanced) Path for local-path-provisioner to use for storage on ALL nodes +# If changing this value to anything other than the default +# make sure the path exists and is owned by root:root with 701 permissions +bootstrap_local_path_provisioner_path: /var/lib/rancher/k3s/storage + # Node information bootstrap_nodes: # Use only 1, 3 or more odd master nodes, recommended is 3