K8S liveness probe not work when webapp crash 57/75457/1
authoramitjai <amitjai@amdocs.com>
Tue, 8 Jan 2019 09:59:42 +0000 (15:29 +0530)
committeramitjai <amitjai@amdocs.com>
Tue, 8 Jan 2019 11:39:47 +0000 (17:09 +0530)
tcpSocket probe does not work for the web application
Kubernetes will never detect that, and will never try to re-create the pod.
liveness probe based on the health-check API can be used.

Issue-ID: SDC-1986
Change-Id: I93720e19feb2ff558fa6c4dc3ababdbfa2eda102
Signed-off-by: amitjai <amitjai@amdocs.com>
kubernetes/sdc/charts/sdc-be/templates/deployment.yaml
kubernetes/sdc/charts/sdc-onboarding-be/templates/deployment.yaml

index 4f8339f..063e2d8 100644 (file)
@@ -69,8 +69,9 @@ spec:
           - containerPort: {{ .Values.service.internalPort2 }}
           {{ if eq .Values.liveness.enabled true }}
           livenessProbe:
-            tcpSocket:
-              port: {{ .Values.service.internalPort }}
+            exec:
+              command:
+              - "/var/lib/ready-probe.sh"
             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
             periodSeconds: {{ .Values.liveness.periodSeconds }}
           {{ end }}
index ee5f78b..87556b0 100644 (file)
@@ -55,8 +55,9 @@ spec:
           - containerPort: {{ .Values.service.internalPort2 }}
           {{ if eq .Values.liveness.enabled true }}
           livenessProbe:
-            tcpSocket:
-              port: {{ .Values.service.internalPort }}
+            exec:
+              command:
+              - "/var/lib/ready-probe.sh"
             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
             periodSeconds: {{ .Values.liveness.periodSeconds }}
           {{ end }}