diff options
author | Andreas Geissler <andreas-geissler@telekom.de> | 2022-04-29 13:33:02 +0200 |
---|---|---|
committer | Andreas Geissler <andreas-geissler@telekom.de> | 2022-05-19 17:28:20 +0200 |
commit | 17be962a2bd43768a41705f0d009166e2894d82d (patch) | |
tree | e828b54a3daa6286b6884ff974d19fb3e208f552 /kubernetes/so/components/so-mariadb | |
parent | 618cfffd44e5a9d187e6a89586b00fb0737f81a7 (diff) |
[SO] Service mesh compatibility
Patch on SO charts dedicated to allign the service port names
according to Istio naming schema.
Change the mariadb job to wait for the sidecar and kill it afterwards.
Remove CertInitializer TLS job, if AAF is not enabled
Added all missing changed from https://gerrit.onap.org/r/c/oom/+/124231
Issue-ID: OOM-2824
Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
Change-Id: I5b333ab19673ad248fd2e3bd138a99fe15025f5e
Diffstat (limited to 'kubernetes/so/components/so-mariadb')
-rw-r--r-- | kubernetes/so/components/so-mariadb/templates/job.yaml | 9 | ||||
-rwxr-xr-x | kubernetes/so/components/so-mariadb/values.yaml | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/kubernetes/so/components/so-mariadb/templates/job.yaml b/kubernetes/so/components/so-mariadb/templates/job.yaml index 2a84fac247..d9c6009c8a 100644 --- a/kubernetes/so/components/so-mariadb/templates/job.yaml +++ b/kubernetes/so/components/so-mariadb/templates/job.yaml @@ -53,13 +53,17 @@ spec: command: - /bin/bash - -c - - mysqldump -vv --user=${DB_USER} --password=${DB_PASS} --host=${DB_HOST} --port=${DB_PORT} --databases --single-transaction --quick --lock-tables=false catalogdb requestdb nfvo > /var/data/mariadb/backup-`date +%s`.sql + - | + {{- if include "common.onServiceMesh" . }} + echo "waiting 15s for istio side cars to be up"; sleep 15s;{{- end }} + mysqldump -vv --user=${DB_USER} --password=${DB_PASS} --host=${DB_HOST} --port=${DB_PORT} --databases --single-transaction --quick --lock-tables=false catalogdb requestdb nfvo > /var/data/mariadb/backup-`date +%s`.sql volumeMounts: - mountPath: /etc/localtime name: localtime readOnly: true - name: backup-storage mountPath: /var/data/mariadb + {{ include "common.waitForJobContainer" . | indent 6 | trim }} serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} volumes: - name: localtime @@ -105,6 +109,8 @@ spec: - /bin/bash - -c - > + {{- if include "common.onServiceMesh" . }} + echo "waiting 15s for istio side cars to be up"; sleep 15s;{{- end }} mysql() { /usr/bin/mysql -h ${DB_HOST} -P ${DB_PORT} "$@"; }; export -f mysql; mysql --user=root --password=${MYSQL_ROOT_PASSWORD} requestdb -e exit > /dev/null 2>&1 {{ if not .Values.global.migration.enabled }} && echo "Database already initialized!!!" && exit 0 {{ end }}; @@ -157,6 +163,7 @@ spec: {{- end }} resources: {{ include "common.resources" . | indent 12 }} + {{ include "common.waitForJobContainer" . | indent 6 | trim }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} diff --git a/kubernetes/so/components/so-mariadb/values.yaml b/kubernetes/so/components/so-mariadb/values.yaml index 58e34b78d6..13dd0868e8 100755 --- a/kubernetes/so/components/so-mariadb/values.yaml +++ b/kubernetes/so/components/so-mariadb/values.yaml @@ -21,7 +21,7 @@ global: nodePortPrefix: 302 nodePortPrefixExt: 304 repository: nexus3.onap.org:10001 - readinessImage: onap/oom/readiness:3.0.1 + readinessImage: onap/oom/readiness:4.1.0 ubuntuInitRepository: docker.io mariadbGalera: nameOverride: &mariadbName mariadb-galera @@ -187,3 +187,7 @@ serviceAccount: nameOverride: so-mariadb roles: - read + +wait_for_job_container: + containers: + - '{{ include "common.name" . }}-config' |