aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/postgres-init/templates
diff options
context:
space:
mode:
authorAndreas Geissler <andreas-geissler@telekom.de>2022-05-10 10:30:11 +0200
committerAndreas Geissler <andreas-geissler@telekom.de>2022-05-31 12:32:31 +0000
commit0239815905443edeff2d80461137efcdec53931e (patch)
treefa8b9bea096cf9bc321800e7c9ff0c0c5f6c5727 /kubernetes/common/postgres-init/templates
parentd577b9b05a10227f07247517ba30b9b8aaff1cd8 (diff)
[COMMON][POSTGRES] Make DB init jobs ServiceMesh compatible
Add wait cycles and sidecar deletion container to ETCD and POSTGRES init charts Issue-ID: OOM-2820 Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de> Change-Id: Iddc8b7d161dddafe53efb0ce809542a60bd957b8
Diffstat (limited to 'kubernetes/common/postgres-init/templates')
-rw-r--r--kubernetes/common/postgres-init/templates/job.yaml3
1 files changed, 3 insertions, 0 deletions
diff --git a/kubernetes/common/postgres-init/templates/job.yaml b/kubernetes/common/postgres-init/templates/job.yaml
index 01151bb4a9..d9a7386f83 100644
--- a/kubernetes/common/postgres-init/templates/job.yaml
+++ b/kubernetes/common/postgres-init/templates/job.yaml
@@ -59,6 +59,8 @@ spec:
}
export PG_PASSWORD=`prepare_password $PG_PASSWORD_INPUT`;
export PG_ROOT_PASSWORD=`prepare_password $PG_ROOT_PASSWORD_INPUT`;
+ {{- if include "common.onServiceMesh" . }}
+ echo "waiting 15s for istio side cars to be up"; sleep 15s;{{- end }}
cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done;
psql "postgresql://postgres:$PG_ROOT_PASSWORD@$PG_HOST" < /config/setup.sql
env:
@@ -98,6 +100,7 @@ spec:
name: pgconf
resources:
{{ include "common.resources" . | indent 12 }}
+ {{ include "common.waitForJobContainer" . | indent 6 | trim }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 10 }}