openstack-helm/helm-toolkit/templates/snippets/_k8s_init_dep_check.tpl
Pete Birley 116931bb51 Rename common chart, and update all references to functions within it. (#167)
* Rename common chart to helm-toolkit

* Update useage of helpers to include reference to chart they come from.

* Update helm-toolkit function naming

Also catches several functions missed in previous PS

* Update remaining requirements.yaml to use helm-toolbox

* Dep Check container fix for common -> helm-toolbox renaming
2017-02-14 16:52:38 -08:00

58 lines
1.4 KiB
Smarty

{{- define "helm-toolkit.kubernetes_entrypoint_init_container" -}}
{{- $envAll := index . 0 -}}
{{- $deps := index . 1 -}}
{
"name": "init",
"image": {{ $envAll.Values.images.dep_check | quote }},
"imagePullPolicy": {{ $envAll.Values.images.pull_policy | quote }},
"env": [
{
"name": "POD_NAME",
{{- if $deps.pod -}}
"value": "{{ index $deps.pod 0 }}"
{{- else -}}
"valueFrom": {
"fieldRef": {
"APIVersion": "v1",
"fieldPath": "metadata.name"
}
}
{{- end -}}
},
{
"name": "NAMESPACE",
"valueFrom": {
"fieldRef": {
"APIVersion": "v1",
"fieldPath": "metadata.namespace"
}
}
},
{
"name": "INTERFACE_NAME",
"value": "eth0"
},
{
"name": "DEPENDENCY_SERVICE",
"value": "{{ include "helm-toolkit.joinListWithComma" $deps.service }}"
},
{
"name": "DEPENDENCY_JOBS",
"value": "{{ include "helm-toolkit.joinListWithComma" $deps.jobs }}"
},
{
"name": "DEPENDENCY_DAEMONSET",
"value": "{{ include "helm-toolkit.joinListWithComma" $deps.daemonset }}"
},
{
"name": "DEPENDENCY_CONTAINER",
"value": "{{ include "helm-toolkit.joinListWithComma" $deps.container }}"
},
{
"name": "COMMAND",
"value": "echo done"
}
]
}
{{- end -}}