From 3e34ec8c87ec5cbac79f6299e63fa1c06a75692e Mon Sep 17 00:00:00 2001 From: Robert Church Date: Wed, 12 May 2021 02:38:52 -0400 Subject: [PATCH 6/8] Update the liveness probe to verify postgres connectivity Change the tillerLivenessProbeTemplate to test the connectivity to the postgres backend. We will override the periodSeconds and failureThreshold when installing the helm chart to trigger a restart of the tiller pod over a swact when the postgres DB/server moves from one controller to the other. This will help guarantee that the tiller connection is always reestablished if the connectivity to the postgres backend fails. Signed-off-by: Robert Church --- charts/armada/templates/deployment-api.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/charts/armada/templates/deployment-api.yaml b/charts/armada/templates/deployment-api.yaml index bf23fb2..2b65494 100644 --- a/charts/armada/templates/deployment-api.yaml +++ b/charts/armada/templates/deployment-api.yaml @@ -28,10 +28,14 @@ httpGet: {{- end }} {{- define "tillerLivenessProbeTemplate" }} -httpGet: - path: /liveness - port: {{ .Values.conf.tiller.probe_port }} - scheme: HTTP +exec: + command: + - nc + - -vz + - -w + - "1" + - {{ .Values.conf.tiller.sql_endpoint_ip}} + - "5432" {{- end }} {{- if .Values.manifests.deployment_api }} -- 2.34.1