summaryrefslogtreecommitdiffstats
path: root/kubernetes/so/components/so-request-db-adapter
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-10-30 14:32:03 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-11-02 16:49:49 +0000
commitd055a17d87b9e6bbfde51f523eea1838bc6b40dd (patch)
tree2e2a04467c315f0dd25363602fbae6c5f98bc132 /kubernetes/so/components/so-request-db-adapter
parent92b606b267cf7e48336f3383bfb459253052c88c (diff)
[SO] Use readiness chart
Some SO components are using readiness check init container. In "gating" mode, so image and readiness image are not coming from the same repository. By using readinessCheck charts, we can control that. Issue-ID: OOM-2617 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I44a4e9daf72d1a42d3d84b6d56b588cd7d44fb08
Diffstat (limited to 'kubernetes/so/components/so-request-db-adapter')
-rwxr-xr-xkubernetes/so/components/so-request-db-adapter/requirements.yaml3
-rwxr-xr-xkubernetes/so/components/so-request-db-adapter/templates/deployment.yaml18
-rwxr-xr-xkubernetes/so/components/so-request-db-adapter/values.yaml4
3 files changed, 10 insertions, 15 deletions
diff --git a/kubernetes/so/components/so-request-db-adapter/requirements.yaml b/kubernetes/so/components/so-request-db-adapter/requirements.yaml
index 1feea23842..b0bda362dd 100755
--- a/kubernetes/so/components/so-request-db-adapter/requirements.yaml
+++ b/kubernetes/so/components/so-request-db-adapter/requirements.yaml
@@ -18,6 +18,9 @@ dependencies:
# a part of this chart's package and will not
# be published independently to a repo (at this point)
repository: '@local'
+ - name: readinessCheck
+ version: ~6.x-0
+ repository: '@local'
- name: soHelpers
version: ~6.x-0
repository: 'file://../soHelpers'
diff --git a/kubernetes/so/components/so-request-db-adapter/templates/deployment.yaml b/kubernetes/so/components/so-request-db-adapter/templates/deployment.yaml
index 25a6842bb9..0aac5f4b48 100755
--- a/kubernetes/so/components/so-request-db-adapter/templates/deployment.yaml
+++ b/kubernetes/so/components/so-request-db-adapter/templates/deployment.yaml
@@ -39,21 +39,9 @@ spec:
app: {{ include "common.name" . }}
release: {{ include "common.release" . }}
spec:
- initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
- - command:
- - /app/ready.py
- args:
- - --job-name
- - {{ include "common.release" . }}-so-mariadb-config-job
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- name: {{ include "common.name" . }}-readiness
+ initContainers:
+ {{ include "so.certificate.container_importer" . | indent 6 | trim }}
+ {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
containers:
- name: {{ include "common.name" . }}
image: {{ include "common.repository" . }}/{{ .Values.image }}
diff --git a/kubernetes/so/components/so-request-db-adapter/values.yaml b/kubernetes/so/components/so-request-db-adapter/values.yaml
index 02b382fe72..84d2944a13 100755
--- a/kubernetes/so/components/so-request-db-adapter/values.yaml
+++ b/kubernetes/so/components/so-request-db-adapter/values.yaml
@@ -33,6 +33,10 @@ global:
serviceName: mariadb-galera
servicePort: '3306'
+readinessCheck:
+ wait_for:
+ - so-mariadb-config
+
#################################################################
# Secrets metaconfig
#################################################################