k8s/helm-charts/dashy/templates/common.yaml
root 1eaf295724
Some checks failed
continuous-integration/drone/push Build is failing
new way of doin
2023-11-16 19:42:02 +10:00

38 lines
1.0 KiB
YAML

{{/* Make sure all variables are set properly */}}
{{- include "tc.v1.common.loader.init" . }}
{{- define "dashy.configvolume" -}}
enabled: true
type: configmap
objectName: dashy-config
readOnly: true
defaultMode: "0755"
mountPath: /app/public
items:
- key: conf.yml
path: conf.yml
{{- end -}}
{{- define "dashy.confighostpath" -}}
enabled: true
type: hostPath
readOnly: {{ .Values.dashy.configFileHostReadOnly }}
hostPathType: File
hostPath: {{ .Values.dashy.configFileHostPath }}
mountPath: /app/public/conf.yml
{{- end -}}
{{- if .Values.dashyConfig -}}
{{/* Render config for dashy */}}
{{- $config := include "dashy.config" . | fromYaml -}}
{{- if $config -}}
{{- $_ := mustMergeOverwrite .Values $config -}}
{{- end -}}
{{- $_ := set .Values.persistence "dashy-config" (include "dashy.configvolume" . | fromYaml) -}}
{{- else if .Values.dashy.enabled -}}
{{- $_ := set .Values.persistence "dashy-config" (include "dashy.confighostpath" . | fromYaml) -}}
{{- end -}}
{{/* Render the templates */}}
{{ include "tc.v1.common.loader.apply" . }}