diff options
35 files changed, 274 insertions, 22 deletions
diff --git a/kubernetes/common/common/templates/_mariadb.tpl b/kubernetes/common/common/templates/_mariadb.tpl index 7492f71f0a..a2d4117e5c 100644 --- a/kubernetes/common/common/templates/_mariadb.tpl +++ b/kubernetes/common/common/templates/_mariadb.tpl @@ -74,14 +74,14 @@ */}} {{- define "common.mariadbService" -}} {{- if .Values.global.mariadbGalera.localCluster -}} - {{- if .Values.global.mariadbGalera.useOperator }} + {{- if and .Values.global.mariadbGalera.useOperator (index .Values "mariadb-galera" "mariadbOperator" "galera" "enabled") }} {{- printf "%s-primary" (index .Values "mariadb-galera" "nameOverride") -}} {{- else }} {{- index .Values "mariadb-galera" "nameOverride" -}} {{- end }} {{- else -}} - {{- if .Values.global.mariadbGalera.useOperator }} - {{- printf "%s-primary" (.Values.global.mariadbGalera.service) -}} + {{- if and .Values.global.mariadbGalera.useOperator }} + {{- printf "%s-primary" (.Values.global.mariadbGalera.service) }} {{- else }} {{- .Values.global.mariadbGalera.service -}} {{- end }} diff --git a/kubernetes/common/network-name-gen/values.yaml b/kubernetes/common/network-name-gen/values.yaml index 2ab9b93330..e028e39545 100644 --- a/kubernetes/common/network-name-gen/values.yaml +++ b/kubernetes/common/network-name-gen/values.yaml @@ -25,6 +25,8 @@ global: pullPolicy: IfNotPresent mariadbGalera: &mariadbGalera + # flag to enable the DB creation via mariadb-operator + useOperator: true #This flag allows SO to instantiate its own mariadb-galera cluster #When changing it to "true", also set "globalCluster: false" #as the dependency check will not work otherwise (Chart.yaml) diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/values.yaml b/kubernetes/dmaap/components/dmaap-dr-prov/values.yaml index 8bd5e9bdc8..0ec3176c01 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/values.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-prov/values.yaml @@ -17,6 +17,8 @@ ################################################################# global: mariadbGalera: &mariadbGalera + # flag to enable the DB creation via mariadb-operator + useOperator: true #This flag allows DMAAP-DR to instantiate its own mariadb-galera cluster localCluster: false service: mariadb-galera diff --git a/kubernetes/modeling/components/modeling-etsicatalog/values.yaml b/kubernetes/modeling/components/modeling-etsicatalog/values.yaml index 29f5430fe3..ddd82c9696 100644 --- a/kubernetes/modeling/components/modeling-etsicatalog/values.yaml +++ b/kubernetes/modeling/components/modeling-etsicatalog/values.yaml @@ -22,6 +22,8 @@ global: mountPath: /dockerdata-nfs mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true #This flag allows SO to instantiate its own mariadb-galera cluster #When changing it to "true", also set "globalCluster: false" #as the dependency check will not work otherwise (Chart.yaml) diff --git a/kubernetes/nbi/values.yaml b/kubernetes/nbi/values.yaml index f4f137a454..49c0592af2 100644 --- a/kubernetes/nbi/values.yaml +++ b/kubernetes/nbi/values.yaml @@ -19,6 +19,8 @@ global: nodePortPrefix: 302 mariadbGalera: &mariadbGalera + # flag to enable the DB creation via mariadb-operator + useOperator: true #This flag allows NBI to instantiate its own mariadb-galera cluster #When changing it to "true", also set "globalCluster: false" #as the dependency check will not work otherwise (Chart.yaml) diff --git a/kubernetes/sdnc/components/dmaap-listener/values.yaml b/kubernetes/sdnc/components/dmaap-listener/values.yaml index 33b56dcfc3..12bbdf0ab8 100644 --- a/kubernetes/sdnc/components/dmaap-listener/values.yaml +++ b/kubernetes/sdnc/components/dmaap-listener/values.yaml @@ -18,6 +18,8 @@ global: nodePortPrefix: 302 mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true #This flag allows SO to instantiate its own mariadb-galera cluster #If shared instance is used, this chart assumes that DB already exists localCluster: false @@ -81,6 +83,9 @@ mariadb-galera: persistence: enabled: true mountSubPath: dmaap-listener/maria/data + mariadbOperator: + galera: + enabled: false # default number of instances replicaCount: 1 diff --git a/kubernetes/sdnc/components/sdnc-ansible-server/values.yaml b/kubernetes/sdnc/components/sdnc-ansible-server/values.yaml index 52f23b07b6..e0e4c22a99 100644 --- a/kubernetes/sdnc/components/sdnc-ansible-server/values.yaml +++ b/kubernetes/sdnc/components/sdnc-ansible-server/values.yaml @@ -18,6 +18,8 @@ global: nodePortPrefix: 302 mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true #This flag allows SO to instantiate its own mariadb-galera cluster #If shared instance is used, this chart assumes that DB already exists localCluster: false @@ -78,6 +80,9 @@ mariadb-galera: persistence: enabled: true mountSubPath: ansible-server/maria/data + mariadbOperator: + galera: + enabled: false # default number of instances replicaCount: 1 diff --git a/kubernetes/sdnc/components/ueb-listener/values.yaml b/kubernetes/sdnc/components/ueb-listener/values.yaml index d86b58c47c..399305f4d7 100644 --- a/kubernetes/sdnc/components/ueb-listener/values.yaml +++ b/kubernetes/sdnc/components/ueb-listener/values.yaml @@ -18,6 +18,8 @@ global: nodePortPrefix: 302 mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true #This flag allows SO to instantiate its own mariadb-galera cluster #If shared instance is used, this chart assumes that DB already exists localCluster: false @@ -92,6 +94,9 @@ mariadb-galera: persistence: enabled: true mountSubPath: ueb-listener/maria/data + mariadbOperator: + galera: + enabled: false # default number of instances replicaCount: 1 diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml index 658350d107..328b5adffb 100644 --- a/kubernetes/sdnc/values.yaml +++ b/kubernetes/sdnc/values.yaml @@ -24,6 +24,8 @@ global: mountPath: /dockerdata-nfs centralizedLoggingEnabled: true mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true #This flag allows SO to instantiate its own mariadb-galera cluster #If shared instance is used, this chart assumes that DB already exists localCluster: false diff --git a/kubernetes/so/components/so-admin-cockpit/values.yaml b/kubernetes/so/components/so-admin-cockpit/values.yaml index e31645630d..2da7dd0baa 100644 --- a/kubernetes/so/components/so-admin-cockpit/values.yaml +++ b/kubernetes/so/components/so-admin-cockpit/values.yaml @@ -31,6 +31,8 @@ global: persistence: mountPath: /dockerdata-nfs mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true service: mariadb-galera servicePort: '3306' @@ -67,6 +69,15 @@ repository: nexus3.onap.org:10001 image: onap/so/so-admin-cockpit:1.9.0 pullPolicy: Always +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + db: userName: so_user userPassword: so_User123 diff --git a/kubernetes/so/components/so-bpmn-infra/values.yaml b/kubernetes/so/components/so-bpmn-infra/values.yaml index fa3c59295e..f47d142958 100755 --- a/kubernetes/so/components/so-bpmn-infra/values.yaml +++ b/kubernetes/so/components/so-bpmn-infra/values.yaml @@ -23,6 +23,8 @@ global: sdncOamService: sdnc-oam sdncOamPort: 8282 mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true service: mariadb-galera servicePort: '3306' @@ -67,6 +69,15 @@ camunda: sundayCleanupWindowStartTime: "04:00" sundayCleanupWindowEndTime: "10:00" +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + db: userName: so_user userPassword: so_User123 diff --git a/kubernetes/so/components/so-catalog-db-adapter/values.yaml b/kubernetes/so/components/so-catalog-db-adapter/values.yaml index c5bd850483..da4f9c6d35 100755 --- a/kubernetes/so/components/so-catalog-db-adapter/values.yaml +++ b/kubernetes/so/components/so-catalog-db-adapter/values.yaml @@ -59,6 +59,15 @@ secrets: image: onap/so/catalog-db-adapter:1.12.2 pullPolicy: Always +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + db: userName: so_user userPassword: so_User123 diff --git a/kubernetes/so/components/so-cnf-adapter/values.yaml b/kubernetes/so/components/so-cnf-adapter/values.yaml index 3855c19a50..f11a961c7c 100755 --- a/kubernetes/so/components/so-cnf-adapter/values.yaml +++ b/kubernetes/so/components/so-cnf-adapter/values.yaml @@ -71,6 +71,15 @@ readinessCheck: jobs: - '{{ include "common.release" . }}-so-mariadb-config-job' +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + db: userName: so_user userPassword: so_User123 diff --git a/kubernetes/so/components/so-cnfm-lcm/Chart.yaml b/kubernetes/so/components/so-cnfm-lcm/Chart.yaml index 3090dd5ae9..df3eed7bd7 100644 --- a/kubernetes/so/components/so-cnfm-lcm/Chart.yaml +++ b/kubernetes/so/components/so-cnfm-lcm/Chart.yaml @@ -24,6 +24,9 @@ dependencies: # a part of this chart's package and will not # be published independently to a repo (at this point) repository: '@local' + - name: readinessCheck + version: ~13.x-0 + repository: '@local' - name: repositoryGenerator version: ~13.x-0 repository: '@local' diff --git a/kubernetes/so/components/so-cnfm-lcm/templates/deployment.yaml b/kubernetes/so/components/so-cnfm-lcm/templates/deployment.yaml index 42d5fcfdc0..2f035db3cb 100644 --- a/kubernetes/so/components/so-cnfm-lcm/templates/deployment.yaml +++ b/kubernetes/so/components/so-cnfm-lcm/templates/deployment.yaml @@ -27,6 +27,8 @@ spec: template: metadata: {{- include "common.templateMetadata" . | nindent 6 }} spec: + initContainers: + {{ include "common.readinessCheck.waitFor" . | indent 8 | trim }} containers: - name: {{ include "common.name" . }} command: [ "./start-app.sh" ] diff --git a/kubernetes/so/components/so-cnfm-lcm/values.yaml b/kubernetes/so/components/so-cnfm-lcm/values.yaml index 2310ccebfa..0a85a10455 100644 --- a/kubernetes/so/components/so-cnfm-lcm/values.yaml +++ b/kubernetes/so/components/so-cnfm-lcm/values.yaml @@ -47,6 +47,21 @@ pullPolicy: Always aai: auth: 2A11B07DB6214A839394AA1EC5844695F5114FC407FF5422625FB00175A3DCB8A1FF745F22867EFA72D5369D599BBD88DA8BED4233CF5586 + +readinessCheck: + wait_for: + jobs: + - '{{ include "common.release" . }}-so-mariadb-config-job' + +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + db: userName: so_user userPassword: so_User123 diff --git a/kubernetes/so/components/so-etsi-nfvo-ns-lcm/Chart.yaml b/kubernetes/so/components/so-etsi-nfvo-ns-lcm/Chart.yaml index 3c87d5f65a..068686db48 100644 --- a/kubernetes/so/components/so-etsi-nfvo-ns-lcm/Chart.yaml +++ b/kubernetes/so/components/so-etsi-nfvo-ns-lcm/Chart.yaml @@ -29,6 +29,9 @@ dependencies: - name: repositoryGenerator version: ~13.x-0 repository: '@local' + - name: readinessCheck + version: ~13.x-0 + repository: '@local' - name: soHelpers version: ~13.x-0 repository: 'file://../soHelpers' diff --git a/kubernetes/so/components/so-etsi-nfvo-ns-lcm/templates/deployment.yaml b/kubernetes/so/components/so-etsi-nfvo-ns-lcm/templates/deployment.yaml index e2925f6b61..fc9528ec1e 100644 --- a/kubernetes/so/components/so-etsi-nfvo-ns-lcm/templates/deployment.yaml +++ b/kubernetes/so/components/so-etsi-nfvo-ns-lcm/templates/deployment.yaml @@ -29,6 +29,8 @@ spec: template: metadata: {{- include "common.templateMetadata" . | nindent 6 }} spec: + initContainers: + {{ include "common.readinessCheck.waitFor" . | indent 8 | trim }} containers: - name: {{ include "common.name" . }} command: diff --git a/kubernetes/so/components/so-etsi-nfvo-ns-lcm/values.yaml b/kubernetes/so/components/so-etsi-nfvo-ns-lcm/values.yaml index e86aa2129b..48e923c522 100644 --- a/kubernetes/so/components/so-etsi-nfvo-ns-lcm/values.yaml +++ b/kubernetes/so/components/so-etsi-nfvo-ns-lcm/values.yaml @@ -54,6 +54,21 @@ pullPolicy: Always aai: auth: 2A11B07DB6214A839394AA1EC5844695F5114FC407FF5422625FB00175A3DCB8A1FF745F22867EFA72D5369D599BBD88DA8BED4233CF5586 + +readinessCheck: + wait_for: + jobs: + - '{{ include "common.release" . }}-so-mariadb-config-job' + +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + db: userName: so_user userPassword: so_User123 diff --git a/kubernetes/so/components/so-etsi-sol005-adapter/values.yaml b/kubernetes/so/components/so-etsi-sol005-adapter/values.yaml index 853f019795..0d06ed7abf 100755 --- a/kubernetes/so/components/so-etsi-sol005-adapter/values.yaml +++ b/kubernetes/so/components/so-etsi-sol005-adapter/values.yaml @@ -55,6 +55,15 @@ secrets: image: onap/so/so-etsi-sol005-adapter:1.9.0 pullPolicy: Always +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + db: userName: so_user userPassword: so_User123 diff --git a/kubernetes/so/components/so-mariadb/Chart.yaml b/kubernetes/so/components/so-mariadb/Chart.yaml index f66f740b34..cb82906ad1 100755 --- a/kubernetes/so/components/so-mariadb/Chart.yaml +++ b/kubernetes/so/components/so-mariadb/Chart.yaml @@ -28,9 +28,6 @@ dependencies: - name: repositoryGenerator version: ~13.x-0 repository: '@local' - - name: readinessCheck - version: ~13.x-0 - repository: '@local' - name: serviceAccount version: ~13.x-0 repository: '@local' diff --git a/kubernetes/so/components/so-mariadb/templates/job.yaml b/kubernetes/so/components/so-mariadb/templates/job.yaml index 7be44c4201..0afe02ada7 100644 --- a/kubernetes/so/components/so-mariadb/templates/job.yaml +++ b/kubernetes/so/components/so-mariadb/templates/job.yaml @@ -101,7 +101,21 @@ spec: release: {{ include "common.release" . }} name: {{ include "common.name" . }} spec: - initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }} + initContainers: + - name: {{ include "common.name" . }}-readiness + command: + - /app/ready.py + args: + - --app-name + - {{ include "common.mariadbAppName" . }} + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: {{ include "repositoryGenerator.image.readiness" . }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} containers: - name: {{ include "common.name" . }}-config image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} diff --git a/kubernetes/so/components/so-mariadb/values.yaml b/kubernetes/so/components/so-mariadb/values.yaml index 4aa322934b..8b29e622fb 100755 --- a/kubernetes/so/components/so-mariadb/values.yaml +++ b/kubernetes/so/components/so-mariadb/values.yaml @@ -25,7 +25,9 @@ global: readinessImage: onap/oom/readiness:5.0.1 ubuntuInitRepository: docker.io mariadbGalera: - nameOverride: &mariadbName mariadb-galera + # flag to enable the DB creation via mariadb-operator + useOperator: true + nameOverride: mariadb-galera service: mariadb-galera servicePort: "3306" migration: @@ -35,11 +37,6 @@ global: dbUser: root dbPassword: secretpassword -readinessCheck: - wait_for: - apps: - - *mariadbName - ################################################################# # Secrets metaconfig ################################################################# @@ -106,6 +103,15 @@ image: mariadb:10.1.38 pullPolicy: Always ubuntuInitImage: oomk8s/ubuntu-init:2.0.0 +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + # db config db: rootPassword: secretpassword diff --git a/kubernetes/so/components/so-nssmf-adapter/values.yaml b/kubernetes/so/components/so-nssmf-adapter/values.yaml index 6562d8496a..77fe172a0d 100755 --- a/kubernetes/so/components/so-nssmf-adapter/values.yaml +++ b/kubernetes/so/components/so-nssmf-adapter/values.yaml @@ -20,6 +20,8 @@ global: persistence: mountPath: /dockerdata-nfs mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true service: mariadb-galera servicePort: '3306' @@ -72,6 +74,15 @@ secrets: image: onap/so/so-nssmf-adapter:1.9.1 pullPolicy: Always +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + db: userName: so_user userPassword: so_User123 diff --git a/kubernetes/so/components/so-oof-adapter/values.yaml b/kubernetes/so/components/so-oof-adapter/values.yaml index 74679d8a2e..967d13ebac 100755 --- a/kubernetes/so/components/so-oof-adapter/values.yaml +++ b/kubernetes/so/components/so-oof-adapter/values.yaml @@ -21,6 +21,8 @@ global: persistence: mountPath: /dockerdata-nfs mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true service: mariadb-galera servicePort: '3306' @@ -68,6 +70,15 @@ secrets: image: onap/so/so-oof-adapter:1.8.3 pullPolicy: Always +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + mso: msoKey: 07a7159d3bf51a0e53be7a8f89699be7 oof: diff --git a/kubernetes/so/components/so-openstack-adapter/values.yaml b/kubernetes/so/components/so-openstack-adapter/values.yaml index a33c68ae00..9159fda73d 100755 --- a/kubernetes/so/components/so-openstack-adapter/values.yaml +++ b/kubernetes/so/components/so-openstack-adapter/values.yaml @@ -20,6 +20,8 @@ global: persistence: mountPath: /dockerdata-nfs mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true service: mariadb-galera servicePort: '3306' @@ -55,6 +57,15 @@ secrets: image: onap/so/openstack-adapter:1.12.2 pullPolicy: Always +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + db: userName: so_user userPassword: so_User123 diff --git a/kubernetes/so/components/so-request-db-adapter/values.yaml b/kubernetes/so/components/so-request-db-adapter/values.yaml index 8774725f3e..7e2d521e8b 100755 --- a/kubernetes/so/components/so-request-db-adapter/values.yaml +++ b/kubernetes/so/components/so-request-db-adapter/values.yaml @@ -20,6 +20,8 @@ global: persistence: mountPath: /dockerdata-nfs mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true service: mariadb-galera servicePort: '3306' @@ -55,6 +57,15 @@ secrets: image: onap/so/request-db-adapter:1.12.2 pullPolicy: Always +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + db: userName: so_user userPassword: so_User123 diff --git a/kubernetes/so/components/so-sdc-controller/values.yaml b/kubernetes/so/components/so-sdc-controller/values.yaml index 5805621668..cab0d44c4a 100755 --- a/kubernetes/so/components/so-sdc-controller/values.yaml +++ b/kubernetes/so/components/so-sdc-controller/values.yaml @@ -20,6 +20,8 @@ global: persistence: mountPath: /dockerdata-nfs mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true service: mariadb-galera servicePort: '3306' soSdcListenerKafkaUser: so-sdc-list-user @@ -56,6 +58,15 @@ secrets: image: onap/so/sdc-controller:1.12.2 pullPolicy: Always +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + db: userName: so_user userPassword: so_User123 diff --git a/kubernetes/so/components/so-sdnc-adapter/values.yaml b/kubernetes/so/components/so-sdnc-adapter/values.yaml index 345f8746d8..8e6c044cc6 100755 --- a/kubernetes/so/components/so-sdnc-adapter/values.yaml +++ b/kubernetes/so/components/so-sdnc-adapter/values.yaml @@ -23,6 +23,8 @@ global: sdncOamService: sdnc-oam sdncOamPort: 8282 mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true service: mariadb-galera servicePort: '3306' @@ -80,6 +82,15 @@ mso: requestDb: auth: Basic YnBlbDpwYXNzd29yZDEk +# Local mariadb galera instance default name +mariadb-galera: + nameOverride: so-mariadb-galera + service: + internalPort: 3306 + mariadbOperator: + galera: + enabled: false + db: userName: so_user userPassword: so_User123 diff --git a/kubernetes/so/values.yaml b/kubernetes/so/values.yaml index c252938943..229decdf38 100755 --- a/kubernetes/so/values.yaml +++ b/kubernetes/so/values.yaml @@ -21,12 +21,12 @@ global: nodePortPrefixExt: 304 centralizedLoggingEnabled: true mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true nameOverride: mariadb-galera servicePort: '3306' service: mariadb-galera internalPort: '3306' - # mariadbRootPassword: secretpassword - # rootPasswordExternalSecret: some secret #This flag allows SO to instantiate its own mariadb-galera cluster, #serviceName and nameOverride should be so-mariadb-galera if this flag is enabled localCluster: false @@ -62,11 +62,19 @@ secrets: - uid: db-root-pass name: &dbRootPassSecretName '{{ include "common.release" . }}-so-db-root-pass' type: password - externalSecret: '{{ .Values.global.mariadbGalera.localCluster | ternary - .Values.global.mariadbGalera.rootPasswordExternalSecret - (default (include "common.mariadb.secret.rootPassSecretName" - (dict "dot" . "chartName" .Values.global.mariadbGalera.nameOverride)) - .Values.global.mariadbGalera.rootPasswordExternalSecret) }}' + # If we're using shared mariadb, we need to use the secret name (second + # part). + # If not, we do the same trick than for user db secret hat allows you + # override this secret using external one with the same field that is used + # to pass this to subchart. + externalSecret: '{{ .Values.global.mariadbGalera.localCluster | + ternary ((hasSuffix "so-db-root-pass" (index .Values "mariadb-galera" "rootUser" "externalSecret")) | + ternary + "" + (tpl (default "" (index .Values "mariadb-galera" "rootUser" "externalSecret")) .)) + (include "common.mariadb.secret.rootPassSecretName" + (dict "dot" . + "chartName" .Values.global.mariadbGalera.nameOverride)) }}' password: '{{ .Values.global.mariadbGalera.mariadbRootpassword }}' - uid: db-backup-creds name: &dbBackupCredsSecretName '{{ include "common.release" . }}-so-db-backup-creds' @@ -578,11 +586,15 @@ config: # --set so.global.mariadbGalera.localCluster=true \ # --set so.global.mariadbGalera.nameOverride=so-mariadb-galera \ # --set so.global.mariadbGalera.serviceName=so-mariadb-galera -mariadb-galera: +mariadb-galera: &mariadbGalera rootUser: externalSecret: *dbRootPassSecretName nameOverride: &so-mariadb so-mariadb-galera replicaCount: 1 + service: + name: *so-mariadb + portName: *so-mariadb + internalPort: 3306 mariadbOperator: galera: enabled: false @@ -633,17 +645,23 @@ mso: auth: basic bXNvX2FkbWlufHBhc3N3b3JkMSQ= so-bpmn-infra: + mariadb-galera: + <<: *mariadbGalera db: <<: *dbSecrets logConfigMapNamePrefix: '{{ include "common.release" . }}-so' so-catalog-db-adapter: enabled: true + mariadb-galera: + <<: *mariadbGalera db: <<: *dbSecrets so-cnf-adapter: enabled: true + mariadb-galera: + <<: *mariadbGalera db: <<: *dbSecrets server: @@ -654,24 +672,33 @@ so-cnf-adapter: so-cnfm-lcm: enabled: true + mariadb-galera: + <<: *mariadbGalera db: <<: *dbSecrets so-etsi-nfvo-ns-lcm: enabled: true + mariadb-galera: + <<: *mariadbGalera db: <<: *dbSecrets so-mariadb: + mariadb-galera: + <<: *mariadbGalera db: rootPasswordExternalSecretLocalDb: *dbRootPassSecretName - rootPasswordExternalSecret: '{{ ternary .Values.db.rootPasswordExternalSecretLocalDb (include "common.mariadb.secret.rootPassSecretName" (dict "dot" . "chartName" .Values.global.mariadbGalera.nameOverride)) .Values.global.mariadbGalera.localCluster }}' + #rootPasswordExternalSecretLocalDb: *dbRootPassSecretName + rootPasswordExternalSecret: '{{ ternary (tpl .Values.db.rootPasswordExternalSecretLocalDb .) (include "common.mariadb.secret.rootPassSecretName" (dict "dot" . "chartName" .Values.global.mariadbGalera.nameOverride)) .Values.global.mariadbGalera.localCluster }}' backupCredsExternalSecret: *dbBackupCredsSecretName userCredsExternalSecret: *dbUserCredsSecretName adminCredsExternalSecret: *dbAdminCredsSecretName so-admin-cockpit: enabled: true + mariadb-galera: + <<: *mariadbGalera db: <<: *dbSecrets @@ -680,11 +707,15 @@ so-nssmf-adapter: server: actuatorCredsExternalSecret: *actuator-secrets bpelCredsExternalSecret: *bpel-secrets + mariadb-galera: + <<: *mariadbGalera db: <<: *dbSecrets so-oof-adapter: enabled: true + mariadb-galera: + <<: *mariadbGalera db: <<: *dbSecrets mso: @@ -696,21 +727,29 @@ so-oof-adapter: so-openstack-adapter: enabled: true + mariadb-galera: + <<: *mariadbGalera db: <<: *dbSecrets logConfigMapNamePrefix: '{{ include "common.release" . }}-so' so-request-db-adapter: + mariadb-galera: + <<: *mariadbGalera db: <<: *dbSecrets so-sdc-controller: + mariadb-galera: + <<: *mariadbGalera db: <<: *dbSecrets logConfigMapNamePrefix: '{{ include "common.release" . }}-so' so-sdnc-adapter: enabled: true + mariadb-galera: + <<: *mariadbGalera db: <<: *dbSecrets mso: @@ -722,6 +761,8 @@ so-ve-vnfm-adapter: so-etsi-sol005-adapter: enabled: true + mariadb-galera: + <<: *mariadbGalera db: <<: *dbSecrets diff --git a/kubernetes/vfc/components/vfc-nslcm/values.yaml b/kubernetes/vfc/components/vfc-nslcm/values.yaml index 0cd3ce178a..613c872242 100644 --- a/kubernetes/vfc/components/vfc-nslcm/values.yaml +++ b/kubernetes/vfc/components/vfc-nslcm/values.yaml @@ -20,6 +20,8 @@ global: config: ssl_enabled: false mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true localCluster: false service: mariadb-galera internalPort: 3306 diff --git a/kubernetes/vfc/components/vfc-vnflcm/values.yaml b/kubernetes/vfc/components/vfc-vnflcm/values.yaml index fcad261817..e0f5b5ee9f 100644 --- a/kubernetes/vfc/components/vfc-vnflcm/values.yaml +++ b/kubernetes/vfc/components/vfc-vnflcm/values.yaml @@ -20,6 +20,8 @@ global: config: ssl_enabled: false mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true localCluster: false service: mariadb-galera internalPort: 3306 diff --git a/kubernetes/vfc/components/vfc-vnfmgr/values.yaml b/kubernetes/vfc/components/vfc-vnfmgr/values.yaml index 528bbe0c01..696547a6e8 100644 --- a/kubernetes/vfc/components/vfc-vnfmgr/values.yaml +++ b/kubernetes/vfc/components/vfc-vnfmgr/values.yaml @@ -20,6 +20,8 @@ global: config: ssl_enabled: false mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true localCluster: false service: mariadb-galera internalPort: 3306 diff --git a/kubernetes/vfc/components/vfc-vnfres/values.yaml b/kubernetes/vfc/components/vfc-vnfres/values.yaml index c2954d5517..452561041a 100644 --- a/kubernetes/vfc/components/vfc-vnfres/values.yaml +++ b/kubernetes/vfc/components/vfc-vnfres/values.yaml @@ -20,6 +20,8 @@ global: config: ssl_enabled: false mariadbGalera: + # flag to enable the DB creation via mariadb-operator + useOperator: true localCluster: false service: mariadb-galera internalPort: 3306 diff --git a/kubernetes/vfc/values.yaml b/kubernetes/vfc/values.yaml index 3a15165e2f..05b7eb1fa3 100644 --- a/kubernetes/vfc/values.yaml +++ b/kubernetes/vfc/values.yaml @@ -30,6 +30,8 @@ global: persistence: mountPath: /dockerdata-nfs mariadbGalera: &mariadbGalera + # flag to enable the DB creation via mariadb-operator + useOperator: true #This flag allows VFC to instantiate its own mariadb-galera cluster localCluster: false service: mariadb-galera @@ -59,6 +61,10 @@ mariadb-galera: &localMariadb # password: externalSecret: *dbRootPassSecret nameOverride: &dbServer vfc-mariadb + service: + name: *dbServer + portName: *dbServer + internalPort: 3306 nfsprovisionerPrefix: vfc persistence: mountSubPath: vfc/data |