diff --git a/clusters/base/infra/storage-class-local-path-patch/kustomization.yaml b/clusters/base/infra/storage-class-local-path-patch/kustomization.yaml new file mode 100644 index 0000000..f6fcb35 --- /dev/null +++ b/clusters/base/infra/storage-class-local-path-patch/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: [] +patches: + - patch: | + apiVersion: storage.k8s.io/v1 + kind: StorageClass + metadata: + name: local-path + annotations: + storageclass.kubernetes.io/is-default-class: "false" + target: + kind: StorageClass + name: local-path \ No newline at end of file diff --git a/clusters/base/infra/storage-classes/kustomization.yaml b/clusters/base/infra/storage-class-longhorn-retain/kustomization.yaml similarity index 75% rename from clusters/base/infra/storage-classes/kustomization.yaml rename to clusters/base/infra/storage-class-longhorn-retain/kustomization.yaml index d8b04f1..23c2e0c 100644 --- a/clusters/base/infra/storage-classes/kustomization.yaml +++ b/clusters/base/infra/storage-class-longhorn-retain/kustomization.yaml @@ -1,4 +1,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - longhorn-retain.yaml + - storageclass.yaml diff --git a/clusters/base/infra/storage-classes/longhorn-retain.yaml b/clusters/base/infra/storage-class-longhorn-retain/storageclass.yaml similarity index 100% rename from clusters/base/infra/storage-classes/longhorn-retain.yaml rename to clusters/base/infra/storage-class-longhorn-retain/storageclass.yaml diff --git a/clusters/home/infra/kustomization.yaml b/clusters/home/infra/kustomization.yaml index 4bc2f29..3be039d 100644 --- a/clusters/home/infra/kustomization.yaml +++ b/clusters/home/infra/kustomization.yaml @@ -1,4 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - storage-classes.yaml + - storage-class-local-path-patch.yaml + - storage-class-longhorn-retain.yaml diff --git a/clusters/home/infra/storage-class-local-path-patch.yaml b/clusters/home/infra/storage-class-local-path-patch.yaml new file mode 100644 index 0000000..5be62df --- /dev/null +++ b/clusters/home/infra/storage-class-local-path-patch.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: local-path-defaultclass-patch + namespace: flux-system +spec: + interval: 10m + sourceRef: + kind: GitRepository + name: flux-system + path: ./clusters/base/infra/patches/storage-class-local-path-patch + prune: false # its a local-storage-provisioner object, dont let flux destroy it + wait: true \ No newline at end of file diff --git a/clusters/home/infra/storage-classes.yaml b/clusters/home/infra/storage-class-longhorn-retain.yaml similarity index 54% rename from clusters/home/infra/storage-classes.yaml rename to clusters/home/infra/storage-class-longhorn-retain.yaml index b884f71..f422449 100644 --- a/clusters/home/infra/storage-classes.yaml +++ b/clusters/home/infra/storage-class-longhorn-retain.yaml @@ -1,19 +1,13 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: - name: storage-classes + name: local-path namespace: flux-system spec: interval: 10m sourceRef: kind: GitRepository name: flux-system - path: ./clusters/base/infra/storage-classes + path: ./clusters/base/infra/storage-class-longhorn-retain prune: true wait: true - dependsOn: - - name: namespaces - decryption: - provider: sops - secretRef: - name: sops-age