fix configpath, volumemount, and helpers

This commit is contained in:
Nicholas St. Germain 2020-09-05 20:12:50 -05:00
parent 0f37c8776d
commit 1f6050759b
No known key found for this signature in database
GPG Key ID: 7221152119DAB1E6
10 changed files with 19 additions and 34 deletions

View File

@ -1,7 +1,6 @@
image:
organization: itscontained
repository: radarr
pullPolicy: IfNotPresent
tag: latest
service:
port: 7878

View File

@ -2,7 +2,7 @@
lidarr:
image:
organization: itscontained
organization: linuxserver
repository: lidarr
pullPolicy: IfNotPresent
tag: ""

View File

@ -8,3 +8,4 @@ ombi:
tag: ""
service:
port: 5000
configPath: /var/lib/ombi

View File

@ -2,8 +2,8 @@
organizr:
image:
organization: organizrtools
repository: organizr-v2
organization: organizr
repository: organizr
pullPolicy: IfNotPresent
tag: ""
service:

View File

@ -8,3 +8,4 @@ radarr:
tag: ""
service:
port: 7878
configPath: /var/lib/radarr

View File

@ -8,3 +8,4 @@ sonarr:
tag: ""
service:
port: 8989
configPath: /var/lib/radarr

View File

@ -50,22 +50,3 @@ Selector labels
app.kubernetes.io/name: {{ include "media-common.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Config Path Selector
*/}}
{{- define "media-common.configPathSelector" -}}
{{- if eq .Values.image.organization "itscontained" -}}
{{- if eq .Values.image.repository "radarr" -}}
/var/lib/radarr
{{- else if eq .Values.image.repository "sonarr" -}}
/var/lib/sonarr
{{- else if eq .Values.image.repository "lidarr" -}}
{{- fail "lidarr not yet implemented" -}}
{{- else -}}
{{- fail "Could not establish the service port from the repository and no service port was set" -}}
{{- end -}}
{{- else -}}
/config
{{- end -}}
{{- end -}}

View File

@ -55,7 +55,7 @@ spec:
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
volumeMounts:
- mountPath: {{ template "media-common.configPathSelector" . }}
- mountPath: {{ .Values.configPath }}
name: config
{{- if .Values.persistence.config.subPath }}
subPath: {{ .Values.persistence.config.subPath }}
@ -68,7 +68,7 @@ spec:
{{- end }}
{{- end }}
{{- if .Values.additionalVolumeMounts }}
{{- toYaml .Values.additionalVolumes | nindent 12 }}
{{- toYaml .Values.additionalVolumeMounts | nindent 12 }}
{{- end }}
{{- with .Values.resources }}
resources:

View File

@ -56,7 +56,7 @@ spec:
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
volumeMounts:
- mountPath: {{ template "media-common.configPathSelector" . }}
- mountPath: {{ .Values.configPath }}
name: config
{{- if .Values.persistence.config.subPath }}
subPath: {{ .Values.persistence.config.subPath }}

View File

@ -21,6 +21,8 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
configPath: /config
env:
TZ: UTC
@ -74,7 +76,7 @@ persistence:
type: statefulset
config:
enabled: true
## arr configuration data Persistent Volume Storage Class
## media-common configuration data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
@ -92,8 +94,8 @@ persistence:
## Do not delete the pvc upon helm uninstall
skipuninstall: false
media:
enabled: true
## arr media volume configuration
enabled: false
## media-common media volume configuration
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is