diff --git a/kubernetes/infrastructure/kube-system/misc/storage-class-local-mount-nfs.yaml b/kubernetes/infrastructure/kube-system/misc/storage-class-local-mount-nfs.yaml deleted file mode 100644 index 86056bb..0000000 --- a/kubernetes/infrastructure/kube-system/misc/storage-class-local-mount-nfs.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: local-mount-nfs -provisioner: rancher.io/local-path -reclaimPolicy: Retain -volumeBindingMode: WaitForFirstConsumer diff --git a/kubernetes/infrastructure/kustomization.yaml b/kubernetes/infrastructure/kustomization.yaml index 6d7183a..ba4f3c5 100644 --- a/kubernetes/infrastructure/kustomization.yaml +++ b/kubernetes/infrastructure/kustomization.yaml @@ -7,7 +7,7 @@ resources: - ./grafana-dashboards/grafana-dashboards.yaml - ./ingress-nginx/ingress-nginx.yaml - ./ingress-nginx/ingress-nginx-config.yaml - - ./kube-system/kube-system-misc.yaml + - ./local-path-provisioner/local-path-provisioner.yaml - ./minio/minio.yaml - ./namespaces/namespaces.yaml - ./postgresql/postgresql.yaml diff --git a/kubernetes/infrastructure/local-path-provisioner/app/release.yaml b/kubernetes/infrastructure/local-path-provisioner/app/release.yaml new file mode 100644 index 0000000..254171f --- /dev/null +++ b/kubernetes/infrastructure/local-path-provisioner/app/release.yaml @@ -0,0 +1,21 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: local-path-provisioner + namespace: local-path-storage +spec: + interval: 1h + driftDetection: + mode: enabled + chart: + spec: + chart: local-path-provisioner + version: master-head + sourceRef: + kind: GitRepository + namespace: flux-system + name: local-path-provisioner + interval: 1d + values: + storageClass: + reclaimPolicy: Retain diff --git a/kubernetes/infrastructure/kube-system/kube-system-misc.yaml b/kubernetes/infrastructure/local-path-provisioner/local-path-provisioner.yaml similarity index 64% rename from kubernetes/infrastructure/kube-system/kube-system-misc.yaml rename to kubernetes/infrastructure/local-path-provisioner/local-path-provisioner.yaml index bc79ad9..517c6f2 100644 --- a/kubernetes/infrastructure/kube-system/kube-system-misc.yaml +++ b/kubernetes/infrastructure/local-path-provisioner/local-path-provisioner.yaml @@ -2,15 +2,18 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: kube-system-misc - namespace: kube-system + name: local-path-provisioner + namespace: local-path-storage spec: interval: 10m timeout: 1m30s retryInterval: 30s - path: ./kubernetes/infrastructure/kube-system/misc + path: ./kubernetes/infrastructure/local-path-provisioner/app prune: true sourceRef: kind: GitRepository namespace: flux-system name: flux-system + dependsOn: + - name: namespaces + namespace: flux-system diff --git a/kubernetes/infrastructure/repositories/repos/local-path-provisioner.yaml b/kubernetes/infrastructure/repositories/repos/local-path-provisioner.yaml new file mode 100644 index 0000000..0d261f6 --- /dev/null +++ b/kubernetes/infrastructure/repositories/repos/local-path-provisioner.yaml @@ -0,0 +1,13 @@ +apiVersion: source.toolkit.fluxcd.io/v1 +kind: GitRepository +metadata: + name: local-path-provisioner + namespace: flux-system +spec: + interval: 5m + ref: + branch: main + secretRef: + name: flux-system + timeout: 60s + url: https://github.com/rancher/local-path-provisioner.git \ No newline at end of file