diff --git a/k8s/apps/backup/volsync/ks.yaml b/k8s/apps/backup/volsync/ks.yaml index 7d90feb7..eb3594f2 100644 --- a/k8s/apps/backup/volsync/ks.yaml +++ b/k8s/apps/backup/volsync/ks.yaml @@ -8,6 +8,8 @@ metadata: spec: targetNamespace: backup path: ./k8s/apps/backup/volsync/app + dependsOn: + - name: snapshot-controller prune: true sourceRef: kind: GitRepository diff --git a/k8s/apps/longhorn-system/longhorn/ks.yaml b/k8s/apps/longhorn-system/longhorn/ks.yaml index 556bf1c6..9c72d7ec 100644 --- a/k8s/apps/longhorn-system/longhorn/ks.yaml +++ b/k8s/apps/longhorn-system/longhorn/ks.yaml @@ -14,4 +14,21 @@ spec: wait: true interval: 30m retryInterval: 1m + timeout: 5m +--- +# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/kustomize.toolkit.fluxcd.io/kustomization_v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: longhorn-snapshot + namespace: flux-system +spec: + path: ./k8s/apps/longhorn-system/longhorn/snapshot + prune: true + sourceRef: + kind: GitRepository + name: home-cluster + wait: true + interval: 30m + retryInterval: 1m timeout: 5m \ No newline at end of file diff --git a/k8s/apps/longhorn-system/longhorn/snapshot/kustomization.yaml b/k8s/apps/longhorn-system/longhorn/snapshot/kustomization.yaml new file mode 100644 index 00000000..6cd66236 --- /dev/null +++ b/k8s/apps/longhorn-system/longhorn/snapshot/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - storageclass.yaml \ No newline at end of file diff --git a/k8s/apps/longhorn-system/longhorn/snapshot/storageclass.yaml b/k8s/apps/longhorn-system/longhorn/snapshot/storageclass.yaml new file mode 100644 index 00000000..5b28c16f --- /dev/null +++ b/k8s/apps/longhorn-system/longhorn/snapshot/storageclass.yaml @@ -0,0 +1,8 @@ +apiVersion: snapshot.storage.k8s.io/v1 +kind: VolumeSnapshotClass +metadata: + name: longhorn-snapshot +driver: driver.longhorn.io +deletionPolicy: Delete +parameters: + type: bak \ No newline at end of file diff --git a/k8s/apps/storage/snapshot-controller/app/helm-release.yaml b/k8s/apps/storage/snapshot-controller/app/helm-release.yaml index e42752c4..34a25d52 100644 --- a/k8s/apps/storage/snapshot-controller/app/helm-release.yaml +++ b/k8s/apps/storage/snapshot-controller/app/helm-release.yaml @@ -33,4 +33,4 @@ spec: driver: driver.longhorn.io deletionPolicy: Delete parameters: - type: snap \ No newline at end of file + type: bak \ No newline at end of file diff --git a/k8s/apps/storage/snapshot-controller/ks.yaml b/k8s/apps/storage/snapshot-controller/ks.yaml index 84f4405b..d0afcdae 100644 --- a/k8s/apps/storage/snapshot-controller/ks.yaml +++ b/k8s/apps/storage/snapshot-controller/ks.yaml @@ -8,6 +8,8 @@ metadata: spec: targetNamespace: storage path: ./k8s/apps/storage/snapshot-controller/app + dependsOn: + - name: longhorn prune: true sourceRef: kind: GitRepository