Merge "[DCEAGEN] Add app-config volume mount to common dceagen2 template"
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Fri, 30 Apr 2021 06:03:04 +0000 (06:03 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 30 Apr 2021 06:03:04 +0000 (06:03 +0000)
69 files changed:
docs/oom_quickstart_guide.rst
kubernetes/aai/components/aai-resources/resources/config/application-keycloak.properties
kubernetes/aai/components/aai-resources/values.yaml
kubernetes/appc/resources/config/appc/opt/onap/appc/bin/health_check.sh
kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh
kubernetes/cds/values.yaml
kubernetes/common/cassandra/resources/restore.sh
kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
kubernetes/common/certManagerCertificate/requirements.yaml
kubernetes/common/certManagerCertificate/templates/_certificate.tpl
kubernetes/common/cmpv2Certificate/requirements.yaml
kubernetes/common/cmpv2Certificate/templates/_certServiceClient.tpl
kubernetes/common/cmpv2Certificate/values.yaml
kubernetes/common/cmpv2Config/values.yaml
kubernetes/common/mariadb-galera/values.yaml
kubernetes/common/music/resources/config/startup.sh
kubernetes/contrib/dns-server-for-vhost-ingress-testing/deploy_dns.sh
kubernetes/contrib/metallb-loadbalancer-inst/install-metallb-on-cluster.sh
kubernetes/contrib/tools/check-for-staging-images.sh
kubernetes/contrib/tools/rke/rke_setup.sh
kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl
kubernetes/dcaegen2/components/dcae-cloudify-manager/resources/config/plugins/k8s-plugin.json
kubernetes/dcaegen2/components/dcae-cloudify-manager/values.yaml
kubernetes/helm/plugins/deploy/deploy.sh
kubernetes/onap/values.yaml
kubernetes/oof/components/oof-cmso/components/oof-cmso-optimizer/values.yaml
kubernetes/oof/components/oof-cmso/components/oof-cmso-service/templates/deployment.yaml
kubernetes/oof/components/oof-cmso/components/oof-cmso-service/values.yaml
kubernetes/oof/components/oof-cmso/components/oof-cmso-ticketmgt/values.yaml
kubernetes/oof/components/oof-cmso/components/oof-cmso-topology/values.yaml
kubernetes/platform/components/cmpv2-cert-provider/values.yaml
kubernetes/platform/components/oom-cert-service/Makefile [deleted file]
kubernetes/platform/components/oom-cert-service/requirements.yaml
kubernetes/platform/components/oom-cert-service/templates/certificate.yaml [new file with mode: 0644]
kubernetes/platform/components/oom-cert-service/templates/deployment.yaml
kubernetes/platform/components/oom-cert-service/templates/issuer.yaml [new file with mode: 0644]
kubernetes/platform/components/oom-cert-service/templates/secret.yaml
kubernetes/platform/components/oom-cert-service/values.yaml
kubernetes/robot/demo-k8s.sh
kubernetes/robot/ete-k8s.sh
kubernetes/robot/eteHelm-k8s.sh
kubernetes/sdc/components/sdc-be/values.yaml
kubernetes/sdc/components/sdc-cs/values.yaml
kubernetes/sdc/components/sdc-fe/values.yaml
kubernetes/sdc/components/sdc-helm-validator/Chart.yaml [new file with mode: 0644]
kubernetes/sdc/components/sdc-helm-validator/requirements.yaml [new file with mode: 0644]
kubernetes/sdc/components/sdc-helm-validator/templates/deployment.yaml [new file with mode: 0644]
kubernetes/sdc/components/sdc-helm-validator/templates/service.yaml [new file with mode: 0644]
kubernetes/sdc/components/sdc-helm-validator/values.yaml [new file with mode: 0644]
kubernetes/sdc/components/sdc-onboarding-be/values.yaml
kubernetes/sdc/requirements.yaml
kubernetes/sdc/values.yaml
kubernetes/sdnc/components/dmaap-listener/values.yaml
kubernetes/sdnc/components/sdnc-ansible-server/values.yaml
kubernetes/sdnc/components/sdnc-prom/resources/bin/ensureSdncActive.sh
kubernetes/sdnc/components/sdnc-prom/resources/bin/ensureSdncStandby.sh
kubernetes/sdnc/components/sdnc-prom/resources/bin/prom.sh
kubernetes/sdnc/components/sdnc-prom/resources/bin/switchVoting.sh
kubernetes/sdnc/components/sdnc-web/values.yaml
kubernetes/sdnc/components/ueb-listener/values.yaml
kubernetes/sdnc/values.yaml
kubernetes/so/components/so-bpmn-infra/values.yaml
kubernetes/so/components/so-catalog-db-adapter/values.yaml
kubernetes/so/components/so-openstack-adapter/values.yaml
kubernetes/so/components/so-request-db-adapter/values.yaml
kubernetes/so/components/so-sdc-controller/values.yaml
kubernetes/so/components/so-sdnc-adapter/values.yaml
kubernetes/so/values.yaml
tox.ini

index 5136e53..2fedc09 100644 (file)
@@ -67,6 +67,12 @@ to suit your deployment with items like the OpenStack tenant information.
 
 
 
+.. note::
+  If you want to use CMPv2 certificate onboarding, Cert-Manager must be installed.
+  :doc:`Click here <oom_setup_paas>` to see how to install Cert-Manager.
+
+
+
 a. Enabling/Disabling Components:
 Here is an example of the nominal entries that need to be provided.
 We have different values file available for different contexts.
index 4f480cb..774e8bd 100644 (file)
@@ -3,10 +3,10 @@ spring.autoconfigure.exclude=\
   org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,\
   org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
 
-multi.tenancy.enabled=true
+multi.tenancy.enabled={{ .Values.config.keycloak.multiTenancy.enabled }}
 keycloak.auth-server-url=http://{{ .Values.config.keycloak.host }}:{{ .Values.config.keycloak.port }}/auth
-keycloak.realm=aai-resources
-keycloak.resource=aai-resources-app
+keycloak.realm={{ .Values.config.keycloak.realm }}
+keycloak.resource={{ .Values.config.keycloak.resource }}
 keycloak.public-client=true
 keycloak.principal-attribute=preferred_username
 
index b841391..f30b067 100644 (file)
@@ -49,7 +49,7 @@ global: # global defaults
 
     # Active spring profiles for the resources microservice
     profiles:
-      active: production,dmaap,aaf-auth
+      active: production,dmaap,aaf-auth #,keycloak
 
     # Notification event specific properties
     notification:
@@ -164,9 +164,19 @@ replicaCount: 1
 
 # Configuration for the resources deployment
 config:
+  # configure keycloak according to your environment.
+  # don't forget to add keycloak in active profiles above (global.config.profiles)
   keycloak:
-    host: localhost
+    host: keycloak.your.domain
     port: 8180
+    # Specifies a set of users, credentials, roles, and groups
+    realm: aai-resources
+    # Used by any client application for enabling fine-grained authorization for their protected resources
+    resource: aai-resources-app
+    # If set to true, additional criteria will be added that match the data-owner property with the given role
+    # to the user in keycloak
+    multiTenancy:
+      enabled: true
 
   # Specifies crud related operation timeouts and overrides
   crud:
index 6e35ca8..f2675b0 100755 (executable)
@@ -18,7 +18,7 @@
 waiting_bundles=$(/opt/opendaylight/current/bin/client bundle:list | grep Waiting | wc -l)
 run_level=$(/opt/opendaylight/current/bin/client system:start-level)
 
-  if [ "$run_level" == "Level 100" ] && [ "$waiting_bundles" -lt "1" ]
+  if [ "$run_level" = "Level 100" ] && [ "$waiting_bundles" -lt "1" ]
   then
     echo APPC is healthy.
   else
index c78daee..2fd6db1 100755 (executable)
@@ -83,7 +83,7 @@ then
 show databases like 'sdnctl';
 END
 )
-        if [ "x${sdnc_db_exists}" == "x" ]
+        if [ "x${sdnc_db_exists}" = "x" ]
         then
             echo "Installing SDNC database"
             ${SDNC_HOME}/bin/installSdncDb.sh
@@ -92,7 +92,7 @@ END
 show databases like 'appcctl';
 END
 )
-            if [ "x${appc_db_exists}" == "x" ]
+            if [ "x${appc_db_exists}" = "x" ]
             then
               echo "Installing APPC database"
               ${APPC_HOME}/bin/installAppcDb.sh
index 5510b3a..edac066 100644 (file)
@@ -84,6 +84,126 @@ mariadb-galera:
   serviceAccount:
     nameOverride: *dbServer
 
+  mariadbConfiguration: |-
+    [client]
+    port=3306
+    socket=/opt/bitnami/mariadb/tmp/mysql.sock
+    plugin_dir=/opt/bitnami/mariadb/plugin
+
+    [mysqld]
+    lower_case_table_names = 1
+    default_storage_engine=InnoDB
+    basedir=/opt/bitnami/mariadb
+    datadir=/bitnami/mariadb/data
+    plugin_dir=/opt/bitnami/mariadb/plugin
+    tmpdir=/opt/bitnami/mariadb/tmp
+    socket=/opt/bitnami/mariadb/tmp/mysql.sock
+    pid_file=/opt/bitnami/mariadb/tmp/mysqld.pid
+    bind_address=0.0.0.0
+
+    ## Character set
+    collation_server=utf8_unicode_ci
+    init_connect='SET NAMES utf8'
+    character_set_server=utf8
+
+    ## MyISAM
+    key_buffer_size=32M
+    myisam_recover_options=FORCE,BACKUP
+
+    ## Safety
+    skip_host_cache
+    skip_name_resolve
+    max_allowed_packet=16M
+    max_connect_errors=1000000
+    sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY
+    sysdate_is_now=1
+
+    ## Binary Logging
+    log_bin=mysql-bin
+    expire_logs_days=14
+    # Disabling for performance per http://severalnines.com/blog/9-tips-going-production-galera-cluster-mysql
+    sync_binlog=0
+    # Required for Galera
+    binlog_format=row
+
+    ## Caches and Limits
+    tmp_table_size=32M
+    max_heap_table_size=32M
+    # Re-enabling as now works with Maria 10.1.2
+    query_cache_type=1
+    query_cache_limit=4M
+    query_cache_size=256M
+    max_connections=500
+    thread_cache_size=50
+    open_files_limit=65535
+    table_definition_cache=4096
+    table_open_cache=4096
+
+    ## InnoDB
+    innodb=FORCE
+    innodb_strict_mode=1
+    # Mandatory per https://github.com/codership/documentation/issues/25
+    innodb_autoinc_lock_mode=2
+    # Per https://www.percona.com/blog/2006/08/04/innodb-double-write/
+    innodb_doublewrite=1
+    innodb_flush_method=O_DIRECT
+    innodb_log_files_in_group=2
+    innodb_log_file_size=128M
+    innodb_flush_log_at_trx_commit=1
+    innodb_file_per_table=1
+    # 80% Memory is default reco.
+    # Need to re-evaluate when DB size grows
+    innodb_buffer_pool_size=2G
+    innodb_file_format=Barracuda
+
+    ## Logging
+    log_error=/opt/bitnami/mariadb/logs/mysqld.log
+    slow_query_log_file=/opt/bitnami/mariadb/logs/mysqld.log
+    log_queries_not_using_indexes=1
+    slow_query_log=1
+
+    ## SSL
+    ## Use extraVolumes and extraVolumeMounts to mount /certs filesystem
+    # ssl_ca=/certs/ca.pem
+    # ssl_cert=/certs/server-cert.pem
+    # ssl_key=/certs/server-key.pem
+
+    [galera]
+    wsrep_on=ON
+    wsrep_provider=/opt/bitnami/mariadb/lib/libgalera_smm.so
+    wsrep_sst_method=mariabackup
+    wsrep_slave_threads=4
+    wsrep_cluster_address=gcomm://
+    wsrep_cluster_name=galera
+    wsrep_sst_auth="root:"
+    # Enabled for performance per https://mariadb.com/kb/en/innodb-system-variables/#innodb_flush_log_at_trx_commit
+    innodb_flush_log_at_trx_commit=2
+    # MYISAM REPLICATION SUPPORT #
+    wsrep_replicate_myisam=ON
+
+    [mariadb]
+    plugin_load_add=auth_pam
+
+    ## Data-at-Rest Encryption
+    ## Use extraVolumes and extraVolumeMounts to mount /encryption filesystem
+    # plugin_load_add=file_key_management
+    # file_key_management_filename=/encryption/keyfile.enc
+    # file_key_management_filekey=FILE:/encryption/keyfile.key
+    # file_key_management_encryption_algorithm=AES_CTR
+    # encrypt_binlog=ON
+    # encrypt_tmp_files=ON
+
+    ## InnoDB/XtraDB Encryption
+    # innodb_encrypt_tables=ON
+    # innodb_encrypt_temporary_tables=ON
+    # innodb_encrypt_log=ON
+    # innodb_encryption_threads=4
+    # innodb_encryption_rotate_key_age=1
+
+    ## Aria Encryption
+    # aria_encrypt_tables=ON
+    # encrypt_tmp_disk_tables=ON
+
 cds-blueprints-processor:
   enabled: true
   config:
index b56c0fa..a810534 100644 (file)
@@ -75,7 +75,7 @@ esac
 done
 
 # Validate inputs
-if [ "$base_db_dir" == "" ] || [ "$ss_dir" == "" ] || [ "$keyspace_name" == "" ]
+if [ "$base_db_dir" = "" ] || [ "$ss_dir" = "" ] || [ "$keyspace_name" = "" ]
 then
        echo ""
        echo ">>>>>>>>>>Not all inputs provided, please check usage >>>>>>>>>>"
index 87e584c..d955ecd 100755 (executable)
@@ -28,18 +28,18 @@ mkdir -p $WORK_DIR
 for f in $CERTS_DIR/*; do
   export canonical_name_nob64=$(echo $f | sed 's/.*\/\([^\/]*\)/\1/')
   export canonical_name_b64=$(echo $f | sed 's/.*\/\([^\/]*\)\(\.b64\)/\1/')
-  if [ "$AAF_ENABLED" == "false" ] && [ "$canonical_name_b64" == "$ONAP_TRUSTSTORE" ]; then
+  if [ "$AAF_ENABLED" = "false" ] && [ "$canonical_name_b64" = "$ONAP_TRUSTSTORE" ]; then
     # Dont use onap truststore when aaf is disabled
     continue
   fi
-  if [ "$AAF_ENABLED" == "false" ] && [ "$canonical_name_nob64" == "$ONAP_TRUSTSTORE" ]; then
+  if [ "$AAF_ENABLED" = "false" ] && [ "$canonical_name_nob64" = "$ONAP_TRUSTSTORE" ]; then
     # Dont use onap truststore when aaf is disabled
     continue
   fi
-  if [ ${f: -3} == ".sh" ]; then
+  if [ ${f: -3} = ".sh" ]; then
     continue
   fi
-  if [ ${f: -4} == ".b64" ]
+  if [ ${f: -4} = ".b64" ]
     then
       base64 -d $f > $WORK_DIR/`basename $f .b64`
     else
@@ -48,7 +48,7 @@ for f in $CERTS_DIR/*; do
 done
 
 # Prepare truststore output file
-if [ "$AAF_ENABLED" == "true" ]
+if [ "$AAF_ENABLED" = "true" ]
   then
     mv $WORK_DIR/$ONAP_TRUSTSTORE $WORK_DIR/$TRUSTSTORE_OUTPUT_FILENAME
   else
@@ -58,7 +58,7 @@ fi
 
 # Import Custom Certificates
 for f in $WORK_DIR/*; do
-  if [ ${f: -4} == ".pem" ]; then
+  if [ ${f: -4} = ".pem" ]; then
     echo "importing certificate: $f"
     keytool -import -file $f -alias `basename $f` -keystore $WORK_DIR/$TRUSTSTORE_OUTPUT_FILENAME -storepass $TRUSTSTORE_PASSWORD -noprompt
     if [ $? != 0 ]; then
index 210a02c..83becb0 100644 (file)
@@ -16,3 +16,6 @@ dependencies:
   - name: common
     version: ~8.x-0
     repository: 'file://../common'
+  - name: cmpv2Config
+    version: ~8.x-0
+    repository: 'file://../cmpv2Config'
index f820c30..108873b 100644 (file)
@@ -18,7 +18,7 @@
 #
 # To request a certificate following steps are to be done:
 #  - create an object 'certificates' in the values.yaml
-#  - create a file templates/certificates.yaml and invoke the function "certManagerCertificate.certificate".
+#  - create a file templates/certificate.yaml and invoke the function "certManagerCertificate.certificate".
 #
 # Here is an example of the certificate request for a component:
 #
@@ -53,6 +53,7 @@
 #        passwordSecretRef:
 #          name: secret-name
 #          key:  secret-key
+#          create: true
 #
 # Fields 'name', 'secretName' and 'commonName' are mandatory and required to be defined.
 # Other mandatory fields for the certificate definition do not have to be defined directly,
@@ -74,7 +75,7 @@
 {{/*# General certifiacate attributes  #*/}}
 {{- $name           := include "common.fullname" $dot                                                             -}}
 {{- $certName       := default (printf "%s-cert-%d"   $name $i) $certificate.name                                 -}}
-{{- $secretName     := default (printf "%s-secret-%d" $name $i) $certificate.secretName                           -}}
+{{- $secretName     := default (printf "%s-secret-%d" $name $i) (tpl (default "" $certificate.secretName) $ )  -}}
 {{- $commonName     := (required "'commonName' for Certificate is required." $certificate.commonName)          -}}
 {{- $renewBefore    := default $subchartGlobal.certificate.default.renewBefore     $certificate.renewBefore    -}}
 {{- $duration       := default $subchartGlobal.certificate.default.duration        $certificate.duration       -}}
 {{- if $certificate.issuer -}}
 {{-   $issuer        = $certificate.issuer                                               -}}
 {{- end -}}
----
-{{- if $certificate.keystore }}
+{{/*# Secret #*/}}
+{{ if $certificate.keystore -}}
   {{- $passwordSecretRef := $certificate.keystore.passwordSecretRef -}}
-  {{- $password := include "common.createPassword" (dict "dot" $dot "uid" $certName) | quote }}
+  {{- $password := include "common.createPassword" (dict "dot" $dot "uid" $certName) | quote -}}
+  {{- if $passwordSecretRef.create }}
 apiVersion: v1
 kind: Secret
 metadata:
@@ -106,7 +108,8 @@ metadata:
 type: Opaque
 stringData:
   {{ $passwordSecretRef.key }}: {{ $password }}
-{{- end }}
+  {{- end }}
+{{ end -}}
 ---
 apiVersion: cert-manager.io/v1
 kind: Certificate
@@ -120,6 +123,15 @@ spec:
   {{- if $duration }}
   duration:    {{ $duration }}
   {{- end }}
+  {{- if $certificate.isCA }}
+  isCA: {{ $certificate.isCA }}
+  {{- end }}
+  {{- if $certificate.usages }}
+  usages:
+    {{- range $usage := $certificate.usages }}
+      - {{ $usage }}
+    {{- end }}
+  {{- end }}
   subject:
     organizations:
       - {{ $subject.organization }}
@@ -156,7 +168,9 @@ spec:
     {{- end }}
   {{- end }}
   issuerRef:
+    {{- if not (eq $issuer.kind "Issuer" ) }}
     group: {{ $issuer.group }}
+    {{- end }}
     kind:  {{ $issuer.kind }}
     name:  {{ $issuer.name }}
   {{- if $certificate.keystore }}
@@ -168,7 +182,7 @@ spec:
     {{ $outputType }}:
       create: true
       passwordSecretRef:
-        name: {{ $certificate.keystore.passwordSecretRef.name }}
+        name: {{ tpl (default "" $certificate.keystore.passwordSecretRef.name) $ }}
         key: {{ $certificate.keystore.passwordSecretRef.key }}
     {{- end }}
   {{- end }}
@@ -234,4 +248,4 @@ spec:
     {{- $certsLinkCommand = (printf "ln -s %s %s; %s" $sourcePath $destnationPath $certsLinkCommand) -}}
   {{- end -}}
 {{ $certsLinkCommand }}
-{{- end -}}
+{{- end -}}
\ No newline at end of file
index 87509d1..b10896d 100644 (file)
@@ -19,3 +19,6 @@ dependencies:
   - name: repositoryGenerator
     version: ~8.x-0
     repository: 'file://../repositoryGenerator'
+  - name: cmpv2Config
+    version: ~8.x-0
+    repository: 'file://../cmpv2Config'
index 58cc9c7..f80b06b 100644 (file)
@@ -62,7 +62,7 @@ There also need to be some includes used in a target component deployment (inden
 
 {{- define "common.certServiceClient.initContainer" -}}
 {{- $dot := default . .dot -}}
-{{- $initRoot := default $dot.Values.cmpv2Certificate .initRoot -}}
+{{- $initRoot := default $dot.Values.cmpv2Certificate.cmpv2Config .initRoot -}}
 {{- $subchartGlobal := mergeOverwrite (deepCopy $initRoot.global) $dot.Values.global -}}
 {{- if and $subchartGlobal.cmpv2Enabled (not $subchartGlobal.CMPv2CertManagerIntegration) -}}
 {{- range $index, $certificate := $dot.Values.certificates -}}
@@ -97,11 +97,14 @@ There also need to be some includes used in a target component deployment (inden
 {{- $requestUrl := $subchartGlobal.platform.certServiceClient.envVariables.requestURL -}}
 {{- $certPath := $subchartGlobal.platform.certServiceClient.envVariables.certPath -}}
 {{- $requestTimeout := $subchartGlobal.platform.certServiceClient.envVariables.requestTimeout -}}
-{{- $certificatesSecretMountPath := $subchartGlobal.platform.certServiceClient.secret.mountPath -}}
-{{- $keystorePath := $subchartGlobal.platform.certServiceClient.envVariables.keystorePath -}}
-{{- $keystorePassword := $subchartGlobal.platform.certServiceClient.envVariables.keystorePassword -}}
-{{- $truststorePath := $subchartGlobal.platform.certServiceClient.envVariables.truststorePath -}}
-{{- $truststorePassword := $subchartGlobal.platform.certServiceClient.envVariables.truststorePassword -}}
+{{- $certificatesSecret:= $subchartGlobal.platform.certServiceClient.clientSecretName -}}
+{{- $certificatesSecretMountPath := $subchartGlobal.platform.certServiceClient.certificatesSecretMountPath -}}
+{{- $keystorePath := (printf "%s%s" $subchartGlobal.platform.certServiceClient.certificatesSecretMountPath $subchartGlobal.platform.certificates.keystoreKeyRef ) -}}
+{{- $keystorePasswordSecret := $subchartGlobal.platform.certificates.keystorePasswordSecretName -}}
+{{- $keystorePasswordSecretKey := $subchartGlobal.platform.certificates.keystorePasswordSecretKey -}}
+{{- $truststorePath := (printf "%s%s" $subchartGlobal.platform.certServiceClient.certificatesSecretMountPath $subchartGlobal.platform.certificates.truststoreKeyRef ) -}}
+{{- $truststorePasswordSecret := $subchartGlobal.platform.certificates.truststorePasswordSecretName -}}
+{{- $truststorePasswordSecretKey := $subchartGlobal.platform.certificates.truststorePasswordSecretKey -}}
 - name: certs-init-{{ $index }}
   image: {{ include "repositoryGenerator.image.certserviceclient" $dot }}
   imagePullPolicy: {{ $dot.Values.global.pullPolicy | default $dot.Values.pullPolicy }}
@@ -133,11 +136,17 @@ There also need to be some includes used in a target component deployment (inden
     - name: KEYSTORE_PATH
       value: {{ $keystorePath | quote }}
     - name: KEYSTORE_PASSWORD
-      value: {{ $keystorePassword | quote }}
+      valueFrom:
+        secretKeyRef:
+          name: {{ $keystorePasswordSecret | quote}}
+          key: {{ $keystorePasswordSecretKey | quote}}
     - name: TRUSTSTORE_PATH
       value: {{ $truststorePath | quote }}
     - name: TRUSTSTORE_PASSWORD
-      value: {{ $truststorePassword | quote }}
+      valueFrom:
+        secretKeyRef:
+          name: {{ $truststorePasswordSecret | quote}}
+          key: {{ $truststorePasswordSecretKey | quote}}
   terminationMessagePath: /dev/termination-log
   terminationMessagePolicy: File
   volumeMounts:
@@ -151,10 +160,10 @@ There also need to be some includes used in a target component deployment (inden
 
 {{- define "common.certServiceClient.volumes" -}}
 {{- $dot := default . .dot -}}
-{{- $initRoot := default $dot.Values.cmpv2Certificate .initRoot -}}
+{{- $initRoot := default $dot.Values.cmpv2Certificate.cmpv2Config .initRoot -}}
 {{- $subchartGlobal := mergeOverwrite (deepCopy $initRoot.global) $dot.Values.global -}}
 {{- if and $subchartGlobal.cmpv2Enabled (not $subchartGlobal.CMPv2CertManagerIntegration) -}}
-{{- $certificatesSecretName := $subchartGlobal.platform.certServiceClient.secret.name -}}
+{{- $certificatesSecretName := $subchartGlobal.platform.certificates.clientSecretName -}}
 - name: certservice-tls-volume
   secret:
     secretName: {{ $certificatesSecretName }}
@@ -168,7 +177,7 @@ There also need to be some includes used in a target component deployment (inden
 
 {{- define "common.certServiceClient.volumeMounts" -}}
 {{- $dot := default . .dot -}}
-{{- $initRoot := default $dot.Values.cmpv2Certificate .initRoot -}}
+{{- $initRoot := default $dot.Values.cmpv2Certificate.cmpv2Config .initRoot -}}
 {{- $subchartGlobal := mergeOverwrite (deepCopy $initRoot.global) $dot.Values.global -}}
 {{- if and $subchartGlobal.cmpv2Enabled (not $subchartGlobal.CMPv2CertManagerIntegration) -}}
 {{- range $index, $certificate := $dot.Values.certificates -}}
index b753143..5049475 100644 (file)
 # 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.
-
-#################################################################
-# Global configuration default values that can be inherited by
-# all subcharts.
-#################################################################
-global:
-  # Enabling CMPv2
-  cmpv2Enabled: true
-  CMPv2CertManagerIntegration: false
-
-  certificate:
-    default:
-      subject:
-        organization: "Linux-Foundation"
-        country: "US"
-        locality: "San-Francisco"
-        province: "California"
-        organizationalUnit: "ONAP"
-
-  platform:
-    certServiceClient:
-      secret:
-        name: oom-cert-service-client-tls-secret
-        mountPath: /etc/onap/oom/certservice/certs/
-      envVariables:
-        certPath: "/var/custom-certs"
-        # Client configuration related
-        caName: "RA"
-        requestURL: "https://oom-cert-service:8443/v1/certificate/"
-        requestTimeout: "30000"
-        keystorePath: "/etc/onap/oom/certservice/certs/certServiceClient-keystore.jks"
-        outputType: "P12"
-        keystorePassword: "secret"
-        truststorePath: "/etc/onap/oom/certservice/certs/truststore.jks"
-        truststorePassword: "secret"
index b6ee064..695e406 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 global:
+
+  # Enabling CMPv2
+  cmpv2Enabled: true
+  CMPv2CertManagerIntegration: false
+
+  certificate:
+    default:
+      subject:
+        organization: "Linux-Foundation"
+        country: "US"
+        locality: "San-Francisco"
+        province: "California"
+        organizationalUnit: "ONAP"
+
   platform:
+    certificates:
+      clientSecretName: oom-cert-service-client-tls-secret
+      keystoreKeyRef: keystore.jks
+      truststoreKeyRef: truststore.jks
+      keystorePasswordSecretName: oom-cert-service-keystore-password
+      keystorePasswordSecretKey: password
+      truststorePasswordSecretName: oom-cert-service-truststore-password
+      truststorePasswordSecretKey: password
     certServiceClient:
       image: onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.3.3
-      secretName: oom-cert-service-client-tls-secret
+      certificatesSecretMountPath: /etc/onap/oom/certservice/certs/
       envVariables:
+        certPath: "/var/custom-certs"
         # Certificate related
-        cmpv2Organization: "Linux-Foundation"
-        cmpv2OrganizationalUnit: "ONAP"
-        cmpv2Location: "San-Francisco"
-        cmpv2State: "California"
-        cmpv2Country: "US"
+        caName: "RA"
         # Client configuration related
         requestURL: "https://oom-cert-service:8443/v1/certificate/"
         requestTimeout: "30000"
-        keystorePassword: "secret"
-        truststorePassword: "secret"
+        outputType: "P12"
     certPostProcessor:
       image: onap/org.onap.oom.platform.cert-service.oom-certservice-post-processor:2.3.3
 
index 12d2d75..79b1cb2 100644 (file)
@@ -329,6 +329,12 @@ mariadbConfiguration: |-
   innodb_flush_log_at_trx_commit=2
   # MYISAM REPLICATION SUPPORT #
   wsrep_replicate_myisam=ON
+  binlog_format=row
+  default_storage_engine=InnoDB
+  innodb_autoinc_lock_mode=2
+  transaction-isolation=READ-COMMITTED
+  wsrep_causal_reads=1
+  wsrep_sync_wait=7
 
   [mariadb]
   plugin_load_add=auth_pam
index 37bb84d..e3cee36 100755 (executable)
@@ -32,8 +32,8 @@ DEBUG_PROP=
 # Debug Setup. Uses env variables
 # DEBUG and DEBUG_PORT
 # DEBUG=true/false | DEBUG_PORT=<Port valie must be integer>
-if [ "${DEBUG}" == "true" ]; then
-  if [ "${DEBUG_PORT}" == "" ]; then
+if [ "${DEBUG}" = "true" ]; then
+  if [ "${DEBUG_PORT}" = "" ]; then
     DEBUG_PORT=8000
   fi
   echo "Debug mode on"
index 657b5f9..1a75bd7 100755 (executable)
@@ -86,9 +86,9 @@ deploy() {
        target_machine_notice_info
 }
 
-if [[ $# -eq 1 ]] && [[ $1 == "-h" || $1 == "--help" ]]; then
+if [[ $# -eq 1 ]] && [[ $1 = "-h" || $1 = "--help" ]]; then
        usage
-elif [[ $# -eq 1 ]] && [[ $1 == "--info" ]]; then
+elif [[ $# -eq 1 ]] && [[ $1 = "--info" ]]; then
        target_machine_notice_info
 else
        deploy $@
index 6e412a3..44fe79a 100755 (executable)
@@ -76,7 +76,7 @@ manual_configuration() {
        generate_config_map $@
 }
 
-if [[ $# -eq 1 ]] && [[ $1 == "-h" || $1 == "--help" ]]; then
+if [[ $# -eq 1 ]] && [[ $1 = "-h" || $1 = "--help" ]]; then
        usage
 elif [[ $# -eq 0 ]]; then
        automatic_configuration
index ce51b30..8c01312 100755 (executable)
@@ -16,7 +16,7 @@
 
 BASE_URL="https://nexus3.onap.org/repository/docker.release"
 
-if [ "$GERRIT_BRANCH" == "staging" ]; then
+if [ "$GERRIT_BRANCH" = "staging" ]; then
     exit 0
 fi
 
index cde7d4c..7950e0c 100755 (executable)
@@ -258,14 +258,14 @@ EOF
   helm init --service-account tiller
   kubectl -n kube-system  rollout status deploy/tiller-deploy
   echo "upgrade server side of helm in kubernetes"
-  if [ "$USERNAME" == "root" ]; then
+  if [ "$USERNAME" = "root" ]; then
     helm version
   else
     sudo helm version
   fi
   echo "sleep 30"
   sleep 30
-  if [ "$USERNAME" == "root" ]; then
+  if [ "$USERNAME" = "root" ]; then
     helm init --upgrade
   else
     sudo helm init --upgrade
@@ -273,13 +273,13 @@ EOF
   echo "sleep 30"
   sleep 30
   echo "verify both versions are the same below"
-  if [ "$USERNAME" == "root" ]; then
+  if [ "$USERNAME" = "root" ]; then
     helm version
   else
     sudo helm version
   fi
   echo "start helm server"
-  if [ "$USERNAME" == "root" ]; then
+  if [ "$USERNAME" = "root" ]; then
     helm serve &
   else
     sudo helm serve &
@@ -287,7 +287,7 @@ EOF
   echo "sleep 30"
   sleep 30
   echo "add local helm repo"
-  if [ "$USERNAME" == "root" ]; then
+  if [ "$USERNAME" = "root" ]; then
     helm repo add local http://127.0.0.1:8879
     helm repo list
   else
index e9ada4d..80b4cbc 100644 (file)
 # ============LICENSE_END=========================================================
 */}}
 {{/*
+For internal use only!
+
+dcaegen2-services-common._ms-specific-env-vars:
+This template generates a list of microservice-specific environment variables
+as specified in .Values.applicationEnv.  The
+dcaegen2-services-common.microServiceDeployment uses this template
+to add the microservice-specific environment variables to the microservice's container.
+These environment variables are in addition to a standard set of environment variables
+provided to all microservices.
+
+The template expects a single argument, pointing to the caller's global context.
+
+Microservice-specific environment variables can be specified in two ways:
+  1. As literal string values.
+  2. As values that are sourced from a secret, identified by the secret's
+     uid and the key within the secret that provides the value.
+
+The following example shows an example of each type.  The example assumes
+that a secret has been created using the OOM common secret mechanism, with
+a secret uid "example-secret" and a key called "password".
+
+applicationEnv:
+  APPLICATION_PASSWORD:
+    secretUid: example-secret
+    key: password
+  APPLICATION_EXAMPLE: "An example value"
+
+The example would set two environment variables on the microservice's container,
+one called "APPLICATION_PASSWORD" with the value set from the "password" key in
+the secret with uid "example-secret", and one called "APPLICATION_EXAMPLE" set to
+the the literal string "An example value".
+*/}}
+{{- define "dcaegen2-services-common._ms-specific-env-vars" -}}
+  {{- $global := . }}
+  {{- if .Values.applicationEnv }}
+    {{- range $envName, $envValue := .Values.applicationEnv }}
+      {{- if kindIs "string" $envValue }}
+- name: {{ $envName }}
+  value: {{ $envValue | quote }}
+      {{- else }}
+        {{ if or (not $envValue.secretUid) (not $envValue.key) }}
+          {{ fail (printf "Env %s definition is not a string and does not contain secretUid or key fields" $envName) }}
+        {{- end }}
+- name: {{ $envName }}
+  {{- include "common.secret.envFromSecretFast" (dict "global" $global "uid" $envValue.secretUid "key" $envValue.key) | indent 2 }}
+      {{- end -}}
+    {{- end }}
+  {{- end }}
+{{- end -}}
+{{/*
 dcaegen2-services-common.microserviceDeployment:
 This template produces a Kubernetes Deployment for a DCAE microservice.
 
@@ -150,12 +200,7 @@ spec:
             fieldRef:
               apiVersion: v1
               fieldPath: status.podIP
-        {{- if .Values.applicationEnv }}
-        {{- range $envName, $envValue := .Values.applicationEnv }}
-        - name: {{ $envName }}
-          value: {{ $envValue | quote }}
-        {{- end }}
-        {{- end }}
+        {{- include "dcaegen2-services-common._ms-specific-env-vars" . | nindent 8 }}
         {{- if .Values.service }}
         ports: {{ include "common.containerPorts" . | nindent 10 }}
         {{- end }}
index 6018abe..3c769fc 100644 (file)
     "image_tag": "{{ include "repositoryGenerator.repository" . }}/{{ .Values.cmpv2Config.global.platform.certServiceClient.image }}",
     "request_url": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.requestURL }}",
     "timeout": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.requestTimeout }}",
-    "country": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.cmpv2Country }}",
-    "organization": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.cmpv2Organization }}",
-    "state": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.cmpv2State }}",
-    "organizational_unit": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.cmpv2OrganizationalUnit }}",
-    "location": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.cmpv2Location }}",
-    "cert_secret_name": "{{ .Values.cmpv2Config.global.platform.certServiceClient.secretName }}",
-    "keystore_password": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.keystorePassword }}",
-    "truststore_password": "{{ .Values.cmpv2Config.global.platform.certServiceClient.envVariables.truststorePassword }}"
+    "country": "{{ .Values.cmpv2Config.global.certificate.default.subject.country }}",
+    "organization": "{{ .Values.cmpv2Config.global.certificate.default.subject.organization }}",
+    "state": "{{ .Values.cmpv2Config.global.certificate.default.subject.province }}",
+    "organizational_unit": "{{ .Values.cmpv2Config.global.certificate.default.subject.organizationalUnit }}",
+    "location": "{{ .Values.cmpv2Config.global.certificate.default.subject.locality }}",
+    "cert_secret_name": "{{ .Values.cmpv2Config.global.platform.certificates.clientSecretName }}",
+    "keystore_secret_key": "{{ .Values.cmpv2Config.global.platform.certificates.keystoreKeyRef }}",
+    "truststore_secret_key": "{{ .Values.cmpv2Config.global.platform.certificates.truststoreKeyRef }}",
+    "keystore_password_secret_name": "{{ .Values.cmpv2Config.global.platform.certificates.keystorePasswordSecretName }}",
+    "keystore_password_secret_key": "{{ .Values.cmpv2Config.global.platform.certificates.keystorePasswordSecretKey }}",
+    "truststore_password_secret_name": "{{ .Values.cmpv2Config.global.platform.certificates.truststorePasswordSecretName }}",
+    "truststore_password_secret_key": "{{ .Values.cmpv2Config.global.platform.certificates.truststorePasswordSecretKey }}"
   },
   "cert_post_processor": {
     "image_tag": "{{ include "repositoryGenerator.repository" . }}/{{ .Values.cmpv2Config.global.platform.certPostProcessor.image }}"
index 1135c05..fcc8f6d 100644 (file)
@@ -55,7 +55,7 @@ config:
 # Application configuration defaults.
 #################################################################
 # application image
-image: onap/org.onap.dcaegen2.deployments.cm-container:4.4.2
+image: onap/org.onap.dcaegen2.deployments.cm-container:4.5.0
 pullPolicy: Always
 
 # name of shared ConfigMap with kubeconfig for multiple clusters
index 3bcb404..6267a35 100755 (executable)
@@ -49,7 +49,7 @@ generate_overrides() {
   for index in "${!SUBCHART_NAMES[@]}"; do
     START=${SUBCHART_NAMES[index]}
     END=${SUBCHART_NAMES[index+1]}
-    if [[ $START == "global:" ]]; then
+    if [[ $START = "global:" ]]; then
       echo "global:" > $GLOBAL_OVERRIDES
       cat $COMPUTED_OVERRIDES | sed '/common:/,/consul:/d' \
         | sed -n '/^'"$START"'/,/'log:'/p' | sed '1d;$d' >> $GLOBAL_OVERRIDES
@@ -72,11 +72,11 @@ resolve_deploy_flags() {
   n=${#flags[*]}
   for (( i = 0; i < n; i++ )); do
     PARAM=${flags[i]}
-    if [[ $PARAM == "-f" || \
-          $PARAM == "--values" || \
-          $PARAM == "--set" || \
-          $PARAM == "--set-string" || \
-          $PARAM == "--version" ]]; then
+    if [[ $PARAM = "-f" || \
+          $PARAM = "--values" || \
+          $PARAM = "--set" || \
+          $PARAM = "--set-string" || \
+          $PARAM = "--version" ]]; then
        # skip param and its value
        i=$((i + 1))
     else
@@ -98,7 +98,7 @@ deploy() {
   FLAGS=${@:3}
   CHART_REPO="$(cut -d'/' -f1 <<<"$CHART_URL")"
   CHART_NAME="$(cut -d'/' -f2 <<<"$CHART_URL")"
-  if [[ $HELM_VER == "v3."* ]]; then
+  if [[ $HELM_VER = "v3."* ]]; then
     CACHE_DIR=~/.local/share/helm/plugins/deploy/cache
   else
     CACHE_DIR=~/.helm/plugins/deploy/cache
@@ -149,7 +149,7 @@ deploy() {
   SUBCHART_RELEASE="$(cut -d'-' -f2 <<<"$RELEASE")"
   # update specified subchart without parent
   RELEASE="$(cut -d'-' -f1 <<<"$RELEASE")"
-  if [[ $SUBCHART_RELEASE == $RELEASE ]]; then
+  if [[ $SUBCHART_RELEASE = $RELEASE ]]; then
     SUBCHART_RELEASE=
   fi
 
@@ -201,13 +201,13 @@ deploy() {
     helm upgrade -i $RELEASE $CHART_DIR $DEPLOY_FLAGS -f $COMPUTED_OVERRIDES \
      > $LOG_FILE.log 2>&1
 
-    if [[ $VERBOSE == "true" ]]; then
+    if [[ $VERBOSE = "true" ]]; then
       cat $LOG_FILE
     else
       echo "release \"$RELEASE\" deployed"
     fi
     # Add annotation last-applied-configuration if set-last-applied flag is set
-    if [[ $SET_LAST_APPLIED == "true" ]]; then
+    if [[ $SET_LAST_APPLIED = "true" ]]; then
       helm get manifest ${RELEASE} \
       | kubectl apply set-last-applied --create-annotation -n onap -f - \
       > $LOG_FILE.log 2>&1
@@ -228,7 +228,7 @@ deploy() {
     fi
 
     if [[ $SUBCHART_ENABLED -eq 1 ]]; then
-      if [[ -z "$SUBCHART_RELEASE" || $SUBCHART_RELEASE == "$subchart" ]]; then
+      if [[ -z "$SUBCHART_RELEASE" || $SUBCHART_RELEASE = "$subchart" ]]; then
         LOG_FILE=$LOG_DIR/"${RELEASE}-${subchart}".log
         :> $LOG_FILE
 
@@ -236,19 +236,19 @@ deploy() {
          $DEPLOY_FLAGS -f $GLOBAL_OVERRIDES -f $SUBCHART_OVERRIDES \
          > $LOG_FILE 2>&1
 
-        if [[ $VERBOSE == "true" ]]; then
+        if [[ $VERBOSE = "true" ]]; then
           cat $LOG_FILE
         else
           echo "release \"${RELEASE}-${subchart}\" deployed"
         fi
        # Add annotation last-applied-configuration if set-last-applied flag is set
-        if [[ $SET_LAST_APPLIED == "true" ]]; then
+        if [[ $SET_LAST_APPLIED = "true" ]]; then
           helm get manifest "${RELEASE}-${subchart}" \
           | kubectl apply set-last-applied --create-annotation -n onap -f - \
              > $LOG_FILE.log 2>&1
         fi
       fi
-         if [[ $DELAY == "true" ]]; then
+         if [[ $DELAY = "true" ]]; then
                echo sleep 3m
                sleep 3m
          fi
@@ -256,7 +256,7 @@ deploy() {
       array=($(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}"))
       n=${#array[*]}
       for (( i = n-1; i >= 0; i-- )); do
-        if [[ $HELM_VER == "v3."* ]]; then
+        if [[ $HELM_VER = "v3."* ]]; then
           helm del "${array[i]}" 
         else
           helm del "${array[i]}" --purge
@@ -266,7 +266,7 @@ deploy() {
   done
 
   # report on success/failures of installs/upgrades
-  if [[ $HELM_VER == "v3."* ]]; then
+  if [[ $HELM_VER = "v3."* ]]; then
     helm ls --all-namespaces | grep -i FAILED | grep $RELEASE
   else
     helm ls | grep FAILED | grep $RELEASE
index b008acf..ca9ccd4 100755 (executable)
@@ -196,28 +196,25 @@ global:
   cmpv2Enabled: true
   CMPv2CertManagerIntegration: false
   platform:
+    certificates:
+      clientSecretName: oom-cert-service-client-tls-secret
+      keystoreKeyRef: keystore.jks
+      truststoreKeyRef: truststore.jks
+      keystorePasswordSecretName: oom-cert-service-certificates-password
+      keystorePasswordSecretKey: password
+      truststorePasswordSecretName: oom-cert-service-certificates-password
+      truststorePasswordSecretKey: password
     certServiceClient:
       image: onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.3.3
-      secret:
-        name: oom-cert-service-client-tls-secret
-        mountPath: /etc/onap/oom/certservice/certs/
+      certificatesSecretMountPath: /etc/onap/oom/certservice/certs/
       envVariables:
         certPath: "/var/custom-certs"
         # Certificate related
-        cmpv2Organization: "Linux-Foundation"
-        cmpv2OrganizationalUnit: "ONAP"
-        cmpv2Location: "San-Francisco"
-        cmpv2State: "California"
-        cmpv2Country: "US"
-        # Client configuration related
         caName: "RA"
+        # Client configuration related
         requestURL: "https://oom-cert-service:8443/v1/certificate/"
         requestTimeout: "30000"
-        keystorePath: "/etc/onap/oom/certservice/certs/certServiceClient-keystore.jks"
         outputType: "P12"
-        keystorePassword: "secret"
-        truststorePath: "/etc/onap/oom/certservice/certs/truststore.jks"
-        truststorePassword: "secret"
 
   # Indicates offline deployment build
   # Set to true if you are rendering helm charts for offline deployment
index b16dc9f..c9de654 100644 (file)
@@ -24,12 +24,12 @@ subChartsOnly:
   enabled: true
 
 # application image
-image: onap/optf-cmso-optimizer:2.3.3
+image: onap/optf-cmso-optimizer:2.3.4
 pullPolicy: Always
 
 #init container image
 dbinit:
-  image: onap/optf-cmso-dbinit:2.3.3
+  image: onap/optf-cmso-dbinit:2.3.4
 
 # flag to enable debugging - application support required
 debugEnabled: false
index 4a02a64..3fd0112 100644 (file)
@@ -107,16 +107,6 @@ spec:
         - mountPath: /usr/share/filebeat/data
           name: {{ include "common.fullname" . }}-filebeat
         resources:
-{{ include "common.resources" . }}
-      - name: mso-simulator
-        image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.robotimage }}
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        volumeMounts:
-        - name: {{ include "common.fullname" . }}-config
-          mountPath: /share/etc/config
-        ports:
-        - containerPort: 5000
-        resources:
 {{ include "common.resources" . }}
       - name: {{ include "common.name" . }}
         image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
index 1cb6303..105163e 100644 (file)
@@ -23,13 +23,12 @@ subChartsOnly:
   enabled: true
 
 # application image
-image: onap/optf-cmso-service:2.3.3
-robotimage: onap/optf-cmso-robot:2.3.3
+image: onap/optf-cmso-service:2.3.4
 pullPolicy: Always
 
 #init container image
 dbinit:
-  image: onap/optf-cmso-dbinit:2.3.3
+  image: onap/optf-cmso-dbinit:2.3.4
 
 # flag to enable debugging - application support required
 debugEnabled: false
index 6e312aa..7ef7ace 100644 (file)
@@ -23,7 +23,7 @@ subChartsOnly:
   enabled: true
 
 # application image
-image: onap/optf-cmso-ticketmgt:2.3.3
+image: onap/optf-cmso-ticketmgt:2.3.4
 pullPolicy: Always
 
 
index 217db26..40eed4e 100644 (file)
@@ -22,7 +22,7 @@ subChartsOnly:
   enabled: true
 
 # application image
-image: onap/optf-cmso-topology:2.3.3
+image: onap/optf-cmso-topology:2.3.4
 pullPolicy: Always
 
 
index 0614819..c34ebad 100644 (file)
@@ -73,10 +73,10 @@ cmpv2issuer:
   certEndpoint: v1/certificate
   caName: RA
   certSecretRef:
-    name: cmpv2-issuer-secret
-    certRef: certServiceServer-cert.pem
-    keyRef: certServiceServer-key.pem
-    cacertRef: truststore.pem
+    name: oom-cert-service-server-tls-secret
+    certRef: tls.crt
+    keyRef: tls.key
+    cacertRef: ca.crt
 
 
 
diff --git a/kubernetes/platform/components/oom-cert-service/Makefile b/kubernetes/platform/components/oom-cert-service/Makefile
deleted file mode 100644 (file)
index ea0cb8a..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-CERTS_DIR = resources
-CURRENT_DIR := ${CURDIR}
-DOCKER_CONTAINER = generate-certs
-DOCKER_EXEC = docker exec ${DOCKER_CONTAINER}
-
-all: start_docker \
-     clear_all \
-     root_generate_keys \
-     root_create_certificate \
-     root_self_sign_certificate \
-     client_generate_keys \
-     client_generate_csr \
-     client_sign_certificate_by_root \
-     client_import_root_certificate \
-     client_convert_certificate_to_jks \
-     server_generate_keys \
-     server_generate_csr \
-     server_sign_certificate_by_root \
-     server_import_root_certificate \
-     server_convert_certificate_to_jks \
-     server_convert_certificate_to_p12 \
-     convert_truststore_to_p12 \
-     convert_truststore_to_pem \
-     server_export_certificate_to_pem \
-     server_export_key_to_pem \
-     clear_unused_files \
-     stop_docker
-
-.PHONY: all
-
-# Starts docker container for generating certificates - deletes first, if already running
-start_docker:
-       @make stop_docker
-       $(eval REPOSITORY := $(shell cat ./values.yaml | grep -i "^[ \t]*repository" -m1 | xargs | cut -d ' ' -f2))
-       $(eval JAVA_IMAGE := $(shell cat ./values.yaml | grep -i "^[ \t]*certificateGenerationImage" -m1 | xargs | cut -d ' ' -f2))
-       $(eval FULL_JAVA_IMAGE := $(REPOSITORY)/$(JAVA_IMAGE))
-       $(eval USERNAME :=$(shell id -u))
-       $(eval GROUP :=$(shell id -g))
-       docker run --rm --name ${DOCKER_CONTAINER} --user "$(USERNAME):$(GROUP)" --mount type=bind,source=${CURRENT_DIR}/${CERTS_DIR},target=/certs -w /certs --entrypoint "sh" -td $(FULL_JAVA_IMAGE)
-
-# Stops docker container for generating  certificates. 'true' is used to return 0 status code, if container is already deleted
-stop_docker:
-       docker rm ${DOCKER_CONTAINER} -f 1>/dev/null || true
-
-#Clear all files related to certificates
-clear_all:
-       @make clear_existing_certificates
-       @make clear_unused_files
-
-#Clear certificates
-clear_existing_certificates:
-       @echo "Clear certificates"
-       ${DOCKER_EXEC} rm -f certServiceClient-keystore.jks certServiceServer-keystore.jks root.crt truststore.jks certServiceServer-keystore.p12 truststore.pem certServiceServer-cert.pem certServiceServer-key.pem
-       @echo "#####done#####"
-
-#Generate root private and public keys
-root_generate_keys:
-       @echo "Generate root private and public keys"
-       ${DOCKER_EXEC} keytool -genkeypair -v -alias root -keyalg RSA -keysize 4096 -validity 3650 -keystore root-keystore.jks \
-    -dname "CN=root.com, OU=Root Org, O=Root Company, L=Wroclaw, ST=Dolny Slask, C=PL" -keypass secret \
-    -storepass secret -ext BasicConstraints:critical="ca:true"
-       @echo "#####done#####"
-
-#Export public key as certificate
-root_create_certificate:
-       @echo "(Export public key as certificate)"
-       ${DOCKER_EXEC} keytool -exportcert -alias root -keystore root-keystore.jks -storepass secret -file root.crt -rfc
-       @echo "#####done#####"
-
-#Self-signed root (import root certificate into truststore)
-root_self_sign_certificate:
-       @echo "(Self-signed root (import root certificate into truststore))"
-       ${DOCKER_EXEC} keytool -importcert -alias root -keystore truststore.jks -file root.crt -storepass secret -noprompt
-       @echo "#####done#####"
-
-#Generate certService's client private and public keys
-client_generate_keys:
-       @echo "Generate certService's client private and public keys"
-       ${DOCKER_EXEC} keytool -genkeypair -v -alias certServiceClient -keyalg RSA -keysize 2048 -validity 365 \
-    -keystore certServiceClient-keystore.jks -storetype JKS \
-    -dname "CN=certServiceClient.com,OU=certServiceClient company,O=certServiceClient org,L=Wroclaw,ST=Dolny Slask,C=PL" \
-    -keypass secret -storepass secret
-       @echo "####done####"
-
-#Generate certificate signing request for certService's client
-client_generate_csr:
-       @echo "Generate certificate signing request for certService's client"
-       ${DOCKER_EXEC} keytool -certreq -keystore certServiceClient-keystore.jks -alias certServiceClient -storepass secret -file certServiceClient.csr
-       @echo "####done####"
-
-#Sign certService's client certificate by root CA
-client_sign_certificate_by_root:
-       @echo "Sign certService's client certificate by root CA"
-       ${DOCKER_EXEC} keytool -gencert -v -keystore root-keystore.jks -storepass secret -alias root -infile certServiceClient.csr \
-    -outfile certServiceClientByRoot.crt -rfc -ext bc=0  -ext ExtendedkeyUsage="serverAuth,clientAuth"
-       @echo "####done####"
-
-#Import root certificate into client
-client_import_root_certificate:
-       @echo "Import root certificate into intermediate"
-       ${DOCKER_EXEC} sh -c "cat root.crt >> certServiceClientByRoot.crt"
-       @echo "####done####"
-
-#Import signed certificate into certService's client
-client_convert_certificate_to_jks:
-       @echo "Import signed certificate into certService's client"
-       ${DOCKER_EXEC} keytool -importcert -file certServiceClientByRoot.crt -destkeystore certServiceClient-keystore.jks -alias certServiceClient -storepass secret -noprompt
-       @echo "####done####"
-
-#Generate certService private and public keys
-server_generate_keys:
-       @echo "Generate certService private and public keys"
-       ${DOCKER_EXEC} keytool -genkeypair -v -alias oom-cert-service -keyalg RSA -keysize 2048 -validity 365 \
-    -keystore certServiceServer-keystore.jks -storetype JKS \
-    -dname "CN=oom-cert-service,OU=certServiceServer company,O=certServiceServer org,L=Wroclaw,ST=Dolny Slask,C=PL" \
-    -keypass secret -storepass secret -ext BasicConstraints:critical="ca:false"
-       @echo "####done####"
-
-#Generate certificate signing request for certService
-server_generate_csr:
-       @echo "Generate certificate signing request for certService"
-       ${DOCKER_EXEC} keytool -certreq -keystore certServiceServer-keystore.jks -alias oom-cert-service -storepass secret -file certServiceServer.csr
-       @echo "####done####"
-
-#Sign certService certificate by root CA
-server_sign_certificate_by_root:
-       @echo "Sign certService certificate by root CA"
-       ${DOCKER_EXEC} keytool -gencert -v -keystore root-keystore.jks -storepass secret -alias root -infile certServiceServer.csr \
-    -outfile certServiceServerByRoot.crt -rfc -ext bc=0  -ext ExtendedkeyUsage="serverAuth,clientAuth" \
-    -ext SubjectAlternativeName:="DNS:oom-cert-service,DNS:localhost"
-       @echo "####done####"
-
-#Import root certificate into server
-server_import_root_certificate:
-       @echo "Import root certificate into intermediate(server)"
-       ${DOCKER_EXEC} sh -c "cat root.crt >> certServiceServerByRoot.crt"
-       @echo "####done####"
-
-#Import signed certificate into certService
-server_convert_certificate_to_jks:
-       @echo "Import signed certificate into certService"
-       ${DOCKER_EXEC} keytool -importcert -file certServiceServerByRoot.crt -destkeystore certServiceServer-keystore.jks -alias oom-cert-service \
-    -storepass secret -noprompt
-       @echo "####done####"
-
-#Convert certServiceServer-keystore(.jks) to PCKS12 format(.p12)
-server_convert_certificate_to_p12:
-       @echo "Convert certServiceServer-keystore(.jks) to PCKS12 format(.p12)"
-       ${DOCKER_EXEC} keytool -importkeystore -srckeystore certServiceServer-keystore.jks -srcstorepass secret \
-        -destkeystore certServiceServer-keystore.p12 -deststoretype PKCS12 -deststorepass secret
-       @echo "#####done#####"
-
-#Convert truststore(.jks) to PCKS12 format(.p12)
-convert_truststore_to_p12:
-       @echo "Convert certServiceServer-keystore(.jks) to PCKS12 format(.p12)"
-       ${DOCKER_EXEC} keytool -importkeystore -srckeystore truststore.jks -srcstorepass secret \
-        -destkeystore truststore.p12 -deststoretype PKCS12 -deststorepass secret
-       @echo "#####done#####"
-
-#Convert truststore(.p12) to PEM format(.pem)
-convert_truststore_to_pem:
-       @echo "Convert certServiceServer-keystore(.p12) to PEM format(.pem)"
-       ${DOCKER_EXEC} openssl pkcs12 -nodes -in truststore.p12 -out truststore.pem -passin pass:secret
-       @echo "#####done#####"
-
-#Export certificates from certServiceServer-keystore(.p12) to PEM format(.pem)
-server_export_certificate_to_pem:
-       @echo "Export certificates from certServiceClient-keystore(.p12) to PEM format(.pem)"
-       ${DOCKER_EXEC} openssl pkcs12 -in certServiceServer-keystore.p12 -passin 'pass:secret' -nodes -nokeys -out certServiceServer-cert.pem
-       @echo "#####done#####"
-
-#Export keys from certServiceServer-keystore(.p12) to PEM format(.pem)
-server_export_key_to_pem:
-       @echo "Export keys from certServiceClient-keystore(.p12) to PEM format(.pem)"
-       ${DOCKER_EXEC} openssl pkcs12 -in certServiceServer-keystore.p12 -passin 'pass:secret' -nodes -nocerts -out certServiceServer-key.pem
-       @echo "#####done#####"
-
-
-#Clear unused certificates
-clear_unused_files:
-       @echo "Clear unused certificates"
-       ${DOCKER_EXEC} rm -f certServiceClientByRoot.crt certServiceClient.csr root-keystore.jks certServiceServerByRoot.crt  certServiceServer.csr truststore.p12
-       @echo "#####done#####"
index e89dc58..6177278 100644 (file)
@@ -19,3 +19,9 @@ dependencies:
   - name: repositoryGenerator
     version: ~8.x-0
     repository: '@local'
+  - name: certManagerCertificate
+    version: ~8.x-0
+    repository: '@local'
+  - name: cmpv2Config
+    version: ~8.x-0
+    repository: '@local'
\ No newline at end of file
diff --git a/kubernetes/platform/components/oom-cert-service/templates/certificate.yaml b/kubernetes/platform/components/oom-cert-service/templates/certificate.yaml
new file mode 100644 (file)
index 0000000..fd31770
--- /dev/null
@@ -0,0 +1,17 @@
+{{/*
+# Copyright Â© 2020-2021 Nokia
+#
+# 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 "certManagerCertificate.certificate" . }}
index c4d7440..9a6abd4 100644 (file)
@@ -93,9 +93,9 @@ spec:
             - name: ROOT_CERT
               value: "{{ .Values.tls.server.volume.mountPath }}/{{ .Values.envs.truststore.crtName }}"
             - name: KEYSTORE_PASSWORD
-              {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 14 }}
+              {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "certificates-password" "key" "password") | indent 14 }}
             - name: TRUSTSTORE_PASSWORD
-              {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 14 }}
+              {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "certificates-password" "key" "password") | indent 14 }}
           livenessProbe:
             exec:
               command:
diff --git a/kubernetes/platform/components/oom-cert-service/templates/issuer.yaml b/kubernetes/platform/components/oom-cert-service/templates/issuer.yaml
new file mode 100644 (file)
index 0000000..9047ab7
--- /dev/null
@@ -0,0 +1,32 @@
+{{/*
+  # Copyright Â© 2021, Nokia
+  #
+  # 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.
+*/}}
+
+apiVersion: cert-manager.io/v1
+kind: Issuer
+metadata:
+  name: {{ .Values.tls.issuer.selfsigning.name }}
+  namespace: {{ include "common.namespace" . }}
+spec:
+  selfSigned: {}
+---
+apiVersion: cert-manager.io/v1
+kind: Issuer
+metadata:
+  name: {{ .Values.tls.issuer.ca.name }}
+  namespace: {{ include "common.namespace" . }}
+spec:
+  ca:
+    secretName: {{ .Values.tls.issuer.ca.secret.name }}
\ No newline at end of file
index 2d47e6f..5401801 100644 (file)
@@ -28,42 +28,5 @@ data:
   {{ (.Files.Glob "resources/default/cmpServers.json").AsSecrets }}
 {{ end }}
 ---
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ .Values.global.certService.certServiceClient.secret.name | default .Values.tls.client.secret.defaultName }}
-type: Opaque
-data:
-  certServiceClient-keystore.jks:
-  {{ (.Files.Glob "resources/certServiceClient-keystore.jks").AsSecrets }}
-  truststore.jks:
-  {{ (.Files.Glob "resources/truststore.jks").AsSecrets }}
----
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ .Values.tls.server.secret.name }}
-type: Opaque
-data:
-  certServiceServer-keystore.jks:
-  {{ (.Files.Glob "resources/certServiceServer-keystore.jks").AsSecrets }}
-  certServiceServer-keystore.p12:
-  {{ (.Files.Glob "resources/certServiceServer-keystore.p12").AsSecrets }}
-  truststore.jks:
-  {{ (.Files.Glob "resources/truststore.jks").AsSecrets }}
-  root.crt:
-  {{ (.Files.Glob "resources/root.crt").AsSecrets }}
----
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ .Values.tls.provider.secret.name }}
-type: Opaque
-data:
-  certServiceServer-key.pem:
-  {{ (.Files.Glob "resources/certServiceServer-key.pem").AsSecrets }}
-  certServiceServer-cert.pem:
-  {{ (.Files.Glob "resources/certServiceServer-cert.pem").AsSecrets }}
-  truststore.pem:
-  {{ (.Files.Glob "resources/truststore.pem").AsSecrets }}
+
 {{ end -}}
index 537b025..829d3a0 100644 (file)
@@ -79,38 +79,40 @@ cmpServers:
     mountPath: /etc/onap/oom/certservice
 
 tls:
+  issuer:
+    selfsigning:
+      name: &selfSigningIssuer cmpv2-selfsigning-issuer
+    ca:
+      name: &caIssuer cmpv2-ca-issuer
+      secret:
+        name: &caKeyPairSecret  cmpv2-ca-key-pair
   server:
     secret:
-      name: oom-cert-service-server-tls-secret
+      name: &serverSecret oom-cert-service-server-tls-secret
     volume:
       name: oom-cert-service-server-tls-volume
       mountPath: /etc/onap/oom/certservice/certs/
   client:
     secret:
       defaultName: oom-cert-service-client-tls-secret
-  provider:
-    secret:
-      name: cmpv2-issuer-secret
 
 envs:
   keystore:
-    jksName: certServiceServer-keystore.jks
-    p12Name: certServiceServer-keystore.p12
-    pemName: certServiceServer-keystore.pem
+    jksName: keystore.jks
+    p12Name: keystore.p12
+    pemName: tls.crt
   truststore:
     jksName: truststore.jks
-    crtName: root.crt
-    pemName: truststore.pem
+    crtName: ca.crt
+    pemName: tls.crt
   httpsPort: 8443
 
 # External secrets with credentials can be provided to override default credentials defined below,
 # by uncommenting and filling appropriate *ExternalSecret value
 credentials:
   tls:
-    keystorePassword: secret
-    truststorePassword: secret
-    #keystorePasswordExternalSecret:
-    #truststorePasswordExternalSecret:
+    certificatesPassword: secret
+    #certificatesPasswordExternalSecret:
   # Below cmp values contain credentials for EJBCA test instance and are relevant only if global addTestingComponents flag is enabled
   cmp:
     # Used only if cmpv2 testing is enabled
@@ -126,17 +128,11 @@ credentials:
       # rv: unused
 
 secrets:
-  - uid: keystore-password
-    name: '{{ include "common.release" . }}-keystore-password'
-    type: password
-    externalSecret: '{{ tpl (default "" .Values.credentials.tls.keystorePasswordExternalSecret) . }}'
-    password: '{{ .Values.credentials.tls.keystorePassword }}'
-    passwordPolicy: required
-  - uid: truststore-password
-    name: '{{ include "common.release" . }}-truststore-password'
+  - uid: certificates-password
+    name: &certificatesPasswordSecretName '{{ .Values.cmpv2Config.global.platform.certificates.keystorePasswordSecretName }}'
     type: password
-    externalSecret: '{{ tpl (default "" .Values.credentials.tls.truststorePasswordExternalSecret) . }}'
-    password: '{{ .Values.credentials.tls.truststorePassword }}'
+    externalSecret: '{{ tpl (default "" .Values.credentials.tls.certificatesPasswordExternalSecret) . }}'
+    password: '{{ .Values.credentials.tls.certificatesPassword }}'
     passwordPolicy: required
   # Below values are relevant only if global addTestingComponents flag is enabled
   - uid: ejbca-server-client-iak
@@ -155,3 +151,65 @@ secrets:
     type: password
     externalSecret: '{{ tpl (default "" .Values.credentials.cmp.raRvExternalSecret) . }}'
     password: '{{ .Values.credentials.cmp.ra.rv }}'
+
+# Certificates definitions
+certificates:
+  - name: selfsigned-cert
+    secretName: *caKeyPairSecret
+    isCA: true
+    commonName: root.com
+    subject:
+      organization: Root Company
+      country: PL
+      locality: Wroclaw
+      province: Dolny Slask
+      organizationalUnit: Root Org
+    issuer:
+      name: *selfSigningIssuer
+      kind: Issuer
+  - name: cert-service-server-cert
+    secretName: *serverSecret
+    commonName: oom-cert-service
+    dnsNames:
+      - oom-cert-service
+      - localhost
+    subject:
+      organization: certServiceServer org
+      country: PL
+      locality: Wroclaw
+      province: Dolny Slask
+      organizationalUnit: certServiceServer company
+    usages:
+      - server auth
+      - client auth
+    keystore:
+      outputType:
+        - jks
+        - p12
+      passwordSecretRef:
+        name: *certificatesPasswordSecretName
+        key: password
+    issuer:
+      name: *caIssuer
+      kind: Issuer
+  - name: cert-service-client-cert
+    secretName: '{{ .Values.cmpv2Config.global.platform.certificates.clientSecretName | default .Values.tls.client.secret.defaultName }}'
+    commonName: certServiceClient.com
+    subject:
+      organization: certServiceClient org
+      country: PL
+      locality: Wroclaw
+      province: Dolny Slask
+      organizationalUnit: certServiceClient company
+    usages:
+      - server auth
+      - client auth
+    keystore:
+      outputType:
+        - jks
+      passwordSecretRef:
+        name: *certificatesPasswordSecretName
+        key: password
+    issuer:
+      name: *caIssuer
+      kind: Issuer
index 7ab384e..d48070c 100755 (executable)
@@ -63,7 +63,7 @@ usage ()
 
 # Check if execscript flag is used and drop it from input arguments
 
-if [[ "${!#}" == "execscript" ]]; then
+if [[ "${!#}" = "execscript" ]]; then
         set -- "${@:1:$#-1}"
         execscript=true
 fi
index 576b669..97f4e4d 100755 (executable)
@@ -18,7 +18,7 @@
 # Run the testsuite for the passed tag. Valid tags are listed in usage help
 # Please clean up logs when you are done...
 #
-if [ "$1" == "" ] || [ "$2" == "" ]; then
+if [ "$1" = "" ] || [ "$2" = "" ]; then
    echo "Usage: ete-k8s.sh [namespace] [tag] [execscript]"
    echo ""
    echo "  List of test case tags (filename for intent: tag)"
@@ -76,7 +76,7 @@ SCRIPTDIR=scripts/etescript
 
 ETEHOME=/var/opt/ONAP
 
-if [[ "${!#}" == "execscript" ]]; then
+if [[ "${!#}" = "execscript" ]]; then
    for script in $(ls -1 "$DIR/$SCRIPTDIR"); do
       [ -f "$DIR/$SCRIPTDIR/$script" ] && [ -x "$DIR/$SCRIPTDIR/$script" ] && source "$DIR/$SCRIPTDIR/$script"
    done
index b8b8708..2512e5f 100755 (executable)
@@ -18,7 +18,7 @@
 # Run the health-check testsuites for the tags discovered by helm list
 # Please clean up logs when you are done...
 #
-if [ "$1" == "" ] ;  then
+if [ "$1" = "" ] ;  then
    echo "Usage: eteHelm-k8s.sh [namespace] [execscript]"
    echo " list projects via helm list and runs health-check with those tags except dev and dev-consul"
    echo " [execscript] - optional parameter to execute user custom scripts located in scripts/helmscript directory"
@@ -44,7 +44,7 @@ SCRIPTDIR=scripts/helmscript
 
 ETEHOME=/var/opt/ONAP
 
-if [[ "${!#}" == "execscript" ]]; then
+if [[ "${!#}" = "execscript" ]]; then
    for script in $(ls -1 "$DIR/$SCRIPTDIR"); do
       [ -f "$DIR/$SCRIPTDIR/$script" ] && [ -x "$DIR/$SCRIPTDIR/$script" ] && source "$DIR/$SCRIPTDIR/$script"
    done
index 77577d6..045136a 100644 (file)
@@ -35,8 +35,8 @@ global:
 # Application configuration defaults.
 #################################################################
 # application image
-image: onap/sdc-backend-all-plugins:1.8.4
-backendInitImage: onap/sdc-backend-init:1.8.4
+image: onap/sdc-backend-all-plugins:1.8.5
+backendInitImage: onap/sdc-backend-init:1.8.5
 
 pullPolicy: Always
 
index 33e32dd..3422f9d 100644 (file)
@@ -38,8 +38,8 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/sdc-cassandra:1.8.4
-cassandraInitImage: onap/sdc-cassandra-init:1.8.4
+image: onap/sdc-cassandra:1.8.5
+cassandraInitImage: onap/sdc-cassandra-init:1.8.5
 pullPolicy: Always
 
 config:
index 079d7ad..7aad4c1 100644 (file)
@@ -47,7 +47,7 @@ certInitializer:
 # Application configuration defaults.
 #################################################################
 # application image
-image: onap/sdc-frontend:1.8.4
+image: onap/sdc-frontend:1.8.5
 pullPolicy: Always
 
 config:
diff --git a/kubernetes/sdc/components/sdc-helm-validator/Chart.yaml b/kubernetes/sdc/components/sdc-helm-validator/Chart.yaml
new file mode 100644 (file)
index 0000000..5af3bf7
--- /dev/null
@@ -0,0 +1,20 @@
+# ===========LICENSE_START========================================================
+# Copyright (c) 2021 Nokia. 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.
+# 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.
+# ============LICENSE_END=========================================================
+
+apiVersion: v1
+description: ONAP Service Design and Creation Helm Validator
+name: sdc-helm-validator
+version: 8.0.0
diff --git a/kubernetes/sdc/components/sdc-helm-validator/requirements.yaml b/kubernetes/sdc/components/sdc-helm-validator/requirements.yaml
new file mode 100644 (file)
index 0000000..8e1160a
--- /dev/null
@@ -0,0 +1,23 @@
+# ===========LICENSE_START========================================================
+# Copyright (c) 2021 Nokia. 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.
+# 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.
+# ============LICENSE_END=========================================================
+
+dependencies:
+  - name: repositoryGenerator
+    version: ~8.x-0
+    repository: '@local'
+  - name: common
+    version: ~8.x-0
+    repository: '@local'
diff --git a/kubernetes/sdc/components/sdc-helm-validator/templates/deployment.yaml b/kubernetes/sdc/components/sdc-helm-validator/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..08228ad
--- /dev/null
@@ -0,0 +1,44 @@
+{{/*
+# ===========LICENSE_START========================================================
+# Copyright (c) 2021 Nokia. 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.
+# 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.
+# ============LICENSE_END=========================================================
+*/}}
+
+apiVersion: apps/v1
+kind: Deployment
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
+spec:
+  selector: {{- include "common.selectors" . | nindent 4 }}
+  replicas: 1
+  template:
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
+    spec:
+      containers:
+        - name: {{ include "common.name" . }}
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          resources: {{ include "common.resources" . | nindent 12 }}
+          ports: {{ include "common.containerPorts" . | nindent 12 }}
+          env:
+            - name: LOG_LEVEL
+              value: {{ .Values.config.loggingLevel }}
+          livenessProbe:
+            httpGet:
+              path: {{ .Values.liveness.path }}
+              port: {{ .Values.liveness.port }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/sdc/components/sdc-helm-validator/templates/service.yaml b/kubernetes/sdc/components/sdc-helm-validator/templates/service.yaml
new file mode 100644 (file)
index 0000000..a5837af
--- /dev/null
@@ -0,0 +1,19 @@
+{{/*
+# ===========LICENSE_START========================================================
+# Copyright (c) 2021 Nokia. 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.
+# 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.
+# ============LICENSE_END=========================================================
+*/}}
+
+{{ include "common.service" . }}
diff --git a/kubernetes/sdc/components/sdc-helm-validator/values.yaml b/kubernetes/sdc/components/sdc-helm-validator/values.yaml
new file mode 100644 (file)
index 0000000..9c0d906
--- /dev/null
@@ -0,0 +1,58 @@
+# ===========LICENSE_START========================================================
+# Copyright (c) 2021 Nokia. 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.
+# 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.
+# ============LICENSE_END=========================================================
+
+# Global values
+global:
+  pullPolicy: Always
+
+image: onap/org.onap.sdc.sdc-helm-validator:1.2.0
+containerPort: &svc_port 8080
+
+config:
+  loggingLevel: INFO
+
+service:
+  type: ClusterIP
+  ports:
+    - name: &port http
+      port: *svc_port
+
+liveness:
+  initialDelaySeconds: 30
+  periodSeconds: 30
+  path: /actuator/health
+  port: *port
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+flavor: small
+resources:
+  small:
+    limits:
+      cpu: 1
+      memory: 256Mi
+    requests:
+      cpu: 1
+      memory: 256Mi
+  large:
+    limits:
+      cpu: 2
+      memory: 1Gi
+    requests:
+      cpu: 1
+      memory: 256Mi
+  unlimited: {}
index e34d5c5..7e4dddd 100644 (file)
@@ -59,8 +59,8 @@ certInitializer:
 # Application configuration defaults.
 #################################################################
 # application image
-image: onap/sdc-onboard-backend:1.8.4
-onboardingInitImage: onap/sdc-onboard-cassandra-init:1.8.4
+image: onap/sdc-onboard-backend:1.8.5
+onboardingInitImage: onap/sdc-onboard-cassandra-init:1.8.5
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 7ed88c5..2f2cb6c 100644 (file)
@@ -34,3 +34,7 @@ dependencies:
     version: ~8.x-0
     repository: 'file://components/sdc-wfd-fe'
     condition: sdc-wfd.enabled
+  - name: sdc-helm-validator
+    version: ~8.x-0
+    repository: 'file://components/sdc-helm-validator'
+    condition: sdc-helm-validator.enabled
index fef7dab..b7476a5 100644 (file)
@@ -63,3 +63,5 @@ cassandra:
 # dependency / sub-chart configuration
 sdc-wfd:
   enabled: true
+sdc-helm-validator:
+  enabled: true
index 67282d5..b37b2be 100644 (file)
@@ -49,7 +49,7 @@ secrets:
 # Application configuration defaults.
 #################################################################
 # application image
-image: onap/sdnc-dmaap-listener-image:2.1.3
+image: onap/sdnc-dmaap-listener-image:2.1.5
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 6abffb0..f9c8ca4 100644 (file)
@@ -49,7 +49,7 @@ secrets:
 # Application configuration defaults.
 #################################################################
 # application image
-image: onap/sdnc-ansible-server-image:2.1.3
+image: onap/sdnc-ansible-server-image:2.1.5
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 5a53fa1..feb6662 100755 (executable)
@@ -17,7 +17,7 @@
 */}}
 
 debugLog(){
-  if [ "$enableDebugLogging" == true ]; then
+  if [ "$enableDebugLogging" = true ]; then
      if [ $# -eq 0 ]; then
        echo "" >> $LOGFILE
      else
index 9c81069..9485833 100755 (executable)
@@ -17,7 +17,7 @@
 */}}
 
 debugLog(){
-  if [ "$enableDebugLogging" == true ]; then
+  if [ "$enableDebugLogging" = true ]; then
      if [ $# -eq 0 ]; then
        echo "" >> $LOGFILE
      else
index 7764d00..fa76a9e 100755 (executable)
@@ -24,7 +24,7 @@ fi
 
 # should PROM start as passive?
 state=$( bin/sdnc.cluster )
-if [ "$state" == "standby" ]; then
+if [ "$state" = "standby" ]; then
   echo "Starting PROM in passive mode"
   passive="-p"
 fi
index 8057547..c36d2e3 100755 (executable)
@@ -26,7 +26,7 @@ LOGFILE="/app/geo.log"
 enableDebugLogging=true
 
 debugLog(){
-  if [ "$enableDebugLogging" == true ]; then
+  if [ "$enableDebugLogging" = true ]; then
      if [ $# -eq 0 ]; then
        echo "" >> $LOGFILE
      else
index 3577c84..acd21ae 100644 (file)
@@ -23,7 +23,7 @@ global:
 # Application configuration defaults.
 #################################################################
 # application image
-image: "onap/sdnc-web-image:2.1.3"
+image: "onap/sdnc-web-image:2.1.5"
 pullPolicy: Always
 
 config:
index 6f8b525..b5c0629 100644 (file)
@@ -55,7 +55,7 @@ secrets:
 # Application configuration defaults.
 #################################################################
 # application image
-image: onap/sdnc-ueb-listener-image:2.1.3
+image: onap/sdnc-ueb-listener-image:2.1.5
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 399740e..43201fe 100644 (file)
@@ -195,6 +195,7 @@ certificates:
       outputType:
         - jks
       passwordSecretRef:
+        create: true
         name: sdnc-cmpv2-keystore-password
         key: password
     issuer:
@@ -207,7 +208,7 @@ certificates:
 # application images
 
 pullPolicy: Always
-image: onap/sdnc-image:2.1.3
+image: onap/sdnc-image:2.1.5
 
 # flag to enable debugging - application support required
 debugEnabled: false
index c7ec266..3e59cbf 100755 (executable)
@@ -62,7 +62,7 @@ secrets:
 #################################################################
 # Application configuration defaults.
 #################################################################
-image: onap/so/bpmn-infra:1.8.1
+image: onap/so/bpmn-infra:1.8.2
 pullPolicy: Always
 
 db:
index c83172d..6308e9f 100755 (executable)
@@ -61,7 +61,7 @@ secrets:
 #################################################################
 # Application configuration defaults.
 #################################################################
-image: onap/so/catalog-db-adapter:1.8.1
+image: onap/so/catalog-db-adapter:1.8.2
 pullPolicy: Always
 
 db:
index 0ecb925..29fc50b 100755 (executable)
@@ -57,7 +57,7 @@ secrets:
 #################################################################
 # Application configuration defaults.
 #################################################################
-image: onap/so/openstack-adapter:1.8.1
+image: onap/so/openstack-adapter:1.8.2
 pullPolicy: Always
 
 db:
index 8cf7874..c117a74 100755 (executable)
@@ -57,7 +57,7 @@ secrets:
 #################################################################
 # Application configuration defaults.
 #################################################################
-image: onap/so/request-db-adapter:1.8.1
+image: onap/so/request-db-adapter:1.8.2
 pullPolicy: Always
 
 db:
index 36770ad..b1d7173 100755 (executable)
@@ -57,7 +57,7 @@ secrets:
 #################################################################
 # Application configuration defaults.
 #################################################################
-image: onap/so/sdc-controller:1.8.1
+image: onap/so/sdc-controller:1.8.2
 pullPolicy: Always
 
 db:
index c8e2abc..9a67ef8 100755 (executable)
@@ -72,7 +72,7 @@ secrets:
 #################################################################
 # Application configuration defaults.
 #################################################################
-image: onap/so/sdnc-adapter:1.8.1
+image: onap/so/sdnc-adapter:1.8.2
 pullPolicy: Always
 
 org:
index 1358795..ba98c34 100755 (executable)
@@ -162,7 +162,7 @@ dbCreds:
   userName: so_user
   adminName: so_admin
 
-image: onap/so/api-handler-infra:1.8.1
+image: onap/so/api-handler-infra:1.8.2
 
 server:
   aaf:
diff --git a/tox.ini b/tox.ini
index fcabf9c..01e9953 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -17,11 +17,11 @@ commands =
 [testenv:docs]
 deps = -rdocs/requirements-docs.txt
 commands =
- sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
+ sphinx-build -q -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
 
 [testenv:docs-linkcheck]
 deps = -rdocs/requirements-docs.txt
-commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+commands = sphinx-build -q -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
 
 [testenv:spelling]
 #basepython = python3