|
@@ -5,7 +5,7 @@
|
|
apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
|
|
apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
|
|
kind: Deployment
|
|
kind: Deployment
|
|
metadata:
|
|
metadata:
|
|
- name: {{ template "common.names.fullname" . }}
|
|
|
|
|
|
+ name: {{ template "common.names.fullname" . }}-ha
|
|
labels:
|
|
labels:
|
|
app: {{ template "common.names.name" . }}
|
|
app: {{ template "common.names.name" . }}
|
|
chart: {{ template "common.names.chart" . }}
|
|
chart: {{ template "common.names.chart" . }}
|
|
@@ -40,7 +40,7 @@ spec:
|
|
initContainers:
|
|
initContainers:
|
|
- name: init-postgresdb
|
|
- name: init-postgresdb
|
|
image: {{ template "postgres.imageName" . }}
|
|
image: {{ template "postgres.imageName" . }}
|
|
- command: ['sh', '-c', "until pg_isready -h {{ template "common.names.fullname" $postgres_values }}; do echo waiting for postgres; sleep 2; done"]
|
|
|
|
|
|
+ command: ['sh', '-c', "until pg_isready -h {{ template "common.names.fullname" $postgres_values }}-ha; do echo waiting for postgres; sleep 2; done"]
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
- name: init-configs
|
|
- name: init-configs
|
|
image: "alpine:latest"
|
|
image: "alpine:latest"
|
|
@@ -50,7 +50,7 @@ spec:
|
|
- "/config/init/init.sh"
|
|
- "/config/init/init.sh"
|
|
env:
|
|
env:
|
|
{{ $envList := (default list .Values.environmentVariables) }}
|
|
{{ $envList := (default list .Values.environmentVariables) }}
|
|
- {{ $envList = mustAppend $envList (dict "name" "POSTGRES_HOST" "value" (printf "%s:5432" (include "common.names.fullname" $postgres_values))) }}
|
|
|
|
|
|
+ {{ $envList = mustAppend $envList (dict "name" "POSTGRES_HOST" "value" (printf "%s-ha:5432" (include "common.names.fullname" $postgres_values))) }}
|
|
{{ $envList = mustAppend $envList (dict "name" "POSTGRES_DB" "value" (include "postgres.DatabaseName" .)) }}
|
|
{{ $envList = mustAppend $envList (dict "name" "POSTGRES_DB" "value" (include "postgres.DatabaseName" .)) }}
|
|
{{ $envList = mustAppend $envList (dict "name" "POSTGRES_USER" "valueFromSecret" true "secretName" "db-details" "secretKey" "db-user")}}
|
|
{{ $envList = mustAppend $envList (dict "name" "POSTGRES_USER" "valueFromSecret" true "secretName" "db-details" "secretKey" "db-user")}}
|
|
{{ $envList = mustAppend $envList (dict "name" "POSTGRES_PASSWORD" "valueFromSecret" true "secretName" "db-details" "secretKey" "db-password")}}
|
|
{{ $envList = mustAppend $envList (dict "name" "POSTGRES_PASSWORD" "valueFromSecret" true "secretName" "db-details" "secretKey" "db-password")}}
|