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
|
2024-04-26 10:11:38 +00:00
|
|
|
readOnly: {{ .Values.dashy.configDirectoryHostReadOnly }}
|
|
|
|
hostPathType: Directory
|
|
|
|
hostPath: {{ .Values.dashy.configDirectoryHostPath }}
|
|
|
|
mountPath: /app/user-data/
|
2022-09-25 13:36:02 +00:00
|
|
|
{{- 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" . }}
|