Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added volumeName to PersistentVolumeClaim #792

Merged
merged 2 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions traefik/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ spec:
{{- if .Values.persistence.storageClass }}
storageClassName: {{ .Values.persistence.storageClass | quote }}
{{- end }}
{{- if .Values.persistence.volumeName }}
volumeName: {{ .Values.persistence.volumeName | quote }}
{{- end }}
{{- end -}}
20 changes: 20 additions & 0 deletions traefik/tests/pvc-config_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
suite: Persistent volume claim configuration
templates:
- pvc.yaml
tests:
- it: should have no volumeName by default
set:
persistence:
enabled: true
asserts:
- isNull:
path: spec.volumeName
- it: should have a volumeName when specified via values
set:
persistence:
enabled: true
volumeName: traefik
asserts:
- equal:
path: spec.volumeName
value: traefik
1 change: 1 addition & 0 deletions traefik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ persistence:
accessMode: ReadWriteOnce
size: 128Mi
# storageClass: ""
# volumeName: ""
path: /data
annotations: {}
# subPath: "" # only mount a subpath of the Volume into the pod
Expand Down