2022-09-25 13:36:02 +00:00
|
|
|
{{/* Make sure all variables are set properly */}}
|
2023-05-18 07:35:43 +00:00
|
|
|
{{- include "tc.v1.common.loader.init" . }}
|
2022-09-25 13:36:02 +00:00
|
|
|
|
|
|
|
{{- define "dashy.configvolume" -}}
|
|
|
|
enabled: true
|
2023-05-18 07:35:43 +00:00
|
|
|
type: configmap
|
|
|
|
objectName: dashy-config
|
2022-09-25 13:36:02 +00:00
|
|
|
readOnly: true
|
2023-05-18 07:35:43 +00:00
|
|
|
defaultMode: "0755"
|
|
|
|
mountPath: /app/public
|
|
|
|
items:
|
|
|
|
- key: conf.yml
|
|
|
|
path: conf.yml
|
2022-09-25 13:36:02 +00:00
|
|
|
{{- 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 -}}
|
2023-05-18 07:35:43 +00:00
|
|
|
{{/* Render config for dashy */}}
|
|
|
|
{{- $config := include "dashy.config" . | fromYaml -}}
|
|
|
|
{{- if $config -}}
|
|
|
|
{{- $_ := mustMergeOverwrite .Values $config -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- $_ := set .Values.persistence "dashy-config" (include "dashy.configvolume" . | fromYaml) -}}
|
2022-09-25 13:36:02 +00:00
|
|
|
{{- else if .Values.dashy.enabled -}}
|
2023-05-18 07:35:43 +00:00
|
|
|
{{- $_ := set .Values.persistence "dashy-config" (include "dashy.confighostpath" . | fromYaml) -}}
|
2022-09-25 13:36:02 +00:00
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/* Render the templates */}}
|
2023-05-18 07:35:43 +00:00
|
|
|
{{ include "tc.v1.common.loader.apply" . }}
|