Update sdc-be liveness probe
[oom.git] / kubernetes / sdc / charts / sdc-be / templates / deployment.yaml
index 6c491b7..2d47f4b 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright © 2017 Amdocs, AT&T, Bell Canada
+# Modifications Copyright © 2018 ZTE
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -36,12 +37,6 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - "sdc-es"
-        - --container-name
-        - "sdc-cs"
-        - --container-name
-        - "sdc-kb"
-        - --container-name
         - "sdc-onboarding-be"
         env:
         - name: NAMESPACE
@@ -58,7 +53,7 @@ spec:
         - /root/job_complete.py
         args:
         - --job-name
-        - {{ .Release.Name }}-sdc-cs-config-cassandra
+        - {{ .Release.Name }}-sdc-onboarding-be-cassandra-init
         env:
         - name: NAMESPACE
           valueFrom:
@@ -74,10 +69,12 @@ spec:
           - containerPort: {{ .Values.service.internalPort2 }}
           {{ if eq .Values.liveness.enabled true }}
           livenessProbe:
-            tcpSocket:
-              port: {{ .Values.service.internalPort }}
+            httpGet:
+              path: /sdc2/rest/version
+              port: {{ .Values.service.internalPort2 }}
             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
             periodSeconds: {{ .Values.liveness.periodSeconds }}
+            timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
           {{ end }}
           readinessProbe:
             exec:
@@ -85,6 +82,9 @@ spec:
               - "/var/lib/ready-probe.sh"
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
+            timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
+          resources:
+{{ include "common.resources" . | indent 12 }}
           env:
           - name: ENVNAME
             value: {{ .Values.global.env.name }}
@@ -111,17 +111,6 @@ spec:
             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-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
-          resources:
-{{ toYaml .Values.resources | indent 12 }}
-        {{- if .Values.nodeSelector }}
-        nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-        {{- end -}}
-        {{- if .Values.affinity }}
-        affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-        {{- end }}
-
         # side car containers
         - name: {{ include "common.name" . }}-filebeat-onap
           image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
@@ -153,4 +142,4 @@ spec:
       - name:  {{ include "common.fullname" . }}-logs
         emptyDir: {}
       imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"