Pete Birley 1a13f9ba83 Add support for daemonsets to the Kubernetes-Entrypoint init-container.
It also makes two other changes:

 * Moves the entrypoint container manifest snippet to its own file to reduce loading on the _funcs.tpl file
 * Changes dep-check-init-cont to dep_check_init_cont to match the formatting of other defines used in OpenStack Helm
2017-01-22 05:35:31 +00:00

24 lines
739 B
Smarty

{{- define "joinListWithColon" -}}
{{ range $k, $v := . }}{{ if $k }},{{ end }}{{ $v }}{{ end }}
{{- end -}}
{{- define "template" -}}
{{- $name := index . 0 -}}
{{- $context := index . 1 -}}
{{- $v:= $context.Template.Name | split "/" -}}
{{- $n := len $v -}}
{{- $last := sub $n 1 | printf "_%d" | index $v -}}
{{- $wtf := $context.Template.Name | replace $last $name -}}
{{ include $wtf $context }}
{{- end -}}
{{- define "hash" -}}
{{- $name := index . 0 -}}
{{- $context := index . 1 -}}
{{- $v:= $context.Template.Name | split "/" -}}
{{- $n := len $v -}}
{{- $last := sub $n 1 | printf "_%d" | index $v -}}
{{- $wtf := $context.Template.Name | replace $last $name -}}
{{- include $wtf $context | sha256sum | quote -}}
{{- end -}}