Helm chart: Add the ability to use a pre existing peristent volume claim

This commit is contained in:
JP Flouret 2024-02-25 10:28:49 -08:00 committed by Gaston Festari
parent c7dd9df342
commit a40eb6497c
2 changed files with 11 additions and 0 deletions

View File

@ -30,6 +30,11 @@ spec:
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- end }}
volumes:
{{- if .Values.pms.configExistingClaim }}
- name: pms-config
persistentVolumeClaim:
claimName: {{ .Values.pms.configExistingClaim | quote }}
{{- end }}
- name: pms-transcode
emptyDir: {}
{{- if and .Values.rclone.enabled .Values.rclone.configSecret }}
@ -164,6 +169,7 @@ spec:
{{- with .Values.extraContainers }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if not .Values.pms.configExistingClaim }}
volumeClaimTemplates:
- metadata:
name: pms-config
@ -175,3 +181,4 @@ spec:
resources:
requests:
storage: {{ .Values.pms.configStorage }}
{{- end }}

View File

@ -32,6 +32,10 @@ pms:
# the volume size to provision for the PMS database
configStorage: 2Gi
# Name of an existing `PersistentVolumeClaim` for the PMS database
# NOTE: When set, 'configStorage' and 'storageClassName' are ignored.
configExistingClaim: ""
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little