Преглед на файлове

Add init container to nextcloud pod to make sure it's not started until postgres is up

Waqar Ahmed преди 5 години
родител
ревизия
8b7530d3bd
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      test/nextcloud/2.3.2/templates/deployment.yaml

+ 4 - 0
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 }}"