diff --git a/charts/velero/Chart.yaml b/charts/velero/Chart.yaml index 7d721320..93b8d3ac 100644 --- a/charts/velero/Chart.yaml +++ b/charts/velero/Chart.yaml @@ -3,7 +3,7 @@ appVersion: 1.11.1 kubeVersion: ">=1.16.0-0" description: A Helm chart for velero name: velero -version: 4.2.0 +version: 4.3.0 home: https://github.com/vmware-tanzu/velero icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png sources: diff --git a/charts/velero/templates/backupstoragelocation.yaml b/charts/velero/templates/backupstoragelocation.yaml index b47a41ad..0e027796 100644 --- a/charts/velero/templates/backupstoragelocation.yaml +++ b/charts/velero/templates/backupstoragelocation.yaml @@ -9,8 +9,10 @@ metadata: name: {{ .name | default "default" }} namespace: {{ $.Release.Namespace }} annotations: + {{- if $.Values.helmHookAnnotations }} "helm.sh/hook": post-install,post-upgrade,post-rollback "helm.sh/hook-delete-policy": before-hook-creation + {{- end }} labels: app.kubernetes.io/name: {{ include "velero.name" $ }} app.kubernetes.io/instance: {{ $.Release.Name }} diff --git a/charts/velero/templates/schedule.yaml b/charts/velero/templates/schedule.yaml index fa3786f4..f7e924a2 100644 --- a/charts/velero/templates/schedule.yaml +++ b/charts/velero/templates/schedule.yaml @@ -9,8 +9,10 @@ metadata: {{- if $schedule.annotations }} {{- toYaml $schedule.annotations | nindent 4 }} {{- end }} + {{- if $.Values.helmHookAnnotations }} "helm.sh/hook": post-install,post-upgrade,post-rollback "helm.sh/hook-delete-policy": before-hook-creation + {{- end }} labels: app.kubernetes.io/name: {{ include "velero.name" $ }} app.kubernetes.io/instance: {{ $.Release.Name }} diff --git a/charts/velero/templates/volumesnapshotlocation.yaml b/charts/velero/templates/volumesnapshotlocation.yaml index 4cd3f3cf..05018f33 100644 --- a/charts/velero/templates/volumesnapshotlocation.yaml +++ b/charts/velero/templates/volumesnapshotlocation.yaml @@ -9,8 +9,10 @@ metadata: name: {{ .name | default "default" }} namespace: {{ $.Release.Namespace }} annotations: + {{- if $.Values.helmHookAnnotations }} "helm.sh/hook": post-install,post-upgrade,post-rollback "helm.sh/hook-delete-policy": before-hook-creation + {{- end }} labels: app.kubernetes.io/name: {{ include "velero.name" $ }} app.kubernetes.io/instance: {{ $.Release.Name }} diff --git a/charts/velero/values.yaml b/charts/velero/values.yaml index 604ae4cf..4e08c915 100644 --- a/charts/velero/values.yaml +++ b/charts/velero/values.yaml @@ -24,6 +24,10 @@ annotations: {} # Labels to add to the Velero deployment's. Optional. labels: {} +# helmHookAnnotations is required to deploy CustomResources after deploying CRDs. If you manage your CRDs outside of this helm chart +# or using ArgoCD, you are able to disable the helm hooks annotations. +helmHookAnnotations: true + # Annotations to add to the Velero deployment's pod template. Optional. # # If using kube2iam or kiam, use the following annotation with your AWS_ACCOUNT_ID