diff options
author | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2020-10-30 14:32:03 +0100 |
---|---|---|
committer | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2020-11-02 16:49:49 +0000 |
commit | d055a17d87b9e6bbfde51f523eea1838bc6b40dd (patch) | |
tree | 2e2a04467c315f0dd25363602fbae6c5f98bc132 /kubernetes/so/components/so-mariadb | |
parent | 92b606b267cf7e48336f3383bfb459253052c88c (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-mariadb')
-rwxr-xr-x | kubernetes/so/components/so-mariadb/requirements.yaml | 3 | ||||
-rw-r--r-- | kubernetes/so/components/so-mariadb/templates/job.yaml | 18 | ||||
-rwxr-xr-x | kubernetes/so/components/so-mariadb/values.yaml | 7 |
3 files changed, 11 insertions, 17 deletions
diff --git a/kubernetes/so/components/so-mariadb/requirements.yaml b/kubernetes/so/components/so-mariadb/requirements.yaml index 2eb32d00ed..22d6333253 100755 --- a/kubernetes/so/components/so-mariadb/requirements.yaml +++ b/kubernetes/so/components/so-mariadb/requirements.yaml @@ -18,3 +18,6 @@ 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' diff --git a/kubernetes/so/components/so-mariadb/templates/job.yaml b/kubernetes/so/components/so-mariadb/templates/job.yaml index cb7fcb352a..b3bacc1ed4 100644 --- a/kubernetes/so/components/so-mariadb/templates/job.yaml +++ b/kubernetes/so/components/so-mariadb/templates/job.yaml @@ -95,23 +95,9 @@ 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.mariadbGalera.nameOverride }} - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}" - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }} containers: - - name: {{ include "common.name" . }} + - name: {{ include "common.name" . }}-config image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: diff --git a/kubernetes/so/components/so-mariadb/values.yaml b/kubernetes/so/components/so-mariadb/values.yaml index 9ecf3b0ca6..809dff77a7 100755 --- a/kubernetes/so/components/so-mariadb/values.yaml +++ b/kubernetes/so/components/so-mariadb/values.yaml @@ -24,7 +24,7 @@ global: readinessImage: onap/oom/readiness:3.0.1 ubuntuInitRepository: registry.hub.docker.com mariadbGalera: - nameOverride: mariadb-galera + nameOverride: &mariadbName mariadb-galera serviceName: mariadb-galera servicePort: "3306" migration: @@ -33,6 +33,11 @@ global: dbPort: 3306 dbUser: root dbPassword: secretpassword + +readinessCheck: + wait_for: + - *mariadbName + ################################################################# # Secrets metaconfig ################################################################# |