From 66a1fa0289fe467df42d610a2bf63e4ace07307b Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Wed, 25 Dec 2024 23:41:45 -0600 Subject: [PATCH] r2 --> daily, minio back and hourly --- .../templates/volsync/kustomization.yaml | 1 + kubernetes/templates/volsync/nfs.yaml | 73 ------------------- kubernetes/templates/volsync/r2.yaml | 2 +- 3 files changed, 2 insertions(+), 74 deletions(-) delete mode 100644 kubernetes/templates/volsync/nfs.yaml diff --git a/kubernetes/templates/volsync/kustomization.yaml b/kubernetes/templates/volsync/kustomization.yaml index abd5da86..12ef510f 100644 --- a/kubernetes/templates/volsync/kustomization.yaml +++ b/kubernetes/templates/volsync/kustomization.yaml @@ -4,4 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ./claim.yaml + - ./minio.yaml - ./r2.yaml diff --git a/kubernetes/templates/volsync/nfs.yaml b/kubernetes/templates/volsync/nfs.yaml deleted file mode 100644 index 3e7a7817..00000000 --- a/kubernetes/templates/volsync/nfs.yaml +++ /dev/null @@ -1,73 +0,0 @@ ---- -# yaml-language-server: $schema=https://ks.hsn.dev/external-secrets.io/externalsecret_v1beta1.json -apiVersion: external-secrets.io/v1beta1 -kind: ExternalSecret -metadata: - name: "${APP}-volsync" -spec: - secretStoreRef: - kind: ClusterSecretStore - name: onepassword-connect - target: - name: "${APP}-volsync-secret" - template: - engineVersion: v2 - data: - RESTIC_REPOSITORY: "/repository/${APP}" - RESTIC_PASSWORD: "{{ .RESTIC_PASSWORD }}" - dataFrom: - - extract: - key: volsync-template ---- -# yaml-language-server: $schema=https://ks.hsn.dev/volsync.backube/replicationsource_v1alpha1.json -apiVersion: volsync.backube/v1alpha1 -kind: ReplicationSource -metadata: - name: "${APP}" -spec: - sourcePVC: "${APP}" - trigger: - schedule: "0 * * * *" - restic: - copyMethod: "${VOLSYNC_COPYMETHOD:-Snapshot}" - pruneIntervalDays: 7 - repository: "${APP}-volsync-secret" - volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-csi-ceph-blockpool}" - cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-4Gi}" - cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-openebs-hostpath}" - cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"] - storageClassName: "${VOLSYNC_STORAGECLASS:-ceph-block}" - accessModes: ["${VOLSYNC_ACCESSMODES:-ReadWriteOnce}"] - moverSecurityContext: - runAsUser: ${VOLSYNC_PUID:-568} - runAsGroup: ${VOLSYNC_PGID:-568} - fsGroup: ${VOLSYNC_PGID:-568} - retain: - hourly: 24 - daily: 14 ---- -# yaml-language-server: $schema=https://ks.hsn.dev/volsync.backube/replicationdestination_v1alpha1.json -apiVersion: volsync.backube/v1alpha1 -kind: ReplicationDestination -metadata: - name: "${APP}-dst" -spec: - trigger: - manual: restore-once - restic: - repository: "${APP}-volsync-secret" - copyMethod: Snapshot - volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-csi-ceph-blockpool}" - cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-openebs-hostpath}" - cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"] - cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-8Gi}" - storageClassName: "${VOLSYNC_STORAGECLASS:-ceph-block}" - accessModes: ["${VOLSYNC_ACCESSMODES:-ReadWriteOnce}"] - capacity: "${VOLSYNC_CAPACITY}" - moverSecurityContext: - runAsUser: ${VOLSYNC_PUID:-568} - runAsGroup: ${VOLSYNC_PGID:-568} - fsGroup: ${VOLSYNC_PGID:-568} - enableFileDeletion: true - cleanupCachePVC: true - cleanupTempPVC: true diff --git a/kubernetes/templates/volsync/r2.yaml b/kubernetes/templates/volsync/r2.yaml index 0e4de832..f4ac239a 100644 --- a/kubernetes/templates/volsync/r2.yaml +++ b/kubernetes/templates/volsync/r2.yaml @@ -31,7 +31,7 @@ metadata: spec: sourcePVC: "${APP}" trigger: - schedule: "0 * * * *" + schedule: "0 0 * * *" restic: copyMethod: "${VOLSYNC_COPYMETHOD:-Snapshot}" pruneIntervalDays: 7