[MARIADB] Update mariadb template to the 0.21.0 Operator 53/136153/7
authorAndreas Geissler <andreas-geissler@telekom.de>
Thu, 12 Oct 2023 08:16:29 +0000 (10:16 +0200)
committerAndreas Geissler <andreas-geissler@telekom.de>
Mon, 16 Oct 2023 06:15:36 +0000 (08:15 +0200)
In the mariadb-operator version 0.21.0 changes to the CRDs
have been done, which require a change in the template.
see: https://github.com/mariadb-operator/mariadb-operator/pull/248
PeerAuthentication depends on galera setting (not know why)

Issue-ID: OOM-3236

Change-Id: Iaf3cd7128e4c9889c1d56b9b83a72a352e60a39d
Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
docs/sections/guides/infra_guides/oom_infra_base_config_setup.rst
docs/sections/guides/infra_guides/oom_infra_deployment_requirements.rst
docs/sections/guides/infra_guides/oom_infra_optional_addons.rst
kubernetes/common/common/templates/_mariadb.tpl
kubernetes/common/mariadb-galera/templates/service.yaml
kubernetes/common/mariadb-galera/values.yaml

index e84f578..8f74ea9 100644 (file)
@@ -123,7 +123,7 @@ Set the default StorageClass
 In some ONAP components it is important to have a default storageClass defined (e.g. cassandra),
 if you don't want to explicitly set it during the deployment via helm overrides.
 
-Therefor you should set the default storageClass (if not done during the K8S cluster setup) via the command:
+Therefor you should set the default storageClass (if not done during the K8S cluster setup) via the command::
 
     > kubectl patch storageclass <storageclass> -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
 
@@ -338,7 +338,7 @@ Gateway-API
 Keycloak Installation
 ---------------------
 
-- Add helm repositories
+- Add helm repositories::
 
   > helm repo add bitnami https://charts.bitnami.com/bitnami
 
@@ -346,7 +346,7 @@ Keycloak Installation
 
   > helm repo update
 
-- create keycloak namespace
+- create keycloak namespace::
 
   > kubectl create namespace keycloak
   > kubectl label namespace keycloak istio-injection=enabled
@@ -362,7 +362,7 @@ Install Keycloak-Database
       .. include:: ../../resources/yaml/keycloak-db-values.yaml
          :code: yaml
 
-- Install the Postgres DB
+- Install the Postgres DB::
 
   > helm -n keycloak upgrade -i keycloak-db bitnami/postgresql --values ./keycloak-db-values.yaml
 
@@ -377,7 +377,7 @@ Configure Keycloak
       .. include:: ../../resources/yaml/keycloak-server-values.yaml
          :code: yaml
 
-- Install keycloak
+- Install keycloak::
 
   > helm -n keycloak upgrade -i keycloak codecentric/keycloak --values ./keycloak-server-values.yaml
 
index e21c4b6..e46bee1 100644 (file)
@@ -64,10 +64,10 @@ The versions of software that are supported by OOM are as follows:
 
 .. table:: OOM Software Requirements (optional)
 
-  ==============     ================= ==========
-  Release            Prometheus Stack  K8ssandra
-  ==============     ================= ==========
+  ==============     ================= ========== =================
+  Release            Prometheus Stack  K8ssandra  MariaDB-Operator
+  ==============     ================= ========== =================
   Kohn               35.x
   London             45.x              1.6.1
-  Montreal           45.x              1.8.0
-  ==============     ================= ==========
+  Montreal           45.x              1.9.1      0.21.0
+  ==============     ================= ========== =================
index 71ce344..de26d11 100644 (file)
@@ -112,7 +112,7 @@ For setup the K8ssandra operator is used, see `K8ssandra setup guide`_
 
     > kubectl label namespace k8ssandra-operator istio-injection=enabled
 
-- Install the k8ssandra-operator::
+- Install the k8ssandra-operator replacing the <recommended-version> with the version defined in the :ref:`versions_table` table::
 
     > helm repo add k8ssandra https://helm.k8ssandra.io/stable
 
@@ -120,6 +120,7 @@ For setup the K8ssandra operator is used, see `K8ssandra setup guide`_
 
     > helm install k8ssandra-operator --namespace k8ssandra-operator
       k8ssandra/k8ssandra-operator --set global.clusterScoped=true
+      --version=<recommended-version>
 
 Mariadb-Operator Installation
 -----------------------------
@@ -135,7 +136,7 @@ For setup the Mariadb-Operator is used, see `Mariadb-Operator setup guide`_
 
     > kubectl label namespace mariadb-operator istio-injection=enabled
 
-- Install the mariadb-operator::
+- Install the mariadb-operator replacing the <recommended-version> with the version defined in the :ref:`versions_table` table::::
 
     > helm repo add mariadb-operator https://mariadb-operator.github.io/mariadb-operator
 
@@ -143,6 +144,8 @@ For setup the Mariadb-Operator is used, see `Mariadb-Operator setup guide`_
 
     > helm install mariadb-operator --namespace mariadb-operator
       mariadb-operator/mariadb-operator --set ha.enabled=true
+      --set metrics.enabled=true --set webhook.certificate.certManager=true
+      --version=<recommended-version>
 
 
 Kserve Installation
index 7e127e2..5e0aed5 100644 (file)
@@ -126,6 +126,7 @@ spec:
     name: {{ $dbinst }}
   characterSet: utf8
   collate: utf8_general_ci
+  retryInterval: 5s
 {{- end -}}
 
 {{/*
@@ -151,6 +152,7 @@ spec:
     key: password
   # This field is immutable and defaults to 10
   maxUserConnections: 100
+  retryInterval: 5s
 {{- end -}}
 
 {{/*
@@ -174,6 +176,7 @@ spec:
   database: {{ $dbname }}
   table: "*"
   username: {{ $dbuser }}
+  retryInterval: 5s
   grantOption: true
 {{- end -}}
 
@@ -241,27 +244,20 @@ spec:
   rootPasswordSecretKeyRef:
     name: {{ $dbrootsecret }}
     key: password
-  image:
-    repository: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.mariadbOperator.image }}
-    tag: {{ $dot.Values.mariadbOperator.appVersion }}
-    pullPolicy: IfNotPresent
+  image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.mariadbOperator.image }}:{{ $dot.Values.mariadbOperator.appVersion }}
+  imagePullPolicy: IfNotPresent
   imagePullSecrets:
     - name: {{ include "common.namespace" . }}-docker-registry-key
   port: 3306
   replicas: {{ $dot.Values.replicaCount }}
+  {{- if $dot.Values.mariadbOperator.galera.enabled }}
   galera:
-    {{- if eq (int $dot.Values.replicaCount) 1 }}
-    enabled: false
-    {{- else }}
-    enabled: {{ $dot.Values.mariadbOperator.galera.enabled }}
-    {{- end }}
+    enabled: true
     sst: mariabackup
     replicaThreads: 1
     agent:
-      image:
-        repository: {{ include "repositoryGenerator.githubContainerRegistry" . }}/{{ .Values.mariadbOperator.galera.agentImage }}
-        tag: {{ $dot.Values.mariadbOperator.galera.agentVersion }}
-        pullPolicy: IfNotPresent
+      image: {{ include "repositoryGenerator.githubContainerRegistry" . }}/{{ .Values.mariadbOperator.galera.agentImage }}:{{ $dot.Values.mariadbOperator.galera.agentVersion }}
+      imagePullPolicy: IfNotPresent
       port: 5555
       kubernetesAuth:
         enabled: true
@@ -274,16 +270,15 @@ spec:
       podRecoveryTimeout: 5m
       podSyncTimeout: 10m
     initContainer:
-      image:
-        repository: {{ include "repositoryGenerator.githubContainerRegistry" . }}/{{ $dot.Values.mariadbOperator.galera.initImage }}
-        tag: {{ $dot.Values.mariadbOperator.galera.initVersion }}
-        pullPolicy: IfNotPresent
+      image: {{ include "repositoryGenerator.githubContainerRegistry" . }}/{{ $dot.Values.mariadbOperator.galera.initImage }}:{{ $dot.Values.mariadbOperator.galera.initVersion }}
+      imagePullPolicy: IfNotPresent
     volumeClaimTemplate:
       resources:
         requests:
           storage: 50Mi
       accessModes:
         - ReadWriteOnce
+  {{- end }}
   livenessProbe:
     exec:
       command:
@@ -334,11 +329,11 @@ spec:
   resources: {{ include "common.resources" . | nindent 4 }}
   volumeClaimTemplate:
     {{- if $dot.Values.mariadbOperator.storageClassName }}
-    storageClassName: {{ $dot.Values.k8ssandraOperator.persistence.storageClassName }}
+    storageClassName: {{ $dot.Values.mariadbOperator.storageClassName }}
     {{- end }}
     resources:
       requests:
-        storage: {{ $dot.Values.persistence.size | quote }}
+        storage: {{ $dot.Values.mariadbOperator.persistence.size | quote }}
     accessModes:
       - ReadWriteOnce
 {{-  if $dot.Values.db.user }}
index 2dea4e9..e1a9105 100644 (file)
@@ -34,6 +34,10 @@ spec:
       app: {{ include "common.servicename" . }}
   portLevelMtls:
     '{{ .Values.service.internalPort }}':
+{{-     if .Values.mariadbOperator.galera.enabled }}
       mode: STRICT
+{{-     else }}
+      mode: DISABLE
+{{-     end }}
 {{-   end }}
 {{- end }}
index a749c09..1ad72e2 100644 (file)
@@ -57,12 +57,15 @@ secrets:
 mariadbOperator:
   image: mariadb
   appVersion: 11.1.2
+  persistence:
+    #storageClassName: default
+    size: 3Gi
   galera:
     enabled: true
     agentImage: mariadb-operator/agent
-    agentVersion: v0.0.2
+    agentVersion: v0.0.3
     initImage: mariadb-operator/init
-    initVersion: v0.0.5
+    initVersion: v0.0.6
 
 ## String to partially override common.names.fullname template (will maintain the release name)
 ##