Skip to content
Open
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
2 changes: 1 addition & 1 deletion charts/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ spec:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "answer.fullname" . }}-claim
claimName: {{ .Values.persistence.existingClaim | default (printf "%s-claim" (include "answer.fullname" .)) }}
{{- else }}
emptyDir: {}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion charts/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

{{ if .Values.persistence.enabled -}}
{{ if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ persistence:
accessMode: ReadWriteOnce
size: 5Gi
annotations: {}
# Use an existing PVC instead of creating one; when set, no PVC is created by this chart
existingClaim: ""
# To restore a PVC from a VolumeSnapshot, set the dataSource;
# the kind and apiGroup are optional and default to the shown values
dataSource: {}
Expand Down