aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/postgres-init
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/postgres-init')
-rw-r--r--kubernetes/common/postgres-init/Chart.yaml5
-rw-r--r--kubernetes/common/postgres-init/templates/job.yaml16
-rw-r--r--kubernetes/common/postgres-init/values.yaml4
3 files changed, 9 insertions, 16 deletions
diff --git a/kubernetes/common/postgres-init/Chart.yaml b/kubernetes/common/postgres-init/Chart.yaml
index 59008d37bb..81f566f9e1 100644
--- a/kubernetes/common/postgres-init/Chart.yaml
+++ b/kubernetes/common/postgres-init/Chart.yaml
@@ -16,7 +16,7 @@
apiVersion: v2
description: Chart for Postgres init job
name: postgres-init
-version: 13.0.0
+version: 13.0.1
dependencies:
@@ -26,6 +26,9 @@ dependencies:
- name: repositoryGenerator
version: ~13.x-0
repository: 'file://../repositoryGenerator'
+ - name: readinessCheck
+ version: ~13.x-0
+ repository: '@local'
- name: serviceAccount
version: ~13.x-0
repository: '@local' \ No newline at end of file
diff --git a/kubernetes/common/postgres-init/templates/job.yaml b/kubernetes/common/postgres-init/templates/job.yaml
index 09c21fe9e5..7fa2e9f4e8 100644
--- a/kubernetes/common/postgres-init/templates/job.yaml
+++ b/kubernetes/common/postgres-init/templates/job.yaml
@@ -33,21 +33,7 @@ spec:
release: {{ include "common.release" . }}
name: {{ include "common.name" . }}
spec:
- initContainers:
- - name: {{ include "common.name" . }}-readiness
- command:
- - /app/ready.py
- args:
- - --container-name
- - {{ .Values.global.postgres.container.name }}
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- image: {{ include "repositoryGenerator.image.readiness" . }}
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
containers:
- command:
- sh
diff --git a/kubernetes/common/postgres-init/values.yaml b/kubernetes/common/postgres-init/values.yaml
index 1b9e72b8d7..5a9f445afb 100644
--- a/kubernetes/common/postgres-init/values.yaml
+++ b/kubernetes/common/postgres-init/values.yaml
@@ -96,6 +96,10 @@ serviceAccount:
roles:
- read
+readinessCheck:
+ wait_for:
+ - '{{ .Values.global.postgres.container.name }}'
+
wait_for_job_container:
containers:
- '{{ include "common.name" . }}-update-config' \ No newline at end of file