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

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

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

@ -7,4 +7,5 @@ ombi:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
tag: "" tag: ""
service: service:
port: 5000 port: 5000
configPath: /var/lib/ombi

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

@ -7,4 +7,5 @@ radarr:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
tag: "" tag: ""
service: service:
port: 7878 port: 7878
configPath: /var/lib/radarr

@ -7,4 +7,5 @@ sonarr:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
tag: "" tag: ""
service: service:
port: 8989 port: 8989
configPath: /var/lib/radarr

@ -50,22 +50,3 @@ Selector labels
app.kubernetes.io/name: {{ include "media-common.name" . }} app.kubernetes.io/name: {{ include "media-common.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }} {{- 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 -}}

@ -36,8 +36,8 @@ spec:
image: "{{ .Values.image.organization }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.image.organization }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ template "media-common.fullname" . }} name: {{ template "media-common.fullname" . }}
ports: ports:
- name: http - name: http
containerPort: {{ .Values.service.port }} containerPort: {{ .Values.service.port }}
@ -55,7 +55,7 @@ spec:
failureThreshold: {{ .Values.probes.readiness.failureThreshold }} failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
volumeMounts: volumeMounts:
- mountPath: {{ template "media-common.configPathSelector" . }} - mountPath: {{ .Values.configPath }}
name: config name: config
{{- if .Values.persistence.config.subPath }} {{- if .Values.persistence.config.subPath }}
subPath: {{ .Values.persistence.config.subPath }} subPath: {{ .Values.persistence.config.subPath }}
@ -68,7 +68,7 @@ spec:
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.additionalVolumeMounts }} {{- if .Values.additionalVolumeMounts }}
{{- toYaml .Values.additionalVolumes | nindent 12 }} {{- toYaml .Values.additionalVolumeMounts | nindent 12 }}
{{- end }} {{- end }}
{{- with .Values.resources }} {{- with .Values.resources }}
resources: resources:

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

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