From 0fff0f9e828ed00690f56ba0922c16d1e4a7a5fc Mon Sep 17 00:00:00 2001 From: Tomas Pizarro Date: Mon, 3 Jun 2019 17:10:26 +0200 Subject: [PATCH] [stable/postgresql] Improve readiness probe (#14370) * [stable/postgresql] Improve readiness probe Signed-off-by: tompizmor * Bump chart version Signed-off-by: tompizmor * update flag path for readiness probe Signed-off-by: tompizmor * Use proper postgres tag Signed-off-by: tompizmor --- stable/postgresql/Chart.yaml | 2 +- stable/postgresql/templates/statefulset-slaves.yaml | 4 ++-- stable/postgresql/templates/statefulset.yaml | 4 ++-- stable/postgresql/values-production.yaml | 2 +- stable/postgresql/values.yaml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/stable/postgresql/Chart.yaml b/stable/postgresql/Chart.yaml index eb2de964883d..bd815426b851 100644 --- a/stable/postgresql/Chart.yaml +++ b/stable/postgresql/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: postgresql -version: 5.2.2 +version: 5.2.3 appVersion: 11.3.0 description: Chart for PostgreSQL, an object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance. keywords: diff --git a/stable/postgresql/templates/statefulset-slaves.yaml b/stable/postgresql/templates/statefulset-slaves.yaml index 8d76f6ad8f1c..f0cb8cb7de86 100644 --- a/stable/postgresql/templates/statefulset-slaves.yaml +++ b/stable/postgresql/templates/statefulset-slaves.yaml @@ -156,9 +156,9 @@ spec: - sh - -c {{- if (include "postgresql.database" .) }} - - exec pg_isready -U {{ include "postgresql.username" . | quote }} -d {{ (include "postgresql.database" .) | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }} + - pg_isready -U {{ include "postgresql.username" . | quote }} -d {{ (include "postgresql.database" .) | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }} && [ -f /opt/bitnami/postgresql/tmp/.initialized ] {{- else }} - - exec pg_isready -U {{ include "postgresql.username" . | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }} + - pg_isready -U {{ include "postgresql.username" . | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }} && [ -f /opt/bitnami/postgresql/tmp/.initialized ] {{- end }} initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.readinessProbe.periodSeconds }} diff --git a/stable/postgresql/templates/statefulset.yaml b/stable/postgresql/templates/statefulset.yaml index 6856841ce330..312bbaec3d06 100644 --- a/stable/postgresql/templates/statefulset.yaml +++ b/stable/postgresql/templates/statefulset.yaml @@ -181,9 +181,9 @@ spec: - sh - -c {{- if (include "postgresql.database" .) }} - - exec pg_isready -U {{ include "postgresql.username" . | quote }} -d {{ (include "postgresql.database" .) | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }} + - pg_isready -U {{ include "postgresql.username" . | quote }} -d {{ (include "postgresql.database" .) | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }} && [ -f /opt/bitnami/postgresql/tmp/.initialized ] {{- else }} - - exec pg_isready -U {{ include "postgresql.username" . | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }} + - pg_isready -U {{ include "postgresql.username" . | quote }} -h 127.0.0.1 -p {{ template "postgresql.port" . }} && [ -f /opt/bitnami/postgresql/tmp/.initialized ] {{- end }} initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} periodSeconds: {{ .Values.readinessProbe.periodSeconds }} diff --git a/stable/postgresql/values-production.yaml b/stable/postgresql/values-production.yaml index 10be8fa8f7ac..733f6f195845 100644 --- a/stable/postgresql/values-production.yaml +++ b/stable/postgresql/values-production.yaml @@ -14,7 +14,7 @@ global: image: registry: docker.io repository: bitnami/postgresql - tag: 11.3.0-debian-9-r27 + tag: 11.3.0-debian-9-r28 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images diff --git a/stable/postgresql/values.yaml b/stable/postgresql/values.yaml index 5e42b902508b..36069932f24f 100644 --- a/stable/postgresql/values.yaml +++ b/stable/postgresql/values.yaml @@ -14,7 +14,7 @@ global: image: registry: docker.io repository: bitnami/postgresql - tag: 11.3.0-debian-9-r27 + tag: 11.3.0-debian-9-r28 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images