Skip to content

Commit

Permalink
Merge pull request #528 from cbuto/feat/upgrade-crds-extras
Browse files Browse the repository at this point in the history
[velero] feat: Add additional templating options for Velero upgrade CRDs job
  • Loading branch information
qiuming-best committed Dec 12, 2023
2 parents 5702849 + 8b4510f commit cbd56ae
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
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
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
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 cbd56ae

Please sign in to comment.