diff options
6 files changed, 9 insertions, 48 deletions
diff --git a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml index 906b7c6663..4fa9e69345 100644 --- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml +++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml @@ -15,29 +15,10 @@ spec: labels: app: sdc-cs name: sdc-cs - spec: - initContainers: - - command: - - /root/ready.py - args: - - --container-name - - sdc-es - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: "{{ .Values.image.readiness }}" - imagePullPolicy: "{{ .Values.pullPolicy }}" - name: sdc-cs-readiness containers: - name: sdc-cs image: "{{ .Values.image.sdcCassandra }}" imagePullPolicy: "{{ .Values.pullPolicy }}" - # run cs & wait forever - command: ["/root/startup.sh"] - args: [ "/bin/sh", "-c" , "while true; do sleep 30; done;" ] env: - name: ENVNAME value: "{{ .Values.env.name }}" diff --git a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-es.yaml b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-es.yaml index 5ab7fee83e..bc6d786e06 100644 --- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-es.yaml +++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-es.yaml @@ -20,10 +20,6 @@ spec: - name: sdc-es image: "{{ .Values.image.sdcElasticsearch }}" imagePullPolicy: "{{ .Values.pullPolicy }}" - # run & wait forever - command: ["/root/startup.sh"] - args: [ "/bin/sh", "-c" , "while true; do sleep 30; done;" ] - env: - name: ENVNAME value: "{{ .Values.env.name }}" diff --git a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-fe.yaml b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-fe.yaml index 49f5bb38c7..da5fa290f7 100644 --- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-fe.yaml +++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-fe.yaml @@ -92,10 +92,10 @@ spec: # name: sdc-fe-config # - mountPath: /tmp/logback.xml # name: sdc-logback -# lifecycle: -# postStart: -# exec: -# command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-fe/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"] + lifecycle: + postStart: + exec: + command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-fe/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"] ports: - containerPort: 9443 - containerPort: 8181 diff --git a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-kb.yaml b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-kb.yaml index 30b1be63a5..95294a37f6 100644 --- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-kb.yaml +++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-kb.yaml @@ -15,24 +15,6 @@ spec: labels: app: sdc-kb name: sdc-kb - spec: - initContainers: - - command: - - /root/ready.py - args: - - --container-name - - sdc-es - - --container-name - - sdc-cs - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: "{{ .Values.image.readiness }}" - imagePullPolicy: "{{ .Values.pullPolicy }}" - name: sdc-kb-readiness containers: - env: - name: ENVNAME diff --git a/sdc-os-chef/sdc-cassandra/startup.sh b/sdc-os-chef/sdc-cassandra/startup.sh index 0daa82ff88..c583876e2d 100755 --- a/sdc-os-chef/sdc-cassandra/startup.sh +++ b/sdc-os-chef/sdc-cassandra/startup.sh @@ -10,7 +10,8 @@ echo "########### starting cassandra ###########" /docker-entrypoint.sh cassandra -f & chef-solo -c solo.rb -E ${ENVNAME} +rc=$? if [[ $rc != 0 ]]; then exit $rc; fi +while true; do sleep 30; done -exec "$@"; diff --git a/sdc-os-chef/sdc-elasticsearch/startup.sh b/sdc-os-chef/sdc-elasticsearch/startup.sh index 1871d685f6..3c2cc4c229 100644 --- a/sdc-os-chef/sdc-elasticsearch/startup.sh +++ b/sdc-os-chef/sdc-elasticsearch/startup.sh @@ -3,8 +3,9 @@ cd /root/chef-solo/ chef-solo -c solo.rb -E ${ENVNAME} -chef_status=$? +rc=$? +if [[ $rc != 0 ]]; then exit $rc; fi /docker-entrypoint.sh elasticsearch & -exec "$@";
\ No newline at end of file +while true; do sleep 30; done
\ No newline at end of file |