Improve helm chart PVC support
This commit is contained in:
@@ -71,11 +71,23 @@ spec:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: TRANSCODE_PVC
|
||||
{{- if .Values.persistence.transcode.claimName }}
|
||||
value: "{{ .Values.persistence.transcode.claimName }}"
|
||||
{{- else }}
|
||||
value: "{{ template "fullname" . }}-transcode"
|
||||
{{- end }}
|
||||
- name: DATA_PVC
|
||||
{{- if .Values.persistence.data.claimName }}
|
||||
value: "{{ .Values.persistence.data.claimName }}"
|
||||
{{- else }}
|
||||
value: "{{ template "fullname" . }}-data"
|
||||
{{- end }}
|
||||
- name: CONFIG_PVC
|
||||
{{- if .Values.persistence.config.claimName }}
|
||||
value: "{{ .Values.persistence.config.claimName }}"
|
||||
{{- else }}
|
||||
value: "{{ template "fullname" . }}-config"
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
@@ -94,12 +106,24 @@ spec:
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
{{- if .Values.persistence.data.claimName }}
|
||||
claimName: "{{ .Values.persistence.data.claimName }}"
|
||||
{{- else }}
|
||||
claimName: "{{ template "fullname" . }}-data"
|
||||
{{- end }}
|
||||
- name: config
|
||||
persistentVolumeClaim:
|
||||
{{- if .Values.persistence.config.claimName }}
|
||||
claimName: "{{ .Values.persistence.config.claimName }}"
|
||||
{{- else }}
|
||||
claimName: "{{ template "fullname" . }}-config"
|
||||
{{- end }}
|
||||
- name: transcode
|
||||
persistentVolumeClaim:
|
||||
{{- if .Values.persistence.transcode.claimName }}
|
||||
claimName: "{{ .Values.persistence.transcode.claimName }}"
|
||||
{{- else }}
|
||||
claimName: "{{ template "fullname" . }}-transcode"
|
||||
{{- end }}
|
||||
- name: shared
|
||||
emptyDir: {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## TODO: make this configurable through the helm chart
|
||||
{{- if not .Values.persistence.transcode.claimName }}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
@@ -8,14 +8,19 @@ metadata:
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
component: transcode
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
storageClassName: "nfs"
|
||||
storage: {{ .Values.persistence.transcode.size | quote }}
|
||||
{{- if .Values.persistence.transcode.storageClass }}
|
||||
storageClassName: {{ .Values.persistence.transcode.storageClass | quote }}
|
||||
{{- end }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- if not .Values.persistence.config.claimName }}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
@@ -25,14 +30,19 @@ metadata:
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
component: config
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
storageClassName: "nfs"
|
||||
storage: {{ .Values.persistence.config.size | quote }}
|
||||
{{- if .Values.persistence.config.storageClass }}
|
||||
storageClassName: {{ .Values.persistence.config.storageClass | quote }}
|
||||
{{- end }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- if not .Values.persistence.data.claimName }}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
@@ -42,13 +52,15 @@ metadata:
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
component: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
selector:
|
||||
matchLabels:
|
||||
name: pms-data
|
||||
storageClassName: ""
|
||||
storage: {{ .Values.persistence.data.size | quote }}
|
||||
{{- if .Values.persistence.data.storageClass }}
|
||||
storageClassName: {{ .Values.persistence.data.storageClass | quote }}
|
||||
{{- end }}
|
||||
---
|
||||
{{- end }}
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
# Default values for kube-plex.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
replicaCount: 1
|
||||
image:
|
||||
repository: plexinc/pms-docker
|
||||
tag: 1.10.1.4602-f54242b6b
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
kubePlexImage:
|
||||
repository: quay.io/munnerz/kube-plex
|
||||
tag: latest
|
||||
pullPolicy: Always
|
||||
|
||||
# Override this with the plex claim token from plex.tv/claim
|
||||
claimToken: ""
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
# Used to create an Ingress record.
|
||||
@@ -27,6 +30,45 @@ ingress:
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
persistence:
|
||||
transcode:
|
||||
# Optionally specify claimName to manually override the PVC to be used for
|
||||
# the transcode directory. If claimName is specified, storageClass and size
|
||||
# are ignored.
|
||||
## claimName: "plex-transcode-pvc"
|
||||
# Optionally specify a storage class to be used for the transcode directory.
|
||||
# If not specified and claimName is not specified, the default storage
|
||||
# class will be used.
|
||||
storageClass: ""
|
||||
# The requested size of the volume to be used when creating a
|
||||
# PersistentVolumeClaim.
|
||||
size: 20Gi
|
||||
data:
|
||||
# Optionally specify claimName to manually override the PVC to be used for
|
||||
# the data directory. If claimName is specified, storageClass and size are
|
||||
# ignored.
|
||||
## claimName: "plex-data-pvc"
|
||||
# Optionally specify a storage class to be used for the data directory.
|
||||
# If not specified and claimName is not specified, the default storage
|
||||
# class will be used.
|
||||
storageClass: ""
|
||||
# The requested size of the volume to be used when creating a
|
||||
# PersistentVolumeClaim.
|
||||
size: 40Gi
|
||||
config:
|
||||
# Optionally specify claimName to manually override the PVC to be used for
|
||||
# the config directory. If claimName is specified, storageClass and size
|
||||
# are ignored.
|
||||
## claimName: "plex-config-pvc"
|
||||
# Optionally specify a storage class to be used for the config directory.
|
||||
# If not specified and claimName is not specified, the default storage
|
||||
# class will be used.
|
||||
storageClass: ""
|
||||
# The requested size of the volume to be used when creating a
|
||||
# PersistentVolumeClaim.
|
||||
size: 20Gi
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user