mirror of
https://github.com/bitnami/charts.git
synced 2026-03-05 06:47:25 +08:00
[bitnami/postgresql] moved liveness probe command to healthcheck.sh script
This commit is contained in:
@@ -125,19 +125,7 @@ spec:
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- bash
|
||||
- -ec
|
||||
- |
|
||||
if PGPASSWORD=${PGPOOL_POSTGRES_PASSWORD} psql -U {{ (include "postgresql-ha.postgresqlUsername" .) | quote }} {{- if not (empty (include "postgresql-ha.postgresqlDatabase" .)) }} -d {{ (include "postgresql-ha.postgresqlDatabase" .) | quote }}{{- end }} -h 127.0.0.1 -tA -c "show pool_nodes;"; then
|
||||
for node in $(PGPASSWORD=${PGPOOL_POSTGRES_PASSWORD} psql -U {{ (include "postgresql-ha.postgresqlUsername" .) | quote }} {{- if not (empty (include "postgresql-ha.postgresqlDatabase" .)) }} -d {{ (include "postgresql-ha.postgresqlDatabase" .) | quote }}{{- end }} -h 127.0.0.1 -tA -c "show pool_nodes;" | grep "down" | cut -d'|' -f2); do
|
||||
if PGPASSWORD=${PGPOOL_POSTGRES_PASSWORD} psql -U {{ (include "postgresql-ha.postgresqlUsername" .) | quote }} {{- if not (empty (include "postgresql-ha.postgresqlDatabase" .)) }} -d {{ (include "postgresql-ha.postgresqlDatabase" .) | quote }}{{- end }} -h ${node} -tA -c "SELECT 1" >/dev/null; then
|
||||
false
|
||||
fi
|
||||
done
|
||||
else
|
||||
false
|
||||
fi
|
||||
|
||||
- /healthcheck.sh
|
||||
initialDelaySeconds: {{ .Values.pgpool.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.pgpool.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.pgpool.livenessProbe.timeoutSeconds }}
|
||||
|
||||
@@ -51,7 +51,7 @@ postgresqlImage:
|
||||
pgpoolImage:
|
||||
registry: docker.io
|
||||
repository: bitnami/pgpool
|
||||
tag: 4.1.0-debian-10-r2
|
||||
tag: 4.1.0-debian-10-r7
|
||||
## 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
|
||||
##
|
||||
|
||||
@@ -51,7 +51,7 @@ postgresqlImage:
|
||||
pgpoolImage:
|
||||
registry: docker.io
|
||||
repository: bitnami/pgpool
|
||||
tag: 4.1.0-debian-10-r2
|
||||
tag: 4.1.0-debian-10-r7
|
||||
## 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
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user