From 2d5fd2da73cddac53355c3013cd2b4bbda5d3d23 Mon Sep 17 00:00:00 2001
From: Pete Birley <pete@port.direct>
Date: Sun, 22 Jan 2017 05:39:25 +0000
Subject: [PATCH] Neutron: Move to use init-containers for dependency checking

Brings Neutron inline with other services, by moving the dependency checks to an init-container.
---
 neutron/templates/daemonset-dhcp-agent.yaml   | 34 ++++++----------
 neutron/templates/daemonset-l3-agent.yaml     | 36 +++++++----------
 .../templates/daemonset-metadata-agent.yaml   | 40 ++++++++-----------
 neutron/templates/daemonset-ovs-agent.yaml    | 31 +++++---------
 neutron/templates/daemonset-ovs-db.yaml       | 21 +++-------
 neutron/templates/daemonset-ovs-vswitchd.yaml | 20 +++-------
 neutron/templates/deployment-server.yaml      | 32 ++++++---------
 neutron/templates/job-db-sync.yaml            | 36 +++++++++--------
 neutron/templates/job-init.yaml               | 27 +++++--------
 neutron/templates/job-post.yaml               | 26 +++++-------
 neutron/values.yaml                           | 20 +++++-----
 11 files changed, 127 insertions(+), 196 deletions(-)

diff --git a/neutron/templates/daemonset-dhcp-agent.yaml b/neutron/templates/daemonset-dhcp-agent.yaml
index 11ef4e05c9..4a56ee6ed1 100644
--- a/neutron/templates/daemonset-dhcp-agent.yaml
+++ b/neutron/templates/daemonset-dhcp-agent.yaml
@@ -1,3 +1,5 @@
+{{- $envAll := . }}
+{{- $dependencies := .Values.dependencies.dhcp }}
 apiVersion: extensions/v1beta1
 kind: DaemonSet
 metadata:
@@ -9,7 +11,10 @@ spec:
         app: neutron-dhcp-agent
       annotations:
         configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }}
-        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}        
+        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}
+        pod.beta.kubernetes.io/init-containers: '[
+{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }}
+        ]'
     spec:
       nodeSelector:
         {{ .Values.labels.agent.dhcp.node_selector_key }}: {{ .Values.labels.agent.dhcp.node_selector_value }}
@@ -23,25 +28,12 @@ spec:
           imagePullPolicy: {{ .Values.images.pull_policy }}
           securityContext:
             privileged: true
-          env:
-            - name: INTERFACE_NAME
-              value: {{ .Values.network.interface.dhcp | default .Values.network.interface.default }}
-            - name: POD_NAME
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.name
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.namespace
-            - name: COMMAND
-              value: "neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp-agent.ini"
-            - name: DEPENDENCY_JOBS
-              value: "{{  include "joinListWithColon" .Values.dependencies.dhcp.jobs }}"
-            - name: DEPENDENCY_SERVICE
-              value: "{{  include "joinListWithColon" .Values.dependencies.dhcp.service }}"
-            - name: DEPENDENCY_DAEMONSET
-              value: "{{  include "joinListWithColon" .Values.dependencies.dhcp.daemonset }}"
+          command:
+            - neutron-dhcp-agent
+            - --config-file
+            - /etc/neutron/neutron.conf
+            - --config-file
+            - /etc/neutron/dhcp-agent.ini
           volumeMounts:
             - name: neutronconf
               mountPath: /etc/neutron/neutron.conf
@@ -61,7 +53,7 @@ spec:
               mountPath: /var/lib/neutron/openstack-helm
             - name: resolvconf
               mountPath: /etc/resolv.conf
-              subPath: resolv.conf              
+              subPath: resolv.conf
       volumes:
         - name: neutronconf
           configMap:
diff --git a/neutron/templates/daemonset-l3-agent.yaml b/neutron/templates/daemonset-l3-agent.yaml
index 7428f94419..c73ba0da3c 100644
--- a/neutron/templates/daemonset-l3-agent.yaml
+++ b/neutron/templates/daemonset-l3-agent.yaml
@@ -1,3 +1,5 @@
+{{- $envAll := . }}
+{{- $dependencies := .Values.dependencies.l3 }}
 apiVersion: extensions/v1beta1
 kind: DaemonSet
 metadata:
@@ -9,7 +11,10 @@ spec:
         app: neutron-l3-agent
       annotations:
         configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }}
-        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}        
+        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}
+        pod.beta.kubernetes.io/init-containers: '[
+{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }}
+        ]'
     spec:
       nodeSelector:
         {{ .Values.labels.agent.l3.node_selector_key }}: {{ .Values.labels.agent.l3.node_selector_value }}
@@ -23,25 +28,14 @@ spec:
           imagePullPolicy: {{ .Values.images.pull_policy }}
           securityContext:
             privileged: true
-          env:
-            - name: INTERFACE_NAME
-              value: {{ .Values.network.interface.l3 | default .Values.network.interface.default }}
-            - name: POD_NAME
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.name
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.namespace
-            - name: COMMAND
-              value: "neutron-l3-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3-agent.ini --config-file /etc/neutron/plugins/ml2/ml2-conf.ini"
-            - name: DEPENDENCY_JOBS
-              value: "{{  include "joinListWithColon" .Values.dependencies.l3.jobs }}"
-            - name: DEPENDENCY_SERVICE
-              value: "{{  include "joinListWithColon" .Values.dependencies.l3.service }}"
-            - name: DEPENDENCY_DAEMONSET
-              value: "{{  include "joinListWithColon" .Values.dependencies.l3.daemonset }}"              
+          command:
+            - neutron-l3-agent
+            - --config-file
+            - /etc/neutron/neutron.conf
+            - --config-file
+            - /etc/neutron/l3-agent.ini
+            - --config-file
+            - /etc/neutron/plugins/ml2/ml2-conf.ini
           volumeMounts:
             - name: neutronconf
               mountPath: /etc/neutron/neutron.conf
@@ -54,7 +48,7 @@ spec:
               subPath: l3-agent.ini
             - name: resolvconf
               mountPath: /etc/resolv.conf
-              subPath: resolv.conf                 
+              subPath: resolv.conf
             - name: runopenvswitch
               mountPath: /run/openvswitch
             - name: socket
diff --git a/neutron/templates/daemonset-metadata-agent.yaml b/neutron/templates/daemonset-metadata-agent.yaml
index 2ffc16df5c..6d1804aec8 100644
--- a/neutron/templates/daemonset-metadata-agent.yaml
+++ b/neutron/templates/daemonset-metadata-agent.yaml
@@ -1,3 +1,5 @@
+{{- $envAll := . }}
+{{- $dependencies := .Values.dependencies.metadata }}
 apiVersion: extensions/v1beta1
 kind: DaemonSet
 metadata:
@@ -9,7 +11,10 @@ spec:
         app: neutron-metadata-agent
       annotations:
         configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }}
-        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}        
+        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}
+        pod.beta.kubernetes.io/init-containers: '[
+{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }}
+        ]'
     spec:
       nodeSelector:
         {{ .Values.labels.agent.metadata.node_selector_key }}: {{ .Values.labels.agent.metadata.node_selector_value }}
@@ -23,27 +28,14 @@ spec:
           imagePullPolicy: {{ .Values.images.pull_policy }}
           securityContext:
             privileged: true
-          env:
-            - name: INTERFACE_NAME
-              value: {{ .Values.network.interface.metadata | default .Values.network.interface.default }}
-            - name: POD_NAME
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.name
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.namespace
-            - name: COMMAND
-              value: "neutron-metadata-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadata-agent.ini"
-            - name: DEPENDENCY_JOBS
-              value: "{{  include "joinListWithColon" .Values.dependencies.metadata.jobs }}"
-            - name: DEPENDENCY_SERVICE
-              value: "{{  include "joinListWithColon" .Values.dependencies.metadata.service }}"
-            - name: DEPENDENCY_DAEMONSET
-              value: "{{  include "joinListWithColon" .Values.dependencies.metadata.daemonset }}"              
+          command:
+            - neutron-metadata-agent
+            - --config-file
+            - /etc/neutron/neutron.conf
+            - --config-file
+            - /etc/neutron/metadata-agent.ini
           ports:
-          - containerPort: {{ .Values.network.port.metadata }}              
+          - containerPort: {{ .Values.network.port.metadata }}
           volumeMounts:
             - name: neutronconf
               mountPath: /etc/neutron/neutron.conf
@@ -56,7 +48,7 @@ spec:
               subPath: metadata-agent.ini
             - name: resolvconf
               mountPath: /etc/resolv.conf
-              subPath: resolv.conf              
+              subPath: resolv.conf
             - name: runopenvswitch
               mountPath: /run/openvswitch
             - name: socket
@@ -73,10 +65,10 @@ spec:
             name: neutron-etc
         - name: resolvconf
           configMap:
-            name: neutron-etc            
+            name: neutron-etc
         - name: runopenvswitch
           hostPath:
             path: /run/openvswitch
         - name: socket
           hostPath:
-            path: /var/lib/neutron/openstack-helm
\ No newline at end of file
+            path: /var/lib/neutron/openstack-helm
diff --git a/neutron/templates/daemonset-ovs-agent.yaml b/neutron/templates/daemonset-ovs-agent.yaml
index f1518ab3aa..a0e173c7ce 100644
--- a/neutron/templates/daemonset-ovs-agent.yaml
+++ b/neutron/templates/daemonset-ovs-agent.yaml
@@ -1,3 +1,5 @@
+{{- $envAll := . }}
+{{- $dependencies := .Values.dependencies.ovs_agent }}
 apiVersion: extensions/v1beta1
 kind: DaemonSet
 metadata:
@@ -9,10 +11,13 @@ spec:
         app: ovs-agent
       annotations:
         configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }}
-        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}        
+        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}
+        pod.beta.kubernetes.io/init-containers: '[
+{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }}
+        ]'
     spec:
       nodeSelector:
-        {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}    
+        {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
       securityContext:
         runAsUser: 0
       dnsPolicy: ClusterFirst
@@ -23,6 +28,9 @@ spec:
           imagePullPolicy: {{ .Values.images.pull_policy }}
           securityContext:
             privileged: true
+          command:
+            - bash
+            - /tmp/neutron-openvswitch-agent.sh
           # ensures this container can can see a br-int
           # bridge before its marked as ready
           readinessProbe:
@@ -31,23 +39,6 @@ spec:
                 - bash
                 - -c
                 - 'ovs-vsctl list-br | grep -q br-int'
-          env:
-            - name: INTERFACE_NAME
-              value: {{ .Values.network.interface.openvswitch | default .Values.network.interface.default }}
-            - name: POD_NAME
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.name
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.namespace
-            - name: COMMAND
-              value: "bash /tmp/neutron-openvswitch-agent.sh"
-            - name: DEPENDENCY_JOBS
-              value: "{{  include "joinListWithColon" .Values.dependencies.ovs_agent.jobs }}"
-            - name: DEPENDENCY_SERVICE
-              value: "{{  include "joinListWithColon" .Values.dependencies.ovs_agent.service }}"
           volumeMounts:
             - name: neutronopenvswitchagentsh
               mountPath: /tmp/neutron-openvswitch-agent.sh
@@ -86,4 +77,4 @@ spec:
             path: /lib/modules
         - name: run
           hostPath:
-            path: /run                 
+            path: /run
diff --git a/neutron/templates/daemonset-ovs-db.yaml b/neutron/templates/daemonset-ovs-db.yaml
index 6b877abff9..f503231c71 100644
--- a/neutron/templates/daemonset-ovs-db.yaml
+++ b/neutron/templates/daemonset-ovs-db.yaml
@@ -9,10 +9,10 @@ spec:
         app: ovs-db
       annotations:
         configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }}
-        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}        
+        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}
     spec:
       nodeSelector:
-        {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}    
+        {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
       securityContext:
         runAsUser: 0
       dnsPolicy: ClusterFirst
@@ -23,19 +23,9 @@ spec:
           imagePullPolicy: {{ .Values.images.pull_policy }}
           securityContext:
             privileged: true
-          env:
-            - name: INTERFACE_NAME
-              value: {{ .Values.network.interface.openvswitch | default .Values.network.interface.default }}
-            - name: POD_NAME
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.name
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.namespace
-            - name: COMMAND
-              value: "bash /tmp/openvswitch-db-server.sh"
+          command:
+            - bash
+            - /tmp/openvswitch-db-server.sh
           volumeMounts:
             - name: openvswitchdbserversh
               mountPath: /tmp/openvswitch-db-server.sh
@@ -62,4 +52,3 @@ spec:
         - name: run
           hostPath:
             path: /run
-
diff --git a/neutron/templates/daemonset-ovs-vswitchd.yaml b/neutron/templates/daemonset-ovs-vswitchd.yaml
index b07047e376..da33099bd8 100644
--- a/neutron/templates/daemonset-ovs-vswitchd.yaml
+++ b/neutron/templates/daemonset-ovs-vswitchd.yaml
@@ -9,10 +9,10 @@ spec:
         app: ovs-vswitchd
       annotations:
         configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }}
-        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}        
+        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}
     spec:
       nodeSelector:
-        {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}    
+        {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
       securityContext:
         runAsUser: 0
       dnsPolicy: ClusterFirst
@@ -30,19 +30,9 @@ spec:
               command:
                 - /usr/bin/ovs-vsctl
                 - show
-          env:
-            - name: INTERFACE_NAME
-              value: {{ .Values.network.interface.openvswitch | default .Values.network.interface.default }}
-            - name: POD_NAME
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.name
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.namespace
-            - name: COMMAND
-              value: "bash /tmp/openvswitch-vswitchd.sh"
+          command:
+            - bash
+            - /tmp/openvswitch-vswitchd.sh
           volumeMounts:
             - name: openvswitchvswitchdsh
               mountPath: /tmp/openvswitch-vswitchd.sh
diff --git a/neutron/templates/deployment-server.yaml b/neutron/templates/deployment-server.yaml
index 66aa7412d7..95abe45084 100644
--- a/neutron/templates/deployment-server.yaml
+++ b/neutron/templates/deployment-server.yaml
@@ -1,3 +1,5 @@
+{{- $envAll := . }}
+{{- $dependencies := .Values.dependencies.server }}
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
@@ -11,14 +13,17 @@ spec:
     rollingUpdate:
       maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
       maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
-    {{ end }}  
+    {{ end }}
   template:
     metadata:
       labels:
         app: neutron-server
       annotations:
         configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }}
-        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}        
+        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }}
+        pod.beta.kubernetes.io/init-containers: '[
+{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }}
+        ]'
     spec:
       nodeSelector:
         {{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value }}
@@ -26,23 +31,12 @@ spec:
         - name: neutron-server
           image: {{ .Values.images.server }}
           imagePullPolicy: {{ .Values.images.pull_policy }}
-          env:
-            - name: INTERFACE_NAME
-              value: "eth0"
-            - name: POD_NAME
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.name
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.namespace
-            - name: COMMAND
-              value: "neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2-conf.ini"
-            - name: DEPENDENCY_JOBS
-              value: "{{  include "joinListWithColon" .Values.dependencies.server.jobs }}"
-            - name: DEPENDENCY_SERVICE
-              value: "{{  include "joinListWithColon" .Values.dependencies.server.service }}"
+          command:
+            - neutron-server
+            - --config-file
+            - /etc/neutron/neutron.conf
+            - --config-file
+            - /etc/neutron/plugins/ml2/ml2-conf.ini
           ports:
           - containerPort: {{ .Values.network.port.server }}
           readinessProbe:
diff --git a/neutron/templates/job-db-sync.yaml b/neutron/templates/job-db-sync.yaml
index e34f36dc3a..1070a2da58 100644
--- a/neutron/templates/job-db-sync.yaml
+++ b/neutron/templates/job-db-sync.yaml
@@ -1,9 +1,16 @@
+{{- $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:
@@ -12,24 +19,17 @@ spec:
         - name: neutron-db-sync
           image: {{ .Values.images.db_sync }}
           imagePullPolicy: {{ .Values.images.pull_policy }}
-          env:
-            - name: INTERFACE_NAME
-              value: "eth0"
-            - name: POD_NAME
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.name
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.namespace
-            - name: COMMAND
-              value: "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2-conf.ini upgrade head"
-            - name: DEPENDENCY_JOBS
-              value: "{{  include "joinListWithColon" .Values.dependencies.db_sync.jobs }}"
-            - name: DEPENDENCY_SERVICE
-              value: "{{  include "joinListWithColon" .Values.dependencies.db_sync.service }}"
+          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
@@ -37,6 +37,8 @@ spec:
               mountPath: /etc/neutron/plugins/ml2/ml2-conf.ini
               subPath: ml2-conf.ini
       volumes:
+        - name: pod-etc-neutron
+          emptyDir: {}
         - name: neutronconf
           configMap:
             name: neutron-etc
diff --git a/neutron/templates/job-init.yaml b/neutron/templates/job-init.yaml
index d7d3401714..430601b35d 100644
--- a/neutron/templates/job-init.yaml
+++ b/neutron/templates/job-init.yaml
@@ -1,9 +1,16 @@
+{{- $envAll := . }}
+{{- $dependencies := .Values.dependencies.db_init }}
 apiVersion: batch/v1
 kind: Job
 metadata:
   name: neutron-init
 spec:
   template:
+    metadata:
+      annotations:
+        pod.beta.kubernetes.io/init-containers: '[
+{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }}
+        ]'
     spec:
       restartPolicy: OnFailure
       nodeSelector:
@@ -12,23 +19,9 @@ spec:
         - name: neutron-init
           image: {{ .Values.images.init }}
           imagePullPolicy: {{ .Values.images.pull_policy }}
-          env:
-            - name: INTERFACE_NAME
-              value: "eth0"
-            - name: POD_NAME
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.name
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.namespace
-            - name: COMMAND
-              value: "bash /tmp/init.sh"
-            - name: DEPENDENCY_JOBS
-              value: "{{  include "joinListWithColon" .Values.dependencies.init.jobs }}"
-            - name: DEPENDENCY_SERVICE
-              value: "{{  include "joinListWithColon" .Values.dependencies.init.service }}"
+          command:
+            - bash
+            - /tmp/init.sh
           volumeMounts:
             - name: initsh
               mountPath: /tmp/init.sh
diff --git a/neutron/templates/job-post.yaml b/neutron/templates/job-post.yaml
index 6c3a05d280..80dc94f2b8 100644
--- a/neutron/templates/job-post.yaml
+++ b/neutron/templates/job-post.yaml
@@ -1,9 +1,16 @@
+{{- $envAll := . }}
+{{- $dependencies := .Values.dependencies.db_sync }}
 apiVersion: batch/v1
 kind: Job
 metadata:
   name: neutron-post
 spec:
   template:
+    metadata:
+      annotations:
+        pod.beta.kubernetes.io/init-containers: '[
+{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }}
+        ]'
     spec:
       restartPolicy: OnFailure
       nodeSelector:
@@ -12,23 +19,10 @@ spec:
         - name: neutron-post
           image: {{ .Values.images.post }}
           imagePullPolicy: {{ .Values.images.pull_policy }}
+          command:
+            - bash
+            - /tmp/post.sh
           env:
-            - name: INTERFACE_NAME
-              value: "eth0"
-            - name: POD_NAME
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.name
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  fieldPath: metadata.namespace
-            - name: COMMAND
-              value: "bash /tmp/post.sh"
-            - name: DEPENDENCY_JOBS
-              value:  "{{  include "joinListWithColon" .Values.dependencies.post.jobs }}"
-            - name: DEPENDENCY_SERVICE
-              value: "{{  include "joinListWithColon" .Values.dependencies.post.service }}"
             - name: ANSIBLE_LIBRARY
               value: /usr/share/ansible/
           volumeMounts:
diff --git a/neutron/values.yaml b/neutron/values.yaml
index 434ea41fd7..7f965b51b4 100644
--- a/neutron/values.yaml
+++ b/neutron/values.yaml
@@ -17,7 +17,7 @@ images:
   openvswitch_db_server: quay.io/attcomdev/openvswitch-vswitchd:latest
   openvswitch_vswitchd: quay.io/attcomdev/openvswitch-vswitchd:latest
   post: quay.io/stackanetes/stackanetes-kolla-toolbox:newton
-  entrypoint: quay.io/stackanetes/kubernetes-entrypoint:v0.1.0
+  dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.1.0
   pull_policy: "IfNotPresent"
 
 upgrades:
@@ -39,7 +39,7 @@ labels:
     dhcp:
       node_selector_key: openstack-control-plane
       node_selector_value: enabled
-    l3: 
+    l3:
       node_selector_key: openstack-control-plane
       node_selector_value: enabled
     metadata:
@@ -54,7 +54,7 @@ network:
     kubernetes_domain: cluster.local
     # this must list the skydns server first, and in calico
     # this is consistently 10.96.0.10
-    servers: 
+    servers:
     - 10.96.0.10
     - 8.8.8.8
   external_bridge: br-ex
@@ -62,14 +62,14 @@ network:
   interface:
     external: enp12s0f0
     default: enp11s0f0
-  port: 
+  port:
     server: 9696
     metadata: 8775
 
-memcached: 
+memcached:
   address: "memcached:11211"
 
-rabbitmq: 
+rabbitmq:
   address: rabbitmq
   admin_user: rabbitmq
   admin_password: password
@@ -136,7 +136,7 @@ ml2:
     bridge_mappings:
       - "physnet1:br-physnet1"
 
-dependencies:  
+dependencies:
   server:
     jobs:
     - neutron-db-sync
@@ -185,10 +185,10 @@ dependencies:
     - ovs-agent
   db_sync:
     jobs:
-    - neutron-init
+    - neutron-db-init
     service:
     - mariadb
-  init:
+  db_init:
     jobs:
     - mariadb-seed
     service:
@@ -199,7 +199,7 @@ dependencies:
     jobs:
     - neutron-db-sync
 
-# typically overriden by environmental 
+# typically overriden by environmental
 # values, but should include all endpoints
 # required by this chart
 endpoints: