diff --git a/charts/velero/Chart.yaml b/charts/velero/Chart.yaml index 7c1468c3..f5cfbd57 100644 --- a/charts/velero/Chart.yaml +++ b/charts/velero/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 1.6.0 description: A Helm chart for velero name: velero -version: 2.19.3 +version: 2.20.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/cleanup-crds.yaml b/charts/velero/templates/cleanup-crds.yaml index 9a0de3a7..5d1b8152 100644 --- a/charts/velero/templates/cleanup-crds.yaml +++ b/charts/velero/templates/cleanup-crds.yaml @@ -1,4 +1,4 @@ -{{- if .Values.cleanUpCRDs }} +{{- if .Values.cleanUpCRDs }} # This job is meant primarily for cleaning up on CI systems. # Using this on production systems, especially those that have multiple releases of Velero, will be destructive. apiVersion: batch/v1 @@ -19,6 +19,14 @@ spec: template: metadata: name: velero-cleanup-crds + {{- with .Values.kubectl.labels }} + labels: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.kubectl.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- if .Values.image.imagePullSecrets }} imagePullSecrets: @@ -29,8 +37,12 @@ spec: serviceAccountName: {{ include "velero.serverServiceAccount" . }} containers: - name: kubectl - image: docker.io/bitnami/kubectl:1.14.3 - imagePullPolicy: IfNotPresent + {{- if .Values.kubectl.image.digest }} + image: "{{ .Values.kubectl.image.repository }}@{{ .Values.kubectl.image.digest }}" + {{- else }} + image: "{{ .Values.kubectl.image.repository }}:{{ .Values.kubectl.image.tag }}" + {{- end }} + imagePullPolicy: {{ .Values.image.pullPolicy }} command: - /bin/sh - -c diff --git a/charts/velero/templates/upgrade-crds.yaml b/charts/velero/templates/upgrade-crds.yaml index 98fde57d..0ef98155 100644 --- a/charts/velero/templates/upgrade-crds.yaml +++ b/charts/velero/templates/upgrade-crds.yaml @@ -1,3 +1,4 @@ +{{- if .Values.upgradeCRDs }} apiVersion: batch/v1 kind: Job metadata: @@ -16,6 +17,14 @@ spec: template: metadata: name: velero-upgrade-crds + {{- with .Values.kubectl.labels }} + labels: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.kubectl.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- if .Values.image.imagePullSecrets }} imagePullSecrets: @@ -26,11 +35,11 @@ spec: serviceAccountName: {{ include "velero.serverServiceAccount" . }} initContainers: - name: velero - {{- if .Values.image.digest }} + {{- if .Values.image.digest }} image: "{{ .Values.image.repository }}@{{ .Values.image.digest }}" - {{- else }} + {{- else }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - {{- end }} + {{- end }} imagePullPolicy: {{ .Values.image.pullPolicy }} command: - /bin/sh @@ -41,8 +50,12 @@ spec: name: crds containers: - name: kubectl - image: docker.io/bitnami/kubectl:1.14.3 - imagePullPolicy: IfNotPresent + {{- if .Values.kubectl.image.digest }} + image: "{{ .Values.kubectl.image.repository }}@{{ .Values.kubectl.image.digest }}" + {{- else }} + image: "{{ .Values.kubectl.image.repository }}:{{ .Values.kubectl.image.tag }}" + {{- end }} + imagePullPolicy: {{ .Values.image.pullPolicy }} command: - /bin/sh - -c @@ -54,3 +67,4 @@ spec: - name: crds emptyDir: {} restartPolicy: OnFailure +{{- end }} diff --git a/charts/velero/values.yaml b/charts/velero/values.yaml index de3b7e86..3efa826c 100644 --- a/charts/velero/values.yaml +++ b/charts/velero/values.yaml @@ -7,8 +7,8 @@ image: repository: velero/velero tag: v1.6.0 - # Digest value example: sha256:d238835e151cec91c6a811fe3a89a66d3231d9f64d09e5f3c49552672d271f38. If used, it will - # take precedence over the image.tag. + # Digest value example: sha256:d238835e151cec91c6a811fe3a89a66d3231d9f64d09e5f3c49552672d271f38. + # If used, it will take precedence over the image.tag. # digest: pullPolicy: IfNotPresent # One or more secrets to be used when pulling images @@ -105,6 +105,25 @@ metrics: # ServiceMonitor namespace. Default to Velero namespace. # namespace: +kubectl: + image: + repository: docker.io/bitnami/kubectl + tag: 1.14.3 + # Digest value example: sha256:d238835e151cec91c6a811fe3a89a66d3231d9f64d09e5f3c49552672d271f38. + # If used, it will take precedence over the kubectl.image.tag. + # digest: + # Annotations to set for the upgrade/cleanup job. Optional. + annotations: {} + # Labels to set for the upgrade/cleanup job. Optional. + labels: {} + +# This job upgrades the CRDs. +upgradeCRDs: true + +# This job is meant primarily for cleaning up CRDs on CI systems. +# Using this on production systems, especially those that have multiple releases of Velero, will be destructive. +cleanUpCRDs: false + ## ## End of deployment-related settings. ##