2022-09-18 18:19:46 +00:00
|
|
|
{{/* Make sure all variables are set properly */}}
|
2023-12-07 14:33:49 +00:00
|
|
|
{{- include "tc.v1.common.loader.init" . }}
|
2022-09-18 18:19:46 +00:00
|
|
|
|
|
|
|
{{/* Render config for flemarr */}}
|
|
|
|
{{- include "flemarr.config" . }}
|
|
|
|
|
|
|
|
{{- define "flemarr.configmap.mount" -}}
|
|
|
|
{{- if .Values.flemarrConfig }}
|
|
|
|
enabled: true
|
|
|
|
type: custom
|
|
|
|
mountPath: /config/config.yml
|
|
|
|
subPath: config.yml
|
|
|
|
readOnly: true
|
|
|
|
volumeSpec:
|
|
|
|
configMap:
|
2023-12-07 14:33:49 +00:00
|
|
|
name: '{{ printf "%s-flemarr-config" (include "tc.v1.common.names.fullname" .) }}'
|
2022-09-18 18:19:46 +00:00
|
|
|
{{- else -}}
|
|
|
|
enabled: true
|
|
|
|
type: hostPath
|
|
|
|
hostPathType: File
|
|
|
|
hostPath: {{ .Values.flemarr.configFilePath }}
|
|
|
|
mountPath: /config/config.yml
|
|
|
|
readOnly: true
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{- $_ := set .Values.persistence "configfile" (include "flemarr.configmap.mount" . | fromYaml) -}}
|
|
|
|
|
|
|
|
{{/* Render the templates */}}
|
2023-12-07 14:33:49 +00:00
|
|
|
{{ include "tc.v1.common.loader.apply" . }}
|