From f2e9cede37d8e9531ceee5eff86b32990775d2eb Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Tue, 9 Dec 2025 02:42:38 +0100 Subject: [PATCH] feat: Added local-path-provisioner --- clusters/testing/kustomization.yaml | 1 + controllers/artifacts.yaml | 5 ++++ .../local-path-provisioner/kustomization.yaml | 28 +++++++++++++++++++ .../local-path-provisioner.yaml | 15 ++++++++++ 4 files changed, 49 insertions(+) create mode 100644 controllers/local-path-provisioner/kustomization.yaml create mode 100644 controllers/local-path-provisioner/local-path-provisioner.yaml diff --git a/clusters/testing/kustomization.yaml b/clusters/testing/kustomization.yaml index e19bcf0..f63b1b0 100644 --- a/clusters/testing/kustomization.yaml +++ b/clusters/testing/kustomization.yaml @@ -7,6 +7,7 @@ resources: - ../../controllers/cert-manager/cert-manager.yaml - ../../controllers/spegel/spegel.yaml - ../../controllers/longhorn/longhorn.yaml + - ../../controllers/local-path-provisioner/local-path-provisioner.yaml - ../../configs/artifacts.yaml - ../../configs/letsencrypt/letsencrypt.yaml - ../../configs/certificates/certificates.yaml diff --git a/controllers/artifacts.yaml b/controllers/artifacts.yaml index 0e2575e..97c751f 100644 --- a/controllers/artifacts.yaml +++ b/controllers/artifacts.yaml @@ -34,3 +34,8 @@ spec: copy: - from: "@foundation/controllers/longhorn/**" to: "@artifact/" + - name: local-path-provisioner + originRevision: "@foundation" + copy: + - from: "@foundation/controllers/local-path-provisioner/**" + to: "@artifact/" diff --git a/controllers/local-path-provisioner/kustomization.yaml b/controllers/local-path-provisioner/kustomization.yaml new file mode 100644 index 0000000..4809caa --- /dev/null +++ b/controllers/local-path-provisioner/kustomization.yaml @@ -0,0 +1,28 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - github.com/rancher/local-path-provisioner/deploy?ref=v0.0.32 +patches: + - patch: |- + kind: ConfigMap + apiVersion: v1 + metadata: + name: local-path-config + namespace: local-path-storage + data: + config.json: |- + { + "nodePathMap":[ + { + "node":"DEFAULT_PATH_FOR_NON_LISTED_NODES", + "paths":["/var/mnt/local-path-provisioner"] + } + ] + } + - patch: |- + apiVersion: v1 + kind: Namespace + metadata: + name: local-path-storage + labels: + pod-security.kubernetes.io/enforce: privileged diff --git a/controllers/local-path-provisioner/local-path-provisioner.yaml b/controllers/local-path-provisioner/local-path-provisioner.yaml new file mode 100644 index 0000000..fa4d07a --- /dev/null +++ b/controllers/local-path-provisioner/local-path-provisioner.yaml @@ -0,0 +1,15 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: local-path-provisioner + namespace: flux-system +spec: + interval: 1h + retryInterval: 2m + timeout: 5m + sourceRef: + kind: ExternalArtifact + name: local-path-provisioner + path: ./ + prune: true + wait: true