Skip to content

Commit

Permalink
feat: Add additional templating options for Velero upgradeCRDs job
Browse files Browse the repository at this point in the history
Signed-off-by: Casey Buto <cbuto22@gmail.com>
  • Loading branch information
cbuto committed Dec 6, 2023
1 parent e0de1c3 commit e3458d7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/velero/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: 1.12.2
kubeVersion: ">=1.16.0-0"
description: A Helm chart for velero
name: velero
version: 5.1.6
version: 5.1.7
home: https://github.com/vmware-tanzu/velero
icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png
sources:
Expand Down
15 changes: 15 additions & 0 deletions charts/velero/templates/upgrade-crds/upgrade-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,24 @@ spec:
volumeMounts:
- mountPath: /tmp
name: crds
{{- if .Values.upgradeCRDsJob.extraVolumeMounts }}
{{- toYaml .Values.upgradeCRDsJob.extraVolumeMounts | nindent 12 }}
{{- end }}
{{- if .Values.upgradeCRDsJob.extraEnvVars }}
env:
{{- with .Values.upgradeCRDsJob.extraEnvVars }}
{{- range $key, $value := . }}
- name: {{ default "none" $key }}
value: {{ default "none" $value | quote }}
{{- end }}
{{- end }}
{{- end }}
volumes:
- name: crds
emptyDir: {}
{{- if .Values.upgradeCRDsJob.extraVolumes }}
{{- toYaml .Values.upgradeCRDsJob.extraVolumes | nindent 8 }}
{{- end }}
restartPolicy: OnFailure
{{- with $podSecurityContext }}
securityContext:
Expand Down
8 changes: 8 additions & 0 deletions charts/velero/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ upgradeJobResources: {}
# limits:
# cpu: 100m
# memory: 256Mi
upgradeCRDsJob:
# Extra volumes for the Upgrade CRDs Job. Optional.
extraVolumes: []
# Extra volumeMounts for the Upgrade CRDs Job. Optional.
extraVolumeMounts: []
# Extra key/value pairs to be used as environment variables. Optional.
extraEnvVars: {}


# Configure the dnsPolicy of the Velero deployment
# See: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy
Expand Down

0 comments on commit e3458d7

Please sign in to comment.