Add helper function for postgres name
This commit is contained in:
parent
b30c99586f
commit
770b060bbc
|
@ -13,6 +13,10 @@ app.kubernetes.io/name: {{ include "nextcloud.name" . }}-postgres
|
|||
app.kubernetes.io/instance: {{ .Release.Name }}-postgres
|
||||
{{- end }}
|
||||
|
||||
{{- define "postgres.imageName" -}}
|
||||
{{- print "postgres:13.1" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Retrieve postgres backup name
|
||||
This will return a unique name based on revision and chart numbers specified.
|
||||
|
|
|
@ -17,7 +17,7 @@ spec:
|
|||
serviceAccountName: "{{ template "nextcloud.serviceAccountName" . }}"
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-postgres-backup
|
||||
image: "postgres:13.1"
|
||||
image: {{ template "postgres.imageName" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
|
|
|
@ -38,7 +38,7 @@ spec:
|
|||
{{- end }}
|
||||
initContainers:
|
||||
- name: init-postgresdb
|
||||
image: "postgres:13.1"
|
||||
image: {{ template "postgres.imageName" . }}
|
||||
command: ['sh', '-c', "until pg_isready -h {{ template "nextcloud.fullname" . }}-postgres; do echo waiting for postgres; sleep 2; done"]
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
containers:
|
||||
|
|
|
@ -25,7 +25,7 @@ spec:
|
|||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-postgres
|
||||
image: "postgres:13.1"
|
||||
image: {{ template "postgres.imageName" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
|
|
Loading…
Reference in New Issue