From 78a51e40105fb77fbe69f0cbb1f5c8e89e612054 Mon Sep 17 00:00:00 2001 From: Fabio Date: Tue, 17 Oct 2023 15:30:48 -0300 Subject: [PATCH] Implemented CSI Snapshot backup with Data Movement --- .../v0.5.0/templates/velero-schedule-monthly.yaml | 8 +++++++- .../v0.5.0/templates/velero-schedule-weekdays.yaml | 8 +++++++- .../v0.5.0/templates/velero-schedule-weekly.yaml | 8 +++++++- charts/portalmodelo/v0.5.0/values.yaml | 2 ++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/charts/portalmodelo/v0.5.0/templates/velero-schedule-monthly.yaml b/charts/portalmodelo/v0.5.0/templates/velero-schedule-monthly.yaml index cd33056..54a7130 100644 --- a/charts/portalmodelo/v0.5.0/templates/velero-schedule-monthly.yaml +++ b/charts/portalmodelo/v0.5.0/templates/velero-schedule-monthly.yaml @@ -14,10 +14,16 @@ spec: excludedResources: {{- toYaml . | nindent 8 }} {{- end }} - snapshotVolumes: false # every monthly backup is good for the next 3 months (~90 days) ttl: 2190h0m0s + {{- if .Values.velero.backup.useSnapshotBackup }} + defaultVolumesToFsBackup: false + snapshotVolumes: true + snapshotMoveData: {{ .Values.velero.backup.snapshotMoveData }} + {{- else }} defaultVolumesToFsBackup: true + snapshotVolumes: false + {{- end }} hooks: resources: - name: repozo diff --git a/charts/portalmodelo/v0.5.0/templates/velero-schedule-weekdays.yaml b/charts/portalmodelo/v0.5.0/templates/velero-schedule-weekdays.yaml index 92bc537..c1b8a95 100644 --- a/charts/portalmodelo/v0.5.0/templates/velero-schedule-weekdays.yaml +++ b/charts/portalmodelo/v0.5.0/templates/velero-schedule-weekdays.yaml @@ -14,10 +14,16 @@ spec: excludedResources: {{- toYaml . | nindent 8 }} {{- end }} - snapshotVolumes: false # every weekday backup is good for the next week (7 days) ttl: 168h0m0s + {{- if .Values.velero.backup.useSnapshotBackup }} + defaultVolumesToFsBackup: false + snapshotVolumes: true + snapshotMoveData: {{ .Values.velero.backup.snapshotMoveData }} + {{- else }} defaultVolumesToFsBackup: true + snapshotVolumes: false + {{- end }} hooks: resources: - name: repozo diff --git a/charts/portalmodelo/v0.5.0/templates/velero-schedule-weekly.yaml b/charts/portalmodelo/v0.5.0/templates/velero-schedule-weekly.yaml index ae99783..791d291 100644 --- a/charts/portalmodelo/v0.5.0/templates/velero-schedule-weekly.yaml +++ b/charts/portalmodelo/v0.5.0/templates/velero-schedule-weekly.yaml @@ -14,10 +14,16 @@ spec: excludedResources: {{- toYaml . | nindent 8 }} {{- end }} - snapshotVolumes: false # every sunday backup is good for 30 days (aprox. 1 month) ttl: 744h0m0s + {{- if .Values.velero.backup.useSnapshotBackup }} + defaultVolumesToFsBackup: false + snapshotVolumes: true + snapshotMoveData: {{ .Values.velero.backup.snapshotMoveData }} + {{- else }} defaultVolumesToFsBackup: true + snapshotVolumes: false + {{- end }} hooks: resources: - name: repozo diff --git a/charts/portalmodelo/v0.5.0/values.yaml b/charts/portalmodelo/v0.5.0/values.yaml index 6917d33..c4a9600 100644 --- a/charts/portalmodelo/v0.5.0/values.yaml +++ b/charts/portalmodelo/v0.5.0/values.yaml @@ -25,6 +25,8 @@ velero: backup: enabled: false # cert-manager objects are usually blocked during backup + useSnapshotBackup: false + snapshotMoveData: false excludedResources: - certificates.cert-manager.io - orders.acme.cert-manager.io