Browse Source

Prepare to split openshift-sdn out of the openshift binary

Detect if the new binary exists in the image before executing it.
Clayton Coleman 6 years ago
parent
commit
7a0551a8af
1 changed files with 3 additions and 0 deletions
  1. 3 0
      roles/openshift_sdn/files/sdn.yaml

+ 3 - 0
roles/openshift_sdn/files/sdn.yaml

@@ -102,6 +102,9 @@ spec:
           oc config --config=/tmp/kubeconfig set-credentials sa "--token=$( cat /var/run/secrets/kubernetes.io/serviceaccount/token )"
           oc config --config=/tmp/kubeconfig set-context "$( oc config --config=/tmp/kubeconfig current-context )" --user=sa
           # Launch the network process
+          if which openshift-sdn; then
+            exec openshift-sdn --config=/etc/origin/node/node-config.yaml --kubeconfig=/tmp/kubeconfig --loglevel=${DEBUG_LOGLEVEL:-2}
+          fi
           exec openshift start network --config=/etc/origin/node/node-config.yaml --kubeconfig=/tmp/kubeconfig --loglevel=${DEBUG_LOGLEVEL:-2}
 
         securityContext: