This commit is contained in:
1
helm-charts/dashy/templates/NOTES.txt
Normal file
1
helm-charts/dashy/templates/NOTES.txt
Normal file
@@ -0,0 +1 @@
|
||||
{{- include "tc.v1.common.lib.chart.notes" $ -}}
|
||||
9
helm-charts/dashy/templates/_configmap.tpl
Normal file
9
helm-charts/dashy/templates/_configmap.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
{{/* Define the secrets */}}
|
||||
{{- define "dashy.config" -}}
|
||||
configmap:
|
||||
dashy-config:
|
||||
enabled: true
|
||||
data:
|
||||
conf.yml: |
|
||||
{{- .Values.dashyConfig | toYaml | nindent 8 }}
|
||||
{{- end -}}
|
||||
37
helm-charts/dashy/templates/common.yaml
Normal file
37
helm-charts/dashy/templates/common.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
{{/* 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" . }}
|
||||
Reference in New Issue
Block a user