Răsfoiți Sursa

Use pg_isready for determining if postgres is up

Waqar Ahmed 4 ani în urmă
părinte
comite
b30c99586f
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      test/nextcloud/1.1.0/templates/deployment.yaml

+ 2 - 2
test/nextcloud/1.1.0/templates/deployment.yaml

@@ -38,8 +38,8 @@ spec:
       {{- end }}
       initContainers:
         - name: init-postgresdb
-          image: busybox:latest
-          command: ['sh', '-c', "until nc -w 5 -vz {{ template "nextcloud.fullname" . }}-postgres 5432; do echo waiting for postgres; sleep 2; done"]
+          image: "postgres:13.1"
+          command: ['sh', '-c', "until pg_isready -h {{ template "nextcloud.fullname" . }}-postgres; do echo waiting for postgres; sleep 2; done"]
           imagePullPolicy: {{ .Values.image.pullPolicy }}
       containers:
       - name: {{ .Chart.Name }}