From 03dfd95664e5e7666c09bc13c6cad47de6a9910c Mon Sep 17 00:00:00 2001 From: Drew Stinnett Date: Tue, 4 Feb 2020 15:04:32 -0500 Subject: [PATCH] Adding in option for additional mounts (#79) --- charts/kube-plex/Chart.yaml | 2 +- charts/kube-plex/README.md | 1 + charts/kube-plex/templates/deployment.yaml | 13 +++++++++++++ charts/kube-plex/values.yaml | 7 +++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/charts/kube-plex/Chart.yaml b/charts/kube-plex/Chart.yaml index cf81c52..6a99fde 100644 --- a/charts/kube-plex/Chart.yaml +++ b/charts/kube-plex/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 1.16.0.1226-7eb2c8f6f description: Plex Media Server name: kube-plex -version: 0.2.5 +version: 0.2.6 keywords: - plex home: https://plex.tv/ diff --git a/charts/kube-plex/README.md b/charts/kube-plex/README.md index b0901cb..1736292 100644 --- a/charts/kube-plex/README.md +++ b/charts/kube-plex/README.md @@ -40,6 +40,7 @@ The following tables lists the configurable parameters of the Plex chart and the | `persistence.data.subPath` | SubPath to use for existing Claim | `nil` | | `persistence.data.storageClass` | Type of persistent volume claim | `-` | | `persistence.data.accessMode` | Persistent volume access mode | `ReadWriteMany` | +| `persistence.extraData` | Extra data mounts. Should be an array of items matching persistence.data entries | `[]` | | `persistence.config.size` | Size of persistent volume claim | `20Gi` | | `persistence.config.claimName`| Use an existing PVC to persist data | `nil` | | `persistence.config.subPath` | SubPath to use for existing Claim | `nil` | diff --git a/charts/kube-plex/templates/deployment.yaml b/charts/kube-plex/templates/deployment.yaml index fe197e7..5939ecf 100644 --- a/charts/kube-plex/templates/deployment.yaml +++ b/charts/kube-plex/templates/deployment.yaml @@ -143,6 +143,10 @@ spec: {{- if .Values.persistence.transcode.subPath }} subPath: {{ .Values.persistence.transcode.subPath }} {{ end }} + {{- range .Values.persistence.extraData }} + - mountPath: "/data-{{ .name }}" + name: "extradata-{{ .name }}" + {{- end }} - name: shared mountPath: /shared resources: @@ -176,6 +180,15 @@ spec: {{- end }} {{- else }} emptyDir: {} +{{- end }} +{{- range .Values.persistence.extraData }} + - name: "extradata-{{ .name }}" + persistentVolumeClaim: +{{- if .claimName }} + claimName: "{{ .claimName }}" +{{- else }} + claimName: "extradata-{{ .name }}" +{{- end }} {{- end }} - name: shared emptyDir: {} diff --git a/charts/kube-plex/values.yaml b/charts/kube-plex/values.yaml index d952463..a81834f 100644 --- a/charts/kube-plex/values.yaml +++ b/charts/kube-plex/values.yaml @@ -94,6 +94,13 @@ persistence: size: 40Gi # Access mode for this volume accessMode: ReadWriteMany + extraData: [] + # Optionally specifify additional Data mounts. These will be mounted as + # /data-${name}. This should be in the same format as the above 'data', + # with the additional field 'name' + # - claimName: "special-tv" + # name: 'foo' + config: # Optionally specify claimName to manually override the PVC to be used for # the config directory. If claimName is specified, storageClass and size