Merge "[DMaaP MR] Use HTTPS only for external traffic"
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Mon, 9 Mar 2020 17:46:02 +0000 (17:46 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 9 Mar 2020 17:46:02 +0000 (17:46 +0000)
36 files changed:
kubernetes/cds/charts/cds-blueprints-processor/values.yaml
kubernetes/common/common/templates/_secret.yaml
kubernetes/dcaegen2/components/dcae-bootstrap/resources/config/k8s-plugin.json
kubernetes/dcaegen2/components/dcae-bootstrap/templates/deployment.yaml
kubernetes/dcaegen2/components/dcae-bootstrap/values.yaml
kubernetes/dcaegen2/components/dcae-cloudify-manager/values.yaml
kubernetes/dcaegen2/components/dcae-dashboard/values.yaml
kubernetes/dcaegen2/components/dcae-inventory-api/templates/deployment.yaml
kubernetes/dcaegen2/components/dcae-inventory-api/values.yaml
kubernetes/dcaegen2/values.yaml
kubernetes/dmaap/components/dmaap-dr-node/values.yaml
kubernetes/dmaap/components/dmaap-dr-prov/values.yaml
kubernetes/esr/charts/esr-server/values.yaml
kubernetes/robot
kubernetes/so/charts/so-bpmn-infra/resources/config/overrides/override.yaml
kubernetes/so/charts/so-catalog-db-adapter/templates/deployment.yaml
kubernetes/so/charts/so-catalog-db-adapter/templates/secret.yaml [new file with mode: 0644]
kubernetes/so/charts/so-catalog-db-adapter/values.yaml
kubernetes/so/charts/so-sdnc-adapter/resources/config/overrides/override.yaml
kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml
kubernetes/vfc/charts/vfc-catalog/templates/secrets.yaml [new file with mode: 0644]
kubernetes/vfc/charts/vfc-catalog/values.yaml
kubernetes/vfc/charts/vfc-nslcm/templates/deployment.yaml
kubernetes/vfc/charts/vfc-nslcm/templates/secrets.yaml [new file with mode: 0644]
kubernetes/vfc/charts/vfc-nslcm/values.yaml
kubernetes/vfc/charts/vfc-vnflcm/templates/deployment.yaml
kubernetes/vfc/charts/vfc-vnflcm/templates/secrets.yaml [new file with mode: 0644]
kubernetes/vfc/charts/vfc-vnflcm/values.yaml
kubernetes/vfc/charts/vfc-vnfmgr/templates/deployment.yaml
kubernetes/vfc/charts/vfc-vnfmgr/templates/secrets.yaml [new file with mode: 0644]
kubernetes/vfc/charts/vfc-vnfmgr/values.yaml
kubernetes/vfc/charts/vfc-vnfres/templates/deployment.yaml
kubernetes/vfc/charts/vfc-vnfres/templates/secrets.yaml [new file with mode: 0644]
kubernetes/vfc/charts/vfc-vnfres/values.yaml
kubernetes/vfc/templates/secrets.yaml [new file with mode: 0644]
kubernetes/vfc/values.yaml

index 35661c2..9bcf03a 100755 (executable)
@@ -76,11 +76,10 @@ readiness:
 
 service:
   http:
-    type: NodePort
+    type: ClusterIP
     portName: blueprints-processor-http
     internalPort: 8080
     externalPort: 8080
-    nodePort: 99
   grpc:
     type: ClusterIP
     portName: blueprints-processor-grpc
index e24a2e4..9f41906 100644 (file)
@@ -22,6 +22,7 @@
   The template takes two arguments:
     - .global: environment (.)
     - .name: name of the secret
+    - .annotations: annotations which should be used
 
   Example call:
     {{ include "common.secret._header" (dict "global" . "name" "myFancyName") }}
@@ -39,6 +40,9 @@ metadata:
     chart: {{ $global.Chart.Name }}-{{ $global.Chart.Version | replace "+" "_" }}
     release: {{ include "common.release" $global }}
     heritage: {{ $global.Release.Service }}
+{{- if .annotations }}
+  annotations: {{- include "common.tplValue" (dict "value" .annotations "context" $global) | nindent 4 }}
+{{- end }}
 type: Opaque
 {{- end -}}
 
@@ -204,6 +208,8 @@ valueFrom:
     - name:
         Overrides default secret name generation and allows to set immutable
         and globaly unique name
+    - annotations:
+        List of annotations to be used while defining a secret
 
   To allow sharing a secret between the components and allow to pre-deploy secrets
   before ONAP deployment it is possible to use already existing secret instead of
@@ -239,11 +245,12 @@ valueFrom:
   {{- range $secret := .Values.secrets }}
     {{- $uid := tpl (default "" $secret.uid) $global }}
     {{- $name := include "common.secret.genName" (dict "global" $global "uid" $uid "name" $secret.name) }}
+    {{- $annotations := default "" $secret.annotations }}
     {{- $type := default "generic" $secret.type }}
     {{- $externalSecret := tpl (default "" $secret.externalSecret) $global }}
     {{- if not $externalSecret }}
 ---
-      {{ include "common.secret._header" (dict "global" $global "name" $name) }}
+      {{ include "common.secret._header" (dict "global" $global "name" $name "annotations" $annotations) }}
 
       {{- if eq $type "generic" }}
 data:
index e505742..a0ec3b4 100644 (file)
@@ -1,6 +1,6 @@
 #============LICENSE_START========================================================
 #=================================================================================
-# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved.
 # Modifications Copyright © 2018 Amdocs, Bell Canada
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -34,6 +34,7 @@
     {
       "cert_path": "/opt/app/osaaf",
       "image": "{{ .Values.global.tlsRepository }}/{{ .Values.global.tlsImage }}",
+      "component_cert_dir": "/opt/dcae/cacert",
       "component_ca_cert_path": "/opt/dcae/cacert/cacert.pem",
       "ca_cert_configmap": "{{ include "common.fullname" . }}-dcae-cacert"
     }
index 7a28812..a36164d 100644 (file)
@@ -53,8 +53,11 @@ spec:
           - dcae-config-binding-service\r
           - --container-name\r
           - dcae-db\r
+          - --container-name\r
+          - dcae-inventory-api\r
           - "-t"\r
           - "15"\r
+\r
         env:\r
         - name: NAMESPACE\r
           valueFrom:\r
index cfdff5a..872d01d 100644 (file)
@@ -109,7 +109,7 @@ mongo:
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/org.onap.dcaegen2.deployments.k8s-bootstrap-container:1.10.0
+image: onap/org.onap.dcaegen2.deployments.k8s-bootstrap-container:1.12.0
 default_k8s_location: central
 
 # DCAE component images to be deployed via Cloudify Manager
@@ -118,8 +118,7 @@ componentImages:
   holmes_rules: onap/holmes/rule-management:1.2.7
   holmes_engine: onap/holmes/engine-management:1.2.6
   tca: onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.2.2
-  #placeholder until tca-gen2 release image is available
-  #tcagen2: onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.0.0
+  tcagen2: onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.0.0
   ves: onap/org.onap.dcaegen2.collectors.ves.vescollector:1.5.3
   snmptrap: onap/org.onap.dcaegen2.collectors.snmptrap:1.4.0
   prh: onap/org.onap.dcaegen2.services.prh.prh-app-server:1.5.0
index 673b017..d2bda88 100644 (file)
@@ -46,7 +46,7 @@ config:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/org.onap.dcaegen2.deployments.cm-container:2.0.2
+image: onap/org.onap.dcaegen2.deployments.cm-container:2.1.0
 pullPolicy: Always
 
 # name of shared ConfigMap with kubeconfig for multiple clusters
index 22076e5..9d38659 100644 (file)
@@ -1,6 +1,6 @@
 #============LICENSE_START========================================================
 # ================================================================================
-# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -44,7 +44,7 @@ config:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/org.onap.ccsdk.dashboard.ccsdk-app-os:1.3.0
+image: onap/org.onap.ccsdk.dashboard.ccsdk-app-os:1.3.1
 pullPolicy: Always
 
 # probe configuration parameters
index f056079..6769c00 100644 (file)
@@ -52,6 +52,8 @@ spec:
                 fieldPath: metadata.namespace
         - name: init-tls
           env:
+          - name: aaf_locator_fqdn
+            value: dcae
           - name: POD_IP
             valueFrom:
               fieldRef:
@@ -61,7 +63,7 @@ spec:
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           resources: {}
           volumeMounts:
-            - mountPath: /opt/tls/shared
+            - mountPath: /opt/app/osaaf
               name: tls-info
       containers:
         - name: {{ include "common.name" . }}
index a6e5125..51af963 100644 (file)
@@ -25,7 +25,7 @@ global:
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
   tlsRepository: nexus3.onap.org:10001
-  tlsImage: onap/org.onap.dcaegen2.deployments.tls-init-container:1.0.3
+  tlsImage: onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0
   repositoryCred:
     user: docker
     password: docker
index dfc4dbf..25ddfc7 100644 (file)
@@ -19,8 +19,7 @@
 global:
   nodePortPrefix: 302
   tlsRepository: nexus3.onap.org:10001
-# Have to use locally-define tlsImage until inventory API can use 2.x.y
-#  tlsImage: onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0
+  tlsImage: onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0
   consulLoaderRepository: nexus3.onap.org:10001
   consulLoaderImage: onap/org.onap.dcaegen2.deployments.consul-loader-container:1.0.0
 redis:
index 871a422..078b15b 100644 (file)
@@ -22,7 +22,7 @@ global:
 # Application configuration defaults.
 #################################################################
 # application image
-image: onap/dmaap/datarouter-node:2.1.4
+image: onap/dmaap/datarouter-node:2.1.5
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 6165568..e2671e6 100644 (file)
@@ -34,7 +34,7 @@ secrets:
 # Application configuration defaults.
 #################################################################
 # application image
-image: onap/dmaap/datarouter-prov:2.1.4
+image: onap/dmaap/datarouter-prov:2.1.5
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 354e8e3..f3f4f88 100644 (file)
@@ -27,7 +27,7 @@ subChartsOnly:
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/aai/esr-server:1.5.1
+image: onap/aai/esr-server:1.5.2
 pullPolicy: Always
 msbaddr: msb-iag.{{ include "common.namespace" . }}:443
 
index 591bfde..c854b48 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 591bfdea4f1d833abee3c7e60f084da546d9082a
+Subproject commit c854b484ebbd5e0c1be1e6a032a79beeb4cab6ff
index a714ba9..02947c6 100755 (executable)
@@ -289,6 +289,15 @@ sdnc:
   si:
     svc:
       types: PORT-MIRROR,PPROBE
+  dmaap:
+    host: http://message-router.{{ include "common.namespace" . }}:3904
+    timeout: 30000
+  lcm:
+    path: '/restconf/operations/LCM:'
+    actionTimeout: 300000
+    dmapp:
+      readTopic: SDNC-LCM-WRITE
+      writeTopic: SDNC-LCM-READ
 appc:
   client:
     topic:
index 91e9be6..63a10b0 100755 (executable)
@@ -66,25 +66,13 @@ spec:
               name: {{ include "common.release" . }}-so-db-secrets
               key: mariadb.readwrite.port
         - name: DB_USERNAME
-          valueFrom:
-            secretKeyRef:
-              name: {{ include "common.release" . }}-so-db-secrets
-              key: mariadb.readwrite.rolename
+          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 10 }}
         - name: DB_PASSWORD
-          valueFrom:
-            secretKeyRef:
-              name: {{ include "common.release" . }}-so-db-secrets
-              key: mariadb.readwrite.password
+          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 10 }}
         - name: DB_ADMIN_USERNAME
-          valueFrom:
-            secretKeyRef:
-              name: {{ include "common.release" . }}-so-db-secrets
-              key: mariadb.admin.rolename
+          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-admin-creds" "key" "login") | indent 10 }}
         - name: DB_ADMIN_PASSWORD
-          valueFrom:
-            secretKeyRef:
-              name: {{ include "common.release" . }}-so-db-secrets
-              key: mariadb.admin.password
+          {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-admin-creds" "key" "password") | indent 10 }}
          {{- if eq .Values.global.security.aaf.enabled true }}
         - name: TRUSTSTORE
           value: /app/org.onap.so.trust.jks
diff --git a/kubernetes/so/charts/so-catalog-db-adapter/templates/secret.yaml b/kubernetes/so/charts/so-catalog-db-adapter/templates/secret.yaml
new file mode 100644 (file)
index 0000000..dee311c
--- /dev/null
@@ -0,0 +1,15 @@
+# Copyright © 2020 Samsung Electronics
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{ include "common.secret" . }}
index c4e2316..889f2e8 100755 (executable)
@@ -23,6 +23,25 @@ global:
   persistence:
     mountPath: /dockerdata-nfs
 
+#################################################################
+# Secrets metaconfig
+#################################################################
+secrets:
+  - uid: db-user-creds
+    name: '{{ include "common.release" . }}-so-catalog-db-adapter-db-user-creds'
+    type: basicAuth
+    externalSecret: '{{ .Values.db.userCredsExternalSecret }}'
+    login: '{{ .Values.db.userName }}'
+    password: '{{ .Values.db.userPassword }}'
+    passwordPolicy: required
+  - uid: db-admin-creds
+    name: '{{ include "common.release" . }}-so-catalog-db-adapter-db-admin-creds'
+    type: basicAuth
+    externalSecret: '{{ .Values.db.adminCredsExternalSecret }}'
+    login: '{{ .Values.db.adminName }}'
+    password: '{{ .Values.db.adminPassword }}'
+    passwordPolicy: required
+
 #################################################################
 # Application configuration defaults.
 #################################################################
@@ -30,6 +49,14 @@ repository: nexus3.onap.org:10001
 image: onap/so/catalog-db-adapter:1.5.3
 pullPolicy: Always
 
+db:
+  userName: so_user
+  userPassword: so_User123
+  # userCredsExternalSecret: some secret
+  adminName: so_admin
+  adminPassword: so_Admin123
+  # adminCredsExternalSecret: some secret
+
 replicaCount: 1
 minReadySeconds: 10
 containerPort: 8082
index a20d217..6235bd2 100755 (executable)
@@ -151,6 +151,7 @@ org:
                     sdncurl7: 'http://sdnc.{{ include "common.namespace" . }}:8282/restconf/operations/L3UCPE-API:'
                     sdncurl8: 'http://sdnc.{{ include "common.namespace" . }}:8282/restconf/operations/NBNC-API:'
                     sdncurl9: 'http://sdnc.{{ include "common.namespace" . }}:8282/restconf/operations/NORTHBOUND-API:service-topology-operation'
+                    sdncurl20: 'http://sdnc.{{ include "common.namespace" . }}:8282/restconf/operations/LCM:'
                     service:
                         infra:
                             service-topology-infra-activate-operation: POST|90000|sdncurl9|sdnc-request-header|com:att:sdnctl:northbound-api:v1
@@ -160,6 +161,12 @@ org:
                     vfmodule:
                         '':
                             query: GET|60000|sdncurl12|
+                    lcm:
+                      download-n-e-sw: POST|1800000|sdncurl20|common-header|org:onap:ccsdk:sli:northbound:lcm
+                      activate-n-e-sw: POST|300000|sdncurl20|common-header|org:onap:ccsdk:sli:northbound:lcm
+                      upgrade-pre-check: POST|180000|sdncurl20|common-header|org:onap:ccsdk:sli:northbound:lcm
+                      upgrade-post-check: POST|180000|sdncurl20|common-header|org:onap:ccsdk:sli:northbound:lcm
+                      default: POST|180000|sdncurl20|common-header|org:onap:ccsdk:sli:northbound:lcm
                 network:
                     encryptionKey: {{ index .Values.org.onap.so.adapters.sdnc.network.encryptionKey }}
 spring:
index 8e5d097..b5246d1 100644 (file)
@@ -37,7 +37,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - vfc-mariadb
+        - {{ .Values.config.mariadbService }}
         env:
         - name: NAMESPACE
           valueFrom:
@@ -49,6 +49,11 @@ spec:
         name: {{ include "common.name" . }}-readiness
       containers:
         - name: {{ include "common.name" . }}
+          command:
+            - sh
+          args:
+            - -c
+            - 'MYSQL_AUTH=root:${MYSQL_ROOT_PASSWORD} ./docker-entrypoint.sh'
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
@@ -75,9 +80,11 @@ spec:
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
             - name: MYSQL_ADDR
-              value: "{{ .Values.global.config.dbServiceName }}:{{ .Values.global.config.dbPort }}"
-            - name: MYSQL_AUTH
-              value: "{{ .Values.global.config.dbUser }}:{{ .Values.global.config.mariadbRootPassword }}"
+              value: "{{ .Values.config.mariadbService }}:{{ .Values.config.mariadbPort }}"
+            - name: MYSQL_ROOT_USER
+              value: "{{ .Values.global.config.mariadb_admin }}"
+            - name: MYSQL_ROOT_PASSWORD
+              {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 14}}
             - name: REDIS_ADDR
               value: "{{ .Values.global.config.redisServiceName }}:{{ .Values.global.config.redisPort }}"
           volumeMounts:
diff --git a/kubernetes/vfc/charts/vfc-catalog/templates/secrets.yaml b/kubernetes/vfc/charts/vfc-catalog/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..d053c48
--- /dev/null
@@ -0,0 +1,15 @@
+# Copyright (c) 2020 Samsung Electronics
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{ include "common.secret" . }}
index 1a8808b..8914d66 100644 (file)
@@ -22,6 +22,16 @@ global:
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
 
+#################################################################
+# Secrets metaconfig
+#################################################################
+secrets:
+  - uid: "db-root-pass"
+    externalSecret: '{{ tpl (default "" .Values.config.mariadbRootPasswordExternalSecret) . }}'
+    type: password
+    password: '{{ .Values.config.mariadbRootPassword }}'
+    policy: required
+
 #################################################################
 # Application configuration defaults.
 #################################################################
@@ -39,7 +49,11 @@ istioSidecar: true
 debugEnabled: false
 
 # application configuration
-config: {}
+config:
+  mariadbService: vfc-mariadb
+  mariadbPort: 3306
+  # mariadbRootPassword: secretpassword
+  # mariadbRootPasswordExternalSecret: some secret
 
 # default number of instances
 replicaCount: 1
@@ -108,4 +122,4 @@ resources:
     requests:
       cpu: 200m
       memory: 500Mi
-  unlimited: {}
\ No newline at end of file
+  unlimited: {}
index fc6c736..395eedc 100644 (file)
@@ -37,7 +37,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - vfc-mariadb
+        - {{ .Values.config.mariadbService }}
         env:
         - name: NAMESPACE
           valueFrom:
@@ -49,6 +49,11 @@ spec:
         name: {{ include "common.name" . }}-readiness
       containers:
         - name: {{ include "common.name" . }}
+          command:
+            - sh
+          args:
+            - -c
+            - 'MYSQL_AUTH=${MYSQL_ROOT_USER}:${MYSQL_ROOT_PASSWORD} ./docker-entrypoint.sh'
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
@@ -75,9 +80,11 @@ spec:
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
             - name: MYSQL_ADDR
-              value: "{{ .Values.global.config.dbServiceName }}:{{ .Values.global.config.dbPort }}"
-            - name: MYSQL_AUTH
-              value: "{{ .Values.global.config.dbUser }}:{{ .Values.global.config.mariadbRootPassword }}"
+              value: "{{ .Values.config.mariadbService }}:{{ .Values.config.mariadbPort }}"
+            - name: MYSQL_ROOT_USER
+              value: "{{ .Values.global.config.mariadb_admin }}"
+            - name: MYSQL_ROOT_PASSWORD
+              {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 14}}
             - name: REDIS_ADDR
               value: "{{ .Values.global.config.redisServiceName }}:{{ .Values.global.config.redisPort }}"
             - name: REG_TO_MSB_WHEN_START
diff --git a/kubernetes/vfc/charts/vfc-nslcm/templates/secrets.yaml b/kubernetes/vfc/charts/vfc-nslcm/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..d053c48
--- /dev/null
@@ -0,0 +1,15 @@
+# Copyright (c) 2020 Samsung Electronics
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{ include "common.secret" . }}
index a3d0303..35637f3 100644 (file)
@@ -22,6 +22,16 @@ global:
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
 
+#################################################################
+# Secrets metaconfig
+#################################################################
+secrets:
+  - uid: "db-root-pass"
+    externalSecret: '{{ tpl (default "" .Values.config.mariadbRootPasswordExternalSecret) . }}'
+    type: password
+    password: '{{ .Values.config.mariadbRootPassword }}'
+    policy: required
+
 #################################################################
 # Application configuration defaults.
 #################################################################
@@ -39,7 +49,12 @@ istioSidecar: true
 debugEnabled: false
 
 # application configuration
-config: {}
+config:
+  mariadbService: vfc-mariadb
+  mariadbPort: 3306
+  # mariadbRootPassword: secretpassword
+  # mariadbRootPasswordExternalSecret: some secret
+
 
 # default number of instances
 replicaCount: 1
@@ -88,4 +103,4 @@ resources:
     requests:
       cpu: 200m
       memory: 500Mi
-  unlimited: {}
\ No newline at end of file
+  unlimited: {}
index e99f4d1..465f4cf 100644 (file)
@@ -37,7 +37,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - vfc-mariadb
+        - {{ .Values.config.mariadbService }}
         env:
         - name: NAMESPACE
           valueFrom:
@@ -49,6 +49,11 @@ spec:
         name: {{ include "common.name" . }}-readiness
       containers:
         - name: {{ include "common.name" . }}
+          command:
+            - sh
+          args:
+            - -c
+            - 'MYSQL_AUTH=root:${MYSQL_ROOT_PASSWORD} ./docker-entrypoint.sh'
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
@@ -75,9 +80,11 @@ spec:
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
             - name: MYSQL_ADDR
-              value: "{{ .Values.global.config.dbServiceName }}:{{ .Values.global.config.dbPort }}"
-            - name: MYSQL_AUTH
-              value: "{{ .Values.global.config.dbUser }}:{{ .Values.global.config.mariadbRootPassword }}"
+              value: "{{ .Values.config.mariadbService }}:{{ .Values.config.mariadbPort }}"
+            - name: MYSQL_ROOT_USER
+              value: "{{ .Values.global.config.mariadb_admin }}"
+            - name: MYSQL_ROOT_PASSWORD
+              {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 14}}
             - name: REDIS_ADDR
               value: "{{ .Values.global.config.redisServiceName }}:{{ .Values.global.config.redisPort }}"
           volumeMounts:
diff --git a/kubernetes/vfc/charts/vfc-vnflcm/templates/secrets.yaml b/kubernetes/vfc/charts/vfc-vnflcm/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..d053c48
--- /dev/null
@@ -0,0 +1,15 @@
+# Copyright (c) 2020 Samsung Electronics
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{ include "common.secret" . }}
index 4883833..b58f30b 100644 (file)
@@ -22,6 +22,16 @@ global:
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
 
+#################################################################
+# Secrets metaconfig
+#################################################################
+secrets:
+  - uid: "db-root-pass"
+    externalSecret: '{{ tpl (default "" .Values.config.mariadbRootPasswordExternalSecret) . }}'
+    type: password
+    password: '{{ .Values.config.mariadbRootPassword }}'
+    policy: required
+
 #################################################################
 # Application configuration defaults.
 #################################################################
@@ -39,7 +49,12 @@ istioSidecar: true
 debugEnabled: false
 
 # application configuration
-config: {}
+config:
+  mariadbService: vfc-mariadb
+  mariadbPort: 3306
+  # mariadbRootPassword: secretpassword
+  # mariadbRootPasswordExternalSecret: some secret
+
 
 # default number of instances
 replicaCount: 1
@@ -88,4 +103,4 @@ resources:
     requests:
       cpu: 200m
       memory: 500Mi
-  unlimited: {}
\ No newline at end of file
+  unlimited: {}
index 66db39e..c4c070d 100644 (file)
@@ -37,7 +37,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - vfc-mariadb
+        - {{ .Values.config.mariadbService }}
         env:
         - name: NAMESPACE
           valueFrom:
@@ -49,6 +49,11 @@ spec:
         name: {{ include "common.name" . }}-readiness
       containers:
         - name: {{ include "common.name" . }}
+          command:
+            - sh
+          args:
+            - -c
+            - 'MYSQL_AUTH=root:${MYSQL_ROOT_PASSWORD} ./docker-entrypoint.sh'
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
@@ -75,11 +80,13 @@ spec:
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
             - name: MYSQL_ADDR
-              value: "{{ .Values.global.config.dbServiceName }}:{{ .Values.global.config.dbPort }}"
+              value: "{{ .Values.config.mariadbService }}:{{ .Values.config.mariadbPort }}"
             - name: REDIS_ADDR
               value: "{{ .Values.global.config.redisServiceName }}:{{ .Values.global.config.redisPort }}"
-            - name: MYSQL_AUTH
-              value: "{{ .Values.global.config.dbUser }}:{{ .Values.global.config.mariadbRootPassword }}"
+            - name: MYSQL_ROOT_USER
+              value: "{{ .Values.global.config.mariadb_admin }}"
+            - name: MYSQL_ROOT_PASSWORD
+              {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 14}}
 
           volumeMounts:
           - name: {{ include "common.fullname" . }}-localtime
diff --git a/kubernetes/vfc/charts/vfc-vnfmgr/templates/secrets.yaml b/kubernetes/vfc/charts/vfc-vnfmgr/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..d053c48
--- /dev/null
@@ -0,0 +1,15 @@
+# Copyright (c) 2020 Samsung Electronics
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{ include "common.secret" . }}
index fdd38e6..9cceb9f 100644 (file)
@@ -22,6 +22,16 @@ global:
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
 
+#################################################################
+# Secrets metaconfig
+#################################################################
+secrets:
+  - uid: "db-root-pass"
+    externalSecret: '{{ tpl (default "" .Values.config.mariadbRootPasswordExternalSecret) . }}'
+    type: password
+    password: '{{ .Values.config.mariadbRootPassword }}'
+    policy: required
+
 #################################################################
 # Application configuration defaults.
 #################################################################
@@ -39,7 +49,11 @@ istioSidecar: true
 debugEnabled: false
 
 # application configuration
-config: {}
+config:
+  mariadbService: vfc-mariadb
+  mariadbPort: 3306
+  # mariadbRootPassword: secretpassword
+  # mariadbRootPasswordExternalSecret: some secret
 
 # default number of instances
 replicaCount: 1
@@ -87,4 +101,4 @@ resources:
     requests:
       cpu: 200m
       memory: 500Mi
-  unlimited: {}
\ No newline at end of file
+  unlimited: {}
index f5fc284..e70bf0e 100644 (file)
@@ -37,7 +37,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - vfc-mariadb
+        - {{ .Values.config.mariadbService }}
         env:
         - name: NAMESPACE
           valueFrom:
@@ -49,6 +49,11 @@ spec:
         name: {{ include "common.name" . }}-readiness
       containers:
         - name: {{ include "common.name" . }}
+          command:
+            - sh
+          args:
+            - -c
+            - 'MYSQL_AUTH=root:${MYSQL_ROOT_PASSWORD} ./docker-entrypoint.sh'
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
@@ -75,11 +80,14 @@ spec:
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
             - name: MYSQL_ADDR
-              value: "{{ .Values.global.config.dbServiceName }}:{{ .Values.global.config.dbPort }}"
+              value: "{{ .Values.config.mariadbService }}:{{ .Values.config.mariadbPort }}"
             - name: REDIS_ADDR
               value: "{{ .Values.global.config.redisServiceName }}:{{ .Values.global.config.redisPort }}"
-            - name: MYSQL_AUTH
-              value: "{{ .Values.global.config.dbUser }}:{{ .Values.global.config.mariadbRootPassword }}"
+            - name: MYSQL_ROOT_USER
+              value: "{{ .Values.global.config.mariadb_admin }}"
+            - name: MYSQL_ROOT_PASSWORD
+              {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 14}}
+
           volumeMounts:
           - name: {{ include "common.fullname" . }}-localtime
             mountPath: /etc/localtime
diff --git a/kubernetes/vfc/charts/vfc-vnfres/templates/secrets.yaml b/kubernetes/vfc/charts/vfc-vnfres/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..d053c48
--- /dev/null
@@ -0,0 +1,15 @@
+# Copyright (c) 2020 Samsung Electronics
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{ include "common.secret" . }}
index 9c51d66..1a64402 100644 (file)
@@ -22,6 +22,16 @@ global:
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
 
+#################################################################
+# Secrets metaconfig
+#################################################################
+secrets:
+  - uid: "db-root-pass"
+    externalSecret: '{{ tpl (default "" .Values.config.mariadbRootPasswordExternalSecret) . }}'
+    type: password
+    password: '{{ .Values.config.mariadbRootPassword }}'
+    policy: required
+
 #################################################################
 # Application configuration defaults.
 #################################################################
@@ -39,7 +49,12 @@ istioSidecar: true
 debugEnabled: false
 
 # application configuration
-config: {}
+config:
+  mariadbService: vfc-mariadb
+  mariadbPort: 3306
+  # mariadbRootPassword: secretpassword
+  # mariadbRootPasswordExternalSecret: some secret
+
 
 # default number of instances
 replicaCount: 1
@@ -88,4 +103,4 @@ resources:
     requests:
       cpu: 200m
       memory: 500Mi
-  unlimited: {}
\ No newline at end of file
+  unlimited: {}
diff --git a/kubernetes/vfc/templates/secrets.yaml b/kubernetes/vfc/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..d053c48
--- /dev/null
@@ -0,0 +1,15 @@
+# Copyright (c) 2020 Samsung Electronics
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{ include "common.secret" . }}
index eb6638b..88275ae 100644 (file)
@@ -18,40 +18,65 @@ global:
     msbprotocol: https
     msbServiceName: msb-iag
     msbPort: 443
-    dbServiceName: vfc-db
-    dbPort: 3306
-    dbUser: root
-    mariadbRootPassword: secretpassword
     redisServiceName: vfc-redis
     redisPort: 6379
     reg_to_msb_when_start: False
+    mariadb_admin: root
   persistence:
     mountPath: /dockerdata-nfs
 
+#################################################################
+# Secrets metaconfig
+#################################################################
+secrets:
+  - uid: "db-root-pass"
+    name: &dbRootPassSecret '{{ include "common.release" . }}-vfc-db-root-pass'
+    type: password
+    password: '{{ .Values.config.mariadbRootPassword }}'
+
 # application configuration
 config:
   logstashServiceName: log-ls
   logstashPort: 5044
 
 mariadb-galera:
+  config:
+    mariadbRootPasswordExternalSecret: *dbRootPassSecret
   nameOverride: vfc-mariadb
   service:
-    name: vfc-db
-    portName: vfc-db
+    name: vfc-mariadb
+    portName: vfc-mariadb
   nfsprovisionerPrefix: vfc
   persistence:
     mountSubPath: vfc/data
     enabled: true
   disableNfsProvisioner: true
 
-catalog:
+db: &dbConfig
+  mariadbService: vfc-mariadb
+  mariadbPort: 3306
+  mariadbRootPasswordExternalSecret: *dbRootPassSecret
+
+vfc-catalog:
   config:
-    dbPodName: vfc-db
-    dbServiceName: vfc-db
-nslcm:
+    << : *dbConfig
+
+vfc-nslcm:
+  config:
+    << : *dbConfig
+
+vfc-vnflcm:
   config:
-    dbPodName: vfc-db
-    dbServiceName: vfc-db
+    << : *dbConfig
+
+vfc-vnfmgr:
+  config:
+    << : *dbConfig
+
+vfc-vnfres:
+  config:
+    << : *dbConfig
+
 # sub-chart configuration
 vfc-workflow:
   service: