In case 2 DB Users are created with the same name, e.g.
- sdnctl (CDS)
- sdnctl (SDNC)
and the _mariadb.tpl creates the same resource names, it will fail.
Solution is offered by the mariadb-operator by using "spec.name" value
https://github.com/mariadb-operator/mariadb-operator/blob/main/examples/manifests/mariadb_v1alpha1_database.yaml
apiVersion: mariadb.mmontes.io/v1alpha1
kind: Database
metadata:
name: data-test
spec:
# If you want the database to be created with a different name than the resource name
# name: data-custom
mariaDbRef:
name: mariadb
characterSet: utf8
collate: utf8_general_ci
retryInterval: 5s
https://github.com/mariadb-operator/mariadb-operator/blob/main/examples/manifests/mariadb_v1alpha1_user.yaml
apiVersion: mariadb.mmontes.io/v1alpha1
kind: User
metadata:
name: user
spec:
# If you want the user to be created with a different name than the resource name
# name: user-custom
mariaDbRef:
name: mariadb
passwordSecretKeyRef:
name: user
key: password
# This field is immutable and defaults to 10
maxUserConnections: 20
host: "%"
retryInterval: 5s
<!-- Thank you for creating a Bug on OOM. -->
<!-- remove all lines by doing what's expected and not expected when started by <!-- -->
<!-- Please fill the following template so we can efficiently move on: -->
SUMMARY
<!--- Explain the problem briefly below -->
OS / ENVIRONMENT
- Kubernetes version:
<!-- output of `kubernetes version` -->
- Helm version:
<!-- output of `helm version` -->
- Kubernetes mode of installation:
<!-- add also configuration file if relevant -->
<!-- please run:
docker run -e DEPLOY_SCENARIO=k8s-test \
-v <the kube config>:/root/.kube/config \
opnfv/functest-kubernetes-healthcheck:latest
-->
<!-- and upload the result directory as a zip file -->
- CNI Used for Kubernetes:
- type of installation: <!-- number of control, number of nodes -->
OOM VERSION
<!--- which branch / tag did you use -->
CONFIGURATION
<!-- please paste or upload override file used -->
STEPS TO REPRODUCE
<!-- please show line used to create helm charts -->
<!-- please show line used to deploy ONAP -->
<!-- add any necessary relevant command done -->
EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
ACTUAL RESULTS
<!--- Describe what actually happened. -->
<!-- please run: docker run -v <the kube config>:/root/.kube/config -v \
<result directory>:/var/lib/xtesting/results \ registry.gitlab.com/orange-opensource/lfn/onap/integration/xtesting/infra-healthcheck:latest
-->
<!-- and upload the result directory as a zip file -->
<!-- cd where/your/oom/install is -->
<!-- launch healthchecks: ./kubernetes/robot/ete-k8s.sh YOUR_DEPLOYMENT_NAME health -->
<!-- and upload the result directory as a zip file -->
<!-- it should be /dockerdata-nfs/onap/robot/logs/0000_ete_health/ (0000 must be the biggest number) -->