aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/so/components/so-mariadb
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/so/components/so-mariadb')
-rwxr-xr-xkubernetes/so/components/so-mariadb/requirements.yaml3
-rw-r--r--kubernetes/so/components/so-mariadb/templates/job.yaml18
-rwxr-xr-xkubernetes/so/components/so-mariadb/values.yaml7
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
#################################################################