diff --git a/charts/plex/Chart.yaml b/charts/plex/Chart.yaml index 6729699f..2abc3662 100644 --- a/charts/plex/Chart.yaml +++ b/charts/plex/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 1.19.1.2645-ccb6eb67e description: Plex Media Server name: plex -version: 1.6.1 +version: 1.7.0 keywords: - plex home: https://plex.tv/ diff --git a/charts/plex/templates/deployment.yaml b/charts/plex/templates/deployment.yaml index dbeb91d6..edb14a23 100644 --- a/charts/plex/templates/deployment.yaml +++ b/charts/plex/templates/deployment.yaml @@ -110,11 +110,13 @@ spec: {{- else }} value: "{{ template "plex.fullname" . }}-transcode" {{- end }} + {{- if .Values.persistence.data.enabled }} - name: DATA_PVC - {{- if .Values.persistence.data.claimName }} + {{- if .Values.persistence.data.claimName }} value: "{{ .Values.persistence.data.claimName }}" - {{- else }} + {{- else }} value: "{{ template "plex.fullname" . }}-data" + {{- end }} {{- end }} - name: CONFIG_PVC {{- if .Values.persistence.config.claimName }} @@ -210,8 +212,12 @@ spec: name: "extradata-{{ .name }}" {{- end }} {{- range .Values.persistence.extraMounts }} - - mountPath: "/{{ .mountPath }}" - name: "{{ .name }}" + {{- if .mountPath }} + - mountPath: /{{ .mountPath }} + {{- else }} + - mountPath: /{{ .name }} + {{- end }} + name: {{ .name }} {{- end }} - name: shared mountPath: /shared @@ -232,12 +238,14 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} volumes: +{{- if .Values.persistence.data.enabled }} - name: data persistentVolumeClaim: -{{- if .Values.persistence.data.claimName }} + {{- if .Values.persistence.data.claimName }} claimName: "{{ .Values.persistence.data.claimName }}" -{{- else }} + {{- else }} claimName: "{{ template "plex.fullname" . }}-data" + {{- end }} {{- end }} - name: config persistentVolumeClaim: diff --git a/charts/plex/templates/volumes.yaml b/charts/plex/templates/volumes.yaml index dcde4cd2..548fe5ff 100644 --- a/charts/plex/templates/volumes.yaml +++ b/charts/plex/templates/volumes.yaml @@ -36,7 +36,7 @@ spec: {{- end }} --- {{- end }} -{{- if not .Values.persistence.data.claimName }} +{{- if and .Values.persistence.data.enabled (not .Values.persistence.data.existingClaim) }} apiVersion: v1 kind: PersistentVolumeClaim metadata: diff --git a/charts/plex/values.yaml b/charts/plex/values.yaml index 43b9d513..083b3e41 100644 --- a/charts/plex/values.yaml +++ b/charts/plex/values.yaml @@ -187,6 +187,8 @@ persistence: data: + # We want to enable a data pvc + enabled: true # Optionally specify claimName to manually override the PVC to be used for # the data directory. If claimName is specified, storageClass and size are # ignored. @@ -210,12 +212,13 @@ persistence: # name: 'foo' extraMounts: [] - ## Include additional claims that can be mounted inside the - ## pod. This is useful if you wish to use different paths with categories - ## Claim will me mounted as /{mountPath} - # - name: video - # claimName: video-claim - # mountPath: mnt/path/in/pod + ## Include additional claims that can be mounted inside the + ## pod. This is useful if you wish to use different paths with categories + ## Claim will me mounted as /{mountPath} if specified. If no {mountPath} is given, + ## mountPath will default to {name} + # - name: video + # claimName: video-claim + # mountPath: /mnt/path/in/pod config: # Optionally specify claimName to manually override the PVC to be used for