From e818b547d4881e0c93d5c31abad638dbfb9d7ac3 Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Thu, 1 Jul 2021 09:49:04 -0300 Subject: [PATCH] Do not snapshot volumes by default --- .../v0.5.0/templates/velero-schedule-monthly.yaml | 9 ++++----- .../v0.5.0/templates/velero-schedule-weekdays.yaml | 9 ++++----- .../v0.5.0/templates/velero-schedule-weekly.yaml | 9 ++++----- charts/portalmodelo/v0.5.0/values.yaml | 6 ++++++ 4 files changed, 18 insertions(+), 15 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 4a0a72c..e37a400 100644 --- a/charts/portalmodelo/v0.5.0/templates/velero-schedule-monthly.yaml +++ b/charts/portalmodelo/v0.5.0/templates/velero-schedule-monthly.yaml @@ -10,12 +10,11 @@ spec: template: includedNamespaces: - {{ .Release.Namespace }} - # cert-manager objects are usually blocked during backup + {{- with .Values.velero.backup.excludedResources }} excludedResources: - - certificates.cert-manager.io - - orders.acme.cert-manager.io - - certificaterequests.cert-manager.io - snapshotVolumes: true + {{- toYaml . | nindent 8 }} + {{- end }} + snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }} # every weekday backup is good for the next year (365 days) ttl: 8760h0m0s useOwnerReferencesInBackup: false 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 ea4693c..43171f4 100644 --- a/charts/portalmodelo/v0.5.0/templates/velero-schedule-weekdays.yaml +++ b/charts/portalmodelo/v0.5.0/templates/velero-schedule-weekdays.yaml @@ -10,12 +10,11 @@ spec: template: includedNamespaces: - {{ .Release.Namespace }} - # cert-manager objects are usually blocked during backup + {{- with .Values.velero.backup.excludedResources }} excludedResources: - - certificates.cert-manager.io - - orders.acme.cert-manager.io - - certificaterequests.cert-manager.io - snapshotVolumes: true + {{- toYaml . | nindent 8 }} + {{- end }} + snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }} # every weekday backup is good for the next week (7 days) ttl: 168h0m0s useOwnerReferencesInBackup: false 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 145f996..3c6bbe1 100644 --- a/charts/portalmodelo/v0.5.0/templates/velero-schedule-weekly.yaml +++ b/charts/portalmodelo/v0.5.0/templates/velero-schedule-weekly.yaml @@ -10,12 +10,11 @@ spec: template: includedNamespaces: - {{ .Release.Namespace }} - # cert-manager objects are usually blocked during backup + {{- with .Values.velero.backup.excludedResources }} excludedResources: - - certificates.cert-manager.io - - orders.acme.cert-manager.io - - certificaterequests.cert-manager.io - snapshotVolumes: true + {{- toYaml . | nindent 8 }} + {{- end }} + snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }} # every sunday backup is good for 30 days (aprox. 1 month) ttl: 744h0m0s useOwnerReferencesInBackup: false diff --git a/charts/portalmodelo/v0.5.0/values.yaml b/charts/portalmodelo/v0.5.0/values.yaml index dc6d778..710e6a1 100644 --- a/charts/portalmodelo/v0.5.0/values.yaml +++ b/charts/portalmodelo/v0.5.0/values.yaml @@ -24,6 +24,12 @@ velero: namespace: velero backup: enabled: false + snapshotVolumes: false + # cert-manager objects are usually blocked during backup + excludeResources: + - certificates.cert-manager.io + - orders.acme.cert-manager.io + - certificaterequests.cert-manager.io portal: adminPassword: altereme