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

This commit is contained in:
Waqar Ahmed 2020-12-05 23:12:06 +05:00
parent 7a148e5a3f
commit 8b7530d3bd
1 changed files with 4 additions and 0 deletions

View File

@ -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 }}"