From f6c53e671789fafc393d0232192b6e254ef9db3a Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Wed, 15 Mar 2017 17:06:45 +0530 Subject: [PATCH] postgres: lower initialDelay and timeout for readiness probe (#318) * [stable/postgresql] lower initialDelaySeconds of readiness probe updated health probes to test postgres connection with POD_IP * postgresql: adjust probe timeouts --- stable/postgresql/Chart.yaml | 2 +- stable/postgresql/templates/deployment.yaml | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/stable/postgresql/Chart.yaml b/stable/postgresql/Chart.yaml index afb25ba37b..2138e1b3a4 100644 --- a/stable/postgresql/Chart.yaml +++ b/stable/postgresql/Chart.yaml @@ -1,5 +1,5 @@ name: postgresql -version: 0.5.0 +version: 0.5.1 description: Object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance. keywords: - postgresql diff --git a/stable/postgresql/templates/deployment.yaml b/stable/postgresql/templates/deployment.yaml index a14bb6342b..6e275df695 100644 --- a/stable/postgresql/templates/deployment.yaml +++ b/stable/postgresql/templates/deployment.yaml @@ -32,21 +32,29 @@ spec: secretKeyRef: name: {{ template "fullname" . }} key: postgres-password + - name: POD_IP + valueFrom: { fieldRef: { fieldPath: status.podIP } } ports: - name: postgresql containerPort: 5432 livenessProbe: exec: command: - - pg_isready + - sh + - -c + - exec pg_isready --host $POD_IP initialDelaySeconds: 60 - timeoutSeconds: 3 + timeoutSeconds: 5 + failureThreshold: 6 readinessProbe: exec: command: - - pg_isready - initialDelaySeconds: 60 + - sh + - -c + - exec pg_isready --host $POD_IP + initialDelaySeconds: 5 timeoutSeconds: 3 + periodSeconds: 5 resources: {{ toYaml .Values.resources | indent 10 }} volumeMounts: