From 8b7530d3bda53afb49ae39609c1a3b91fbdce6ae Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Sat, 5 Dec 2020 23:12:06 +0500 Subject: [PATCH] Add init container to nextcloud pod to make sure it's not started until postgres is up --- test/nextcloud/2.3.2/templates/deployment.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/nextcloud/2.3.2/templates/deployment.yaml b/test/nextcloud/2.3.2/templates/deployment.yaml index 97dfba7d9e6..dd48c8cf0c4 100644 --- a/test/nextcloud/2.3.2/templates/deployment.yaml +++ b/test/nextcloud/2.3.2/templates/deployment.yaml @@ -38,6 +38,10 @@ spec: - name: {{ . }} {{- end}} {{- end }} + initContainers: + - name: init-postgresdb + image: busybox:latest + command: ['sh', '-c', "until nslookup {{ template "nextcloud.fullname" . }}-postgres; do echo waiting for postgres; sleep 2; done"] containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"