aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Geissler <andreas-geissler@telekom.de>2023-12-14 13:37:39 +0100
committerAndreas Geissler <andreas-geissler@telekom.de>2023-12-14 19:13:16 +0100
commit72caf09f07b4530e1bb34be348c4b845c9d0bfde (patch)
tree98536c5c2282db60baec7f09d35d716438849f27
parent8cb16a6b59d8501808d62bb558f76f161b53d3e9 (diff)
[MARIADB] Fix db/user creation in operator
Fix the resource names for db/user in mariadb template for the mariadb-operator and corrected the resource notation to work with ArgoCD Added missing "user" entry for mariadb-galera in NBI and Etsicatalog values.yaml and missing dbName in SDNC Issue-ID: OOM-3255 Issue-ID: OOM-3257 Change-Id: Ib11c20ce99bdd7f29415611d2c0795466415eea6 Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
-rw-r--r--kubernetes/common/common/templates/_mariadb.tpl16
-rw-r--r--kubernetes/common/mariadb-galera/values.yaml6
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/values.yaml3
-rw-r--r--kubernetes/nbi/values.yaml3
-rw-r--r--kubernetes/sdnc/values.yaml1
5 files changed, 16 insertions, 13 deletions
diff --git a/kubernetes/common/common/templates/_mariadb.tpl b/kubernetes/common/common/templates/_mariadb.tpl
index ff3f7f88c3..7492f71f0a 100644
--- a/kubernetes/common/common/templates/_mariadb.tpl
+++ b/kubernetes/common/common/templates/_mariadb.tpl
@@ -128,8 +128,9 @@
apiVersion: mariadb.mmontes.io/v1alpha1
kind: Database
metadata:
- name: {{ $dbname }}
+ name: {{ $dbinst }}-{{ $dbname }}
spec:
+ name: {{ $dbname }}
mariaDbRef:
name: {{ $dbinst }}
characterSet: utf8
@@ -149,10 +150,9 @@ spec:
apiVersion: mariadb.mmontes.io/v1alpha1
kind: User
metadata:
- name: {{ $dbuser }}
+ name: {{ $dbinst }}-{{ $dbuser }}
spec:
- # If you want the user to be created with a different name than the resource name
- # name: user-custom
+ name: {{ $dbuser }}
mariaDbRef:
name: {{ $dbinst }}
passwordSecretKeyRef:
@@ -273,10 +273,10 @@ spec:
gracefulShutdownTimeout: 5s
recovery:
enabled: true
- clusterHealthyTimeout: 5m
- clusterBootstrapTimeout: 10m
- podRecoveryTimeout: 5m
- podSyncTimeout: 10m
+ clusterHealthyTimeout: 5m0s
+ clusterBootstrapTimeout: 10m0s
+ podRecoveryTimeout: 5m0s
+ podSyncTimeout: 10m0s
initContainer:
image: {{ include "repositoryGenerator.githubContainerRegistry" . }}/{{ $dot.Values.mariadbOperator.galera.initImage }}:{{ $dot.Values.mariadbOperator.galera.initVersion }}
imagePullPolicy: IfNotPresent
diff --git a/kubernetes/common/mariadb-galera/values.yaml b/kubernetes/common/mariadb-galera/values.yaml
index 1ad72e2956..991c635749 100644
--- a/kubernetes/common/mariadb-galera/values.yaml
+++ b/kubernetes/common/mariadb-galera/values.yaml
@@ -564,17 +564,17 @@ flavor: small
resources:
small:
limits:
- cpu: 1
+ cpu: '1'
memory: 4Gi
requests:
cpu: 500m
memory: 2Gi
large:
limits:
- cpu: 2
+ cpu: '2'
memory: 6Gi
requests:
- cpu: 1
+ cpu: '1'
memory: 3Gi
unlimited: {}
diff --git a/kubernetes/modeling/components/modeling-etsicatalog/values.yaml b/kubernetes/modeling/components/modeling-etsicatalog/values.yaml
index 884c6da599..29f5430fe3 100644
--- a/kubernetes/modeling/components/modeling-etsicatalog/values.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/values.yaml
@@ -57,6 +57,7 @@ secrets:
mariadb-galera:
db:
+ user: &dbUser etsicatalog
externalSecret: *dbSecretName
name: &mysqlDbName etsicatalog
nameOverride: &modeling-db modeling-db
@@ -106,7 +107,7 @@ config:
#application configuration user password about mariadb
db:
- userName: etsicatalog
+ userName: *dbUser
# userPassword: password
# userCredentialsExternalSecret: some-secret
diff --git a/kubernetes/nbi/values.yaml b/kubernetes/nbi/values.yaml
index ac97d79bba..f4f137a454 100644
--- a/kubernetes/nbi/values.yaml
+++ b/kubernetes/nbi/values.yaml
@@ -63,12 +63,13 @@ config:
openStackRegion: RegionOne
openStackVNFTenantId: 31047205ce114b60833b23e400d6a535
db:
- userName: rene
+ userName: &dbuser rene
# userPassword: password
# userCredentialsExternalSecret: some-secret
mariadb-galera:
db:
+ user: *dbuser
externalSecret: *dbUserSecretName
name: &mysqlDbName nbi
service:
diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml
index 2b01a0ba1f..658350d107 100644
--- a/kubernetes/sdnc/values.yaml
+++ b/kubernetes/sdnc/values.yaml
@@ -416,6 +416,7 @@ mariadb-galera: &mariadbGalera
rootUser:
externalSecret: *rootDbSecret
db:
+ name: *sdncDbName
user: *dbUser
externalSecret: *dbSecretName
service: