mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
* Refactor helm to extract common templates to libcoder Signed-off-by: Spike Curtis <spike@coder.com> * Remove comment from libcoder Chart.yaml Signed-off-by: Spike Curtis <spike@coder.com> * Add provisioner helm chart * Fix prettier, linting, docs Signed-off-by: Spike Curtis <spike@coder.com> * Log at INFO when provisionerd connects to coderd Signed-off-by: Spike Curtis <spike@coder.com> * remove unnecessary exports in helm tests Signed-off-by: Spike Curtis <spike@coder.com> --------- Signed-off-by: Spike Curtis <spike@coder.com>
14 lines
506 B
YAML
14 lines
506 B
YAML
{{- /*
|
|
libcoder.util.merge will merge two YAML templates and output the result.
|
|
This takes an array of three values:
|
|
- the top context
|
|
- the template name of the overrides (destination)
|
|
- the template name of the base (source)
|
|
*/}}
|
|
{{- define "libcoder.util.merge" -}}
|
|
{{- $top := first . -}}
|
|
{{- $overrides := fromYaml (include (index . 1) $top) | default (dict ) -}}
|
|
{{- $tpl := fromYaml (include (index . 2) $top) | default (dict ) -}}
|
|
{{- toYaml (merge $overrides $tpl) -}}
|
|
{{- end -}}
|