2d5fd2da73
Brings Neutron inline with other services, by moving the dependency checks to an init-container.
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
{{- $envAll := . }}
|
|
{{- $dependencies := .Values.dependencies.db_sync }}
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: neutron-db-sync
|
|
spec:
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
pod.beta.kubernetes.io/init-containers: '[
|
|
{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }}
|
|
]'
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
nodeSelector:
|
|
{{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value }}
|
|
containers:
|
|
- name: neutron-db-sync
|
|
image: {{ .Values.images.db_sync }}
|
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
|
command:
|
|
- neutron-db-manage
|
|
- --config-file
|
|
- /etc/neutron/neutron.conf
|
|
- --config-file
|
|
- /etc/neutron/plugins/ml2/ml2-conf.ini
|
|
- upgrade
|
|
- head
|
|
volumeMounts:
|
|
- name: pod-etc-neutron
|
|
mountPath: /etc/neutron
|
|
- name: neutronconf
|
|
mountPath: /etc/neutron/neutron.conf
|
|
subPath: neutron.conf
|
|
- name: ml2confini
|
|
mountPath: /etc/neutron/plugins/ml2/ml2-conf.ini
|
|
subPath: ml2-conf.ini
|
|
volumes:
|
|
- name: pod-etc-neutron
|
|
emptyDir: {}
|
|
- name: neutronconf
|
|
configMap:
|
|
name: neutron-etc
|
|
- name: ml2confini
|
|
configMap:
|
|
name: neutron-etc
|