openstack-helm/nova/templates/job-post.yaml
Alan Meadows 88a85ae7d5 Implement requested feedback in PR#91
- Split out osapi and metadata api to remove unnecessary security privileges

- Prune dependencies

- Fix static imagePullPolicies

- Remove extraneous start.sh imported accidently from keystone chart
2017-01-09 07:49:44 -08:00

60 lines
1.7 KiB
YAML

apiVersion: batch/v1
kind: Job
metadata:
name: nova-post
spec:
template:
metadata:
annotations:
pod.beta.kubernetes.io/init-containers: '[
{
"name": "init",
"image": "{{ .Values.image.entrypoint }}",
"imagePullPolicy": "{{ .Values.image.pull_policy }}",
"env": [
{
"name": "NAMESPACE",
"value": "{{ .Release.Namespace }}"
},
{
"name": "DEPENDENCY_SERVICE",
"value": "{{ include "joinListWithColon" .Values.dependencies.post.service }}"
},
{
"name": "DEPENDENCY_JOBS",
"value": "{{ include "joinListWithColon" .Values.dependencies.post.jobs }}"
},
{
"name": "COMMAND",
"value": "echo done"
}
]
}
]'
spec:
restartPolicy: OnFailure
containers:
- name: nova-post
image: {{ .Values.image.post }}
imagePullPolicy: {{ .Values.image.pull_policy }}
command:
- bash
- /tmp/post.sh
env:
- name: ANSIBLE_LIBRARY
value: /usr/share/ansible/
volumeMounts:
- name: novaconf
mountPath: /etc/nova/nova.conf
subPath: nova.conf
- name: nova-bin
mountPath: /tmp/post.sh
subPath: post.sh
volumes:
- name: novaconf
configMap:
name: nova-etc
- name: nova-bin
configMap:
name: nova-bin