diff --git a/charts/velero/templates/backupstoragelocation.yaml b/charts/velero/templates/backupstoragelocation.yaml index 0a6e0a4d..de99d36b 100644 --- a/charts/velero/templates/backupstoragelocation.yaml +++ b/charts/velero/templates/backupstoragelocation.yaml @@ -4,7 +4,7 @@ kind: BackupStorageLocation metadata: name: {{ include "velero.backupStorageLocation.name" . }} annotations: - {{- if .Values.enableHelmHooks.templates }} + {{- if .Values.enableHelmHooks }} "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-delete-policy": "before-hook-creation" {{- end }} diff --git a/charts/velero/templates/crds.yaml b/charts/velero/templates/crds.yaml index 2aa9052f..3cceae1d 100644 --- a/charts/velero/templates/crds.yaml +++ b/charts/velero/templates/crds.yaml @@ -1,6 +1,6 @@ {{- if and .Values.installCRDs (eq .Release.Service "Tiller") }} {{- range $path, $bytes := .Files.Glob "crds/*.yaml" }} -{{- if $.Values.enableHelmHooks.crds }} +{{- if $.Values.enableHelmHooks }} {{ $.Files.Get $path }} {{- else }} {{- range $.Files.Lines $path }} diff --git a/charts/velero/templates/schedule.yaml b/charts/velero/templates/schedule.yaml index a31c3785..22500b13 100644 --- a/charts/velero/templates/schedule.yaml +++ b/charts/velero/templates/schedule.yaml @@ -4,7 +4,7 @@ kind: Schedule metadata: name: {{ include "velero.fullname" $ }}-{{ $scheduleName }} annotations: - {{- if $.Values.enableHelmHooks.templates }} + {{- if $.Values.enableHelmHooks }} "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-delete-policy": "before-hook-creation" {{- end }} diff --git a/charts/velero/templates/volumesnapshotlocation.yaml b/charts/velero/templates/volumesnapshotlocation.yaml index 841f0d3d..39f61b25 100644 --- a/charts/velero/templates/volumesnapshotlocation.yaml +++ b/charts/velero/templates/volumesnapshotlocation.yaml @@ -4,7 +4,7 @@ kind: VolumeSnapshotLocation metadata: name: {{ include "velero.volumeSnapshotLocation.name" . }} annotations: - {{- if .Values.enableHelmHooks.templates }} + {{- if .Values.enableHelmHooks }} "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-delete-policy": "before-hook-creation" {{- end }} diff --git a/charts/velero/values.yaml b/charts/velero/values.yaml index 92322ba1..dad21b8d 100644 --- a/charts/velero/values.yaml +++ b/charts/velero/values.yaml @@ -72,11 +72,9 @@ metrics: # Install CRDs as a templates. Enabled by default. installCRDs: true -# Enable/disable helm hooks annotations for Helm v2 in CRDs and/or templates +# Enable/disable helm hooks annotations for CRDs (Helm v2) and templates # You should disable this if using a deploy tool that doesn't support helm hooks -enableHelmHooks: - crds: true - templates: true +enableHelmHooks: true ## ## End of deployment-related settings.