Skip to content

Commit a40eb64

Browse files
jpflouretcilindrox
authored andcommitted
Helm chart: Add the ability to use a pre existing peristent volume claim
1 parent c7dd9df commit a40eb64

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

charts/plex-media-server/templates/statefulset.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ spec:
3030
priorityClassName: {{ .Values.priorityClassName | quote }}
3131
{{- end }}
3232
volumes:
33+
{{- if .Values.pms.configExistingClaim }}
34+
- name: pms-config
35+
persistentVolumeClaim:
36+
claimName: {{ .Values.pms.configExistingClaim | quote }}
37+
{{- end }}
3338
- name: pms-transcode
3439
emptyDir: {}
3540
{{- if and .Values.rclone.enabled .Values.rclone.configSecret }}
@@ -164,6 +169,7 @@ spec:
164169
{{- with .Values.extraContainers }}
165170
{{- toYaml . | nindent 6 }}
166171
{{- end }}
172+
{{- if not .Values.pms.configExistingClaim }}
167173
volumeClaimTemplates:
168174
- metadata:
169175
name: pms-config
@@ -175,3 +181,4 @@ spec:
175181
resources:
176182
requests:
177183
storage: {{ .Values.pms.configStorage }}
184+
{{- end }}

charts/plex-media-server/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ pms:
3232
# the volume size to provision for the PMS database
3333
configStorage: 2Gi
3434

35+
# Name of an existing `PersistentVolumeClaim` for the PMS database
36+
# NOTE: When set, 'configStorage' and 'storageClassName' are ignored.
37+
configExistingClaim: ""
38+
3539
resources: {}
3640
# We usually recommend not to specify default resources and to leave this as a conscious
3741
# choice for the user. This also increases chances charts run on environments with little

0 commit comments

Comments
 (0)