Skip to content

Commit

Permalink
Merge pull request vmware-tanzu#314 from sagor999/restic-emptydir
Browse files Browse the repository at this point in the history
[velero] allow to specify your custom volume for /scratch folder for restic
  • Loading branch information
ywk253100 authored Oct 24, 2021
2 parents 58e695b + 3241c57 commit 2cee077
Show file tree
Hide file tree
Showing 3 changed files with 10 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 @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 1.7.0
description: A Helm chart for velero
name: velero
version: 2.24.0
version: 2.25.0
home: https://github.com/vmware-tanzu/velero
icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png
sources:
Expand Down
4 changes: 4 additions & 0 deletions charts/velero/templates/restic-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ spec:
- name: host-pods
hostPath:
path: {{ .Values.restic.podVolumePath }}
{{- if .Values.restic.useScratchEmptyDir -}}
- name: scratch
emptyDir: {}
{{- end }}
{{- if .Values.restic.extraVolumes }}
{{- toYaml .Values.restic.extraVolumes | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -99,8 +101,10 @@ spec:
- name: host-pods
mountPath: /host_pods
mountPropagation: HostToContainer
{{- if .Values.restic.useScratchEmptyDir -}}
- name: scratch
mountPath: /scratch
{{- end }}
{{- if .Values.restic.extraVolumeMounts }}
{{- toYaml .Values.restic.extraVolumeMounts | nindent 12 }}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions charts/velero/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,11 @@ restic:
# labels to set for the Restic daemonset. Optional.
labels: {}

# will map /scratch to emptyDir. Set to false and specify your own volume
# via extraVolumes and extraVolumeMounts that maps to /scratch
# if you don't want to use emptyDir.
useScratchEmptyDir: true

# Extra volumes for the Restic daemonset. Optional.
extraVolumes: []

Expand Down

0 comments on commit 2cee077

Please sign in to comment.