diff --git a/kubernetes/kube-nas/apps/openebs-system/openebs/flux-sync.yaml b/kubernetes/kube-nas/apps/openebs-system/openebs/flux-sync.yaml index ccabe94aa..dd2f49333 100644 --- a/kubernetes/kube-nas/apps/openebs-system/openebs/flux-sync.yaml +++ b/kubernetes/kube-nas/apps/openebs-system/openebs/flux-sync.yaml @@ -19,3 +19,25 @@ spec: wait: true retryInterval: 1m timeout: 5m + +--- +# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &appname openebs-volume-snapshot-class + namespace: flux-system +spec: + targetNamespace: openebs-system + commonMetadata: + labels: + app.kubernetes.io/name: *appname + interval: 10m + path: ./kubernetes/kube-nas/apps/openebs-system/openebs/volume-snapshot-class + prune: false + sourceRef: + kind: GitRepository + name: home-ops + wait: true + retryInterval: 1m + timeout: 5m diff --git a/kubernetes/kube-nas/apps/openebs-system/openebs/volume-snapshot-class/helm-release.yaml b/kubernetes/kube-nas/apps/openebs-system/openebs/volume-snapshot-class/helm-release.yaml new file mode 100644 index 000000000..d837036a5 --- /dev/null +++ b/kubernetes/kube-nas/apps/openebs-system/openebs/volume-snapshot-class/helm-release.yaml @@ -0,0 +1,34 @@ +--- +# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: openebs-volume-snapshot-class +spec: + dependsOn: + - name: openebs + - name: snapshot-controller + namespace: kube-tools + interval: 15m + chart: + spec: + chart: k8s-resource + version: 0.2.0 + sourceRef: + kind: HelmRepository + name: mirceanton-charts + namespace: flux-system + maxHistory: 15 + install: + createNamespace: true + remediation: + retries: 3 + upgrade: + cleanupOnFail: true + remediation: + retries: 3 + uninstall: + keepHistory: false + valuesFrom: + - kind: ConfigMap + name: openebs-volume-snapshot-class diff --git a/kubernetes/kube-nas/apps/openebs-system/openebs/volume-snapshot-class/kustomization.yaml b/kubernetes/kube-nas/apps/openebs-system/openebs/volume-snapshot-class/kustomization.yaml new file mode 100644 index 000000000..c277bfbfd --- /dev/null +++ b/kubernetes/kube-nas/apps/openebs-system/openebs/volume-snapshot-class/kustomization.yaml @@ -0,0 +1,14 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - helm-release.yaml +configMapGenerator: + - name: openebs-volume-snapshot-class + files: + - values.yaml=./volume-snapshot-class.yaml +generatorOptions: + disableNameSuffixHash: true +configurations: + - kustomize-config.yaml diff --git a/kubernetes/kube-nas/apps/openebs-system/openebs/volume-snapshot-class/kustomize-config.yaml b/kubernetes/kube-nas/apps/openebs-system/openebs/volume-snapshot-class/kustomize-config.yaml new file mode 100644 index 000000000..58f92ba15 --- /dev/null +++ b/kubernetes/kube-nas/apps/openebs-system/openebs/volume-snapshot-class/kustomize-config.yaml @@ -0,0 +1,7 @@ +--- +nameReference: + - kind: ConfigMap + version: v1 + fieldSpecs: + - path: spec/valuesFrom/name + kind: HelmRelease diff --git a/kubernetes/kube-nas/apps/openebs-system/openebs/app/volume-snapshot-class.yaml b/kubernetes/kube-nas/apps/openebs-system/openebs/volume-snapshot-class/volume-snapshot-class.yaml similarity index 100% rename from kubernetes/kube-nas/apps/openebs-system/openebs/app/volume-snapshot-class.yaml rename to kubernetes/kube-nas/apps/openebs-system/openebs/volume-snapshot-class/volume-snapshot-class.yaml