Skip to content

Commit

Permalink
reuse resource definition to run db-isalive init containers
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Riemann <[email protected]>
  • Loading branch information
rriemann committed Oct 28, 2024
1 parent 8d5acef commit c4a4ff0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/nextcloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ spec:
- "sh"
- "-c"
- {{ printf "until mysql --host=%s-mariadb --user=${MYSQL_USER} --password=${MYSQL_PASSWORD} --execute=\"SELECT 1;\"; do echo waiting for mysql; sleep 2; done;" .Release.Name }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- else if .Values.postgresql.enabled }}
- name: postgresql-isready
image: {{ .Values.postgresql.image.registry | default "docker.io" }}/{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}
Expand All @@ -333,6 +335,8 @@ spec:
- "sh"
- "-c"
- "until pg_isready -h ${POSTGRES_HOST} -U ${POSTGRES_USER} ; do sleep 2 ; done"
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- end }}{{/* end-if any database-initContainer */}}
{{- end }}{{/* end-if any initContainer */}}
{{- with .Values.affinity }}
Expand Down

0 comments on commit c4a4ff0

Please sign in to comment.