Add init container to nextcloud pod to make sure it's not started until postgres is up
This commit is contained in:
@@ -38,6 +38,10 @@ spec:
|
|||||||
- name: {{ . }}
|
- name: {{ . }}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- 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:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user