From c8845ef1b7c3d78e756240d3f8c95470ece7529d Mon Sep 17 00:00:00 2001 From: Rommel Pawar Date: Thu, 22 Sep 2022 14:04:14 -0700 Subject: [AAI] OOM AAI resources healthcheck based on Cassandra DB Healthcheck Use echo endpoint for aai-resources liveness and readiness probes Updated aai resources docker image Issue-ID: AAI-3528 Signed-off-by: Rommel Pawar Change-Id: I2ceb489142063189d39ec271d3ea82e00e781b75 --- .../aai-resources/templates/deployment.yaml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'kubernetes/aai/components/aai-resources/templates') diff --git a/kubernetes/aai/components/aai-resources/templates/deployment.yaml b/kubernetes/aai/components/aai-resources/templates/deployment.yaml index 021f0946ed..74c58ff2d3 100644 --- a/kubernetes/aai/components/aai-resources/templates/deployment.yaml +++ b/kubernetes/aai/components/aai-resources/templates/deployment.yaml @@ -200,14 +200,32 @@ spec: # so K8s doesn't restart unresponsive container {{- if .Values.liveness.enabled }} livenessProbe: - tcpSocket: + httpGet: + path: /aai/util/echo?action=checkDB port: {{ .Values.service.internalPort }} + scheme: HTTP{{ (eq "true" (include "common.needTLS" .)) | ternary "S" "" }} + httpHeaders: + - name: X-FromAppId + value: LivenessCheck + - name: X-TransactionId + value: LiveCheck_TID + - name: Accept + value: application/json initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} {{- end }} readinessProbe: - tcpSocket: + httpGet: + path: /aai/util/echo?action=checkDB port: {{ .Values.service.internalPort }} + scheme: HTTP{{ (eq "true" (include "common.needTLS" .)) | ternary "S" "" }} + httpHeaders: + - name: X-FromAppId + value: ReadinessCheck + - name: X-TransactionId + value: ReadinessCheck_TID + - name: Accept + value: application/json initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: {{ include "common.resources" . | nindent 12 }} -- cgit 1.2.3-korg