openstack-helm/common/templates/snippets/_k8s_init_dep_check.tpl
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

50 lines
1.1 KiB
Smarty

{{- define "dep_check_init_cont" -}}
{{- $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",
"valueFrom": {
"fieldRef": {
"APIVersion": "v1",
"fieldPath": "metadata.name"
}
}
},
{
"name": "NAMESPACE",
"valueFrom": {
"fieldRef": {
"APIVersion": "v1",
"fieldPath": "metadata.namespace"
}
}
},
{
"name": "INTERFACE_NAME",
"value": "eth0"
},
{
"name": "DEPENDENCY_SERVICE",
"value": "{{ include "joinListWithColon" $deps.service }}"
},
{
"name": "DEPENDENCY_JOBS",
"value": "{{ include "joinListWithColon" $deps.jobs }}"
},
{
"name": "DEPENDENCY_DAEMONSET",
"value": "{{ include "joinListWithColon" $deps.daemonset }}"
},
{
"name": "COMMAND",
"value": "echo done"
}
]
}
{{- end -}}