Merge "Update the liveness probe to verify postgres connectivity"

This commit is contained in:
Zuul 2021-05-14 15:42:13 +00:00 committed by Gerrit Code Review
commit 96ceca1d03
2 changed files with 47 additions and 0 deletions

View File

@ -17,6 +17,7 @@ Source0: %{name}-%{git_sha}.tar.gz
Patch1: 0001-Add-Helm-v2-client-initialization-using-tiller-postS.patch
Patch2: 0002-Tiller-wait-for-postgres-database-ping.patch
Patch3: 0003-Update-the-liveness-probe-to-verify-postgres-connect.patch
BuildArch: noarch
@ -31,6 +32,7 @@ BuildRequires: chartmuseum
%setup -n armada
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
# Package the armada chart tarball using methodology derived from:

View File

@ -0,0 +1,45 @@
From be3167e5342f2730ef43012d8fe4f3782c6ef468 Mon Sep 17 00:00:00 2001
From: Robert Church <robert.church@windriver.com>
Date: Wed, 12 May 2021 02:38:52 -0400
Subject: [PATCH 3/3] 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 <robert.church@windriver.com>
---
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.16.6