From 824f2a640270b9752c2177cc05466f7f62d2d1f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Sun, 6 Aug 2023 16:34:14 +0200 Subject: [PATCH 1/2] Add toggle to disable annotations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Otto Kröpke --- charts/velero/Chart.yaml | 2 +- charts/velero/templates/backupstoragelocation.yaml | 2 ++ charts/velero/templates/schedule.yaml | 2 ++ charts/velero/templates/volumesnapshotlocation.yaml | 2 ++ charts/velero/values.yaml | 4 ++++ 5 files changed, 11 insertions(+), 1 deletion(-) 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 From 198b1281544c99cc64c0907bea28b42cdd67dba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Mon, 7 Aug 2023 08:37:56 +0200 Subject: [PATCH 2/2] bump version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Otto Kröpke --- charts/velero/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/velero/Chart.yaml b/charts/velero/Chart.yaml index 93b8d3ac..33c78f37 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.3.0 +version: 4.4.0 home: https://github.com/vmware-tanzu/velero icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png sources: