K8S liveness probe not work when webapp crash
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>
diff --git a/kubernetes/sdc/charts/sdc-be/templates/deployment.yaml b/kubernetes/sdc/charts/sdc-be/templates/deployment.yaml
index 4f8339f..063e2d8 100644
--- a/kubernetes/sdc/charts/sdc-be/templates/deployment.yaml
+++ b/kubernetes/sdc/charts/sdc-be/templates/deployment.yaml
@@ -69,8 +69,9 @@
- 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 }}