From cfd8434fe9484b9219560159094b174421d6d6a2 Mon Sep 17 00:00:00 2001 From: Andreas Geissler Date: Wed, 16 Aug 2023 17:18:49 +0200 Subject: [MARIADB][COMMON] Add support for mariadb-operator Add template functions for the mariadb-operator resources and update the mariadb-galera chart to support them Change the flag to "useOperator" in cassandra to the global setup and additional labels for cassandra resources Changed Policy DB users to support the new mariadb User and fixed db.sh script to wait for the DB user creation Use the new readiness image 5.0.1 with the "app-name" option Change the MariaDB-Galera Service to the "primary" to avoid Deadlocks Fix previous SDNC patch (https://gerrit.onap.org/r/c/oom/+/135308) and temporary disable MariaDB for SDNR, as it is not compatible to MariaDB 11 Issue-ID: OOM-3236 Change-Id: Ie63fcc9c6d5fa802d38c592b449e7ff8553c2ab9 Signed-off-by: Andreas Geissler --- kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml | 4 ++++ kubernetes/common/mariadb-galera/templates/backup/pv.yaml | 3 +++ kubernetes/common/mariadb-galera/templates/backup/pvc.yaml | 3 +++ 3 files changed, 10 insertions(+) (limited to 'kubernetes/common/mariadb-galera/templates/backup') diff --git a/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml b/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml index e2a9ca64cf..4548626dd3 100644 --- a/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml +++ b/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml @@ -15,6 +15,9 @@ # limitations under the License. */}} +{{- if and .Values.backup.enabled .Values.global.mariadbGalera.useOperator }} +{{ include "common.mariadbOpBackup" . }} +{{ else }} {{- if and .Values.backup.enabled .Values.persistence.enabled }} apiVersion: batch/v1beta1 kind: CronJob @@ -180,3 +183,4 @@ spec: - name: tmp emptyDir: {} {{- end }} +{{- end }} diff --git a/kubernetes/common/mariadb-galera/templates/backup/pv.yaml b/kubernetes/common/mariadb-galera/templates/backup/pv.yaml index 30eb74b059..d5e26109e7 100644 --- a/kubernetes/common/mariadb-galera/templates/backup/pv.yaml +++ b/kubernetes/common/mariadb-galera/templates/backup/pv.yaml @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. */}} + +{{- if not .Values.global.mariadbGalera.useOperator }} {{- if .Values.backup.enabled }} {{- if and .Values.backup.persistence.enabled (not .Values.backup.persistence.existingClaim) -}} {{- if eq "True" (include "common.needPV" .) -}} @@ -41,3 +43,4 @@ spec: {{- end -}} {{- end -}} {{- end -}} +{{- end -}} diff --git a/kubernetes/common/mariadb-galera/templates/backup/pvc.yaml b/kubernetes/common/mariadb-galera/templates/backup/pvc.yaml index 5dd8a3f52f..4c2bfcd389 100644 --- a/kubernetes/common/mariadb-galera/templates/backup/pvc.yaml +++ b/kubernetes/common/mariadb-galera/templates/backup/pvc.yaml @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. */}} + +{{- if not .Values.global.mariadbGalera.useOperator }} {{- if .Values.backup.enabled }} {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} --- @@ -45,3 +47,4 @@ spec: {{- end -}} {{- end -}} {{- end -}} +{{- end -}} \ No newline at end of file -- cgit 1.2.3-korg