Merge "[DCAEGEN2] Update CMPv2 certs usage in dcaegen2-services"
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Fri, 28 May 2021 19:52:04 +0000 (19:52 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 28 May 2021 19:52:04 +0000 (19:52 +0000)
30 files changed:
kubernetes/aaf/components/aaf-cass/resources/cass-init-dats/artifact.dat
kubernetes/common/cassandra/resources/restore.sh
kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
kubernetes/common/common/templates/_service.tpl
kubernetes/config/prepull_docker.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/rke/rke_setup.sh
kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl
kubernetes/dcaegen2-services/components/dcae-ves-collector/values.yaml
kubernetes/dcaegen2/components/dcae-bootstrap/values.yaml
kubernetes/helm/plugins/deploy/deploy.sh
kubernetes/helm/plugins/undeploy/undeploy.sh
kubernetes/portal/docker/init/mariadb-client/db_migrate.sh
kubernetes/robot/demo-k8s.sh
kubernetes/robot/ete-k8s.sh
kubernetes/robot/eteHelm-k8s.sh
kubernetes/robot/scripts/etescript/vnfsdk-etescript.sh
kubernetes/sdc/components/sdc-be/templates/deployment.yaml
kubernetes/sdc/components/sdc-be/templates/job.yaml
kubernetes/sdc/components/sdc-be/values.yaml
kubernetes/sdc/components/sdc-cs/values.yaml
kubernetes/sdc/components/sdc-fe/templates/deployment.yaml
kubernetes/sdc/components/sdc-fe/values.yaml
kubernetes/sdc/components/sdc-onboarding-be/templates/deployment.yaml
kubernetes/sdc/components/sdc-onboarding-be/values.yaml
kubernetes/sdc/requirements.yaml
kubernetes/sdc/resources/config/environments/AUTO.json
kubernetes/sdc/values.yaml
kubernetes/so/components/so-sdnc-adapter/resources/config/overrides/override.yaml

index a5e3540..84bd723 100644 (file)
@@ -45,8 +45,7 @@ ngi@ngi.onap.org|ngi|local|/opt/app/osaaf/local||mailto:|org.onap.ngi|root|30|{'
 oof@oof.onap.org|oof.api.simpledemo.onap.org|local|/opt/app/osaaf/local||mailto:jflood@att.com|org.onap.oof|root|30|{'cmso-onap', 'cmso.api.simpledemo.onap.org', 'cmso.onap', 'oof-has-api', 'oof-has-api.onap', 'oof-onap', 'oof-opteng', 'oof-opteng.onap', 'oof-osdf', 'oof-osdf.onap', 'oof.api.simpledemo.onap.org', 'oof.onap'}|mmanager@osaaf.org|{'file', 'jks', 'pkcs12', 'script'}
 oof@oof.onap.org|oof|local|/opt/app/osaaf/local||mailto:jflood@att.com|org.onap.oof|root|30|{'cmso-onap', 'cmso.api.simpledemo.onap.org', 'cmso.onap', 'oof-has-api', 'oof-has-api.onap', 'oof-onap', 'oof-osdf', 'oof-osdf.onap', 'oof.api.simpledemo.onap.org', 'oof.onap'}|aaf_admin@osaaf.org|{'file', 'jks', 'pkcs12', 'script'}
 oof@oof.onap.org|oof.onap|local|/opt/app/osaaf/local||mailto:jflood@att.com|org.onap.oof|root|30|{'cmso-onap', 'cmso.api.simpledemo.onap.org', 'cmso.onap', 'oof-cmso', 'oof-cmso-optimizer', 'oof-cmso-ticketmgt', 'oof-cmso-topology', 'oof-has-api', 'oof-has-api.onap', 'oof-onap', 'oof-opteng', 'oof-opteng.onap', 'oof-osdf', 'oof-osdf.onap', 'oof.api.simpledemo.onap.org', 'oof.onap'}|mmanager@osaaf.org|{'file', 'jks', 'pkcs12', 'script'}
-policy@policy.onap.org|policy|local|/opt/app/osaaf/local||mailto:|org.onap.policy|root|60|{'*.pdp', '*.pdp.onap.svc.cluster.local', 'brmsgw', 'brmsgw.onap', 'drools', 'drools.onap', 'pap', 'pap.onap', 'pdp', 'pdp.onap', 'policy', 'policy-apex-pdp', 'policy-apex-pdp.onap', 'policy-api', 'policy-api.onap', 'policy-distribution', 'policy-distribution.onap', 'policy-pap', 'policy-pap.onap', 'policy-xacml-pdp', 'policy-xacml-pdp.onap', 'policy.api.simpledemo.onap.org'}|mmanager@osaaf.org|{'file', 'jks', 'pkcs12', 'script'}
-policy@policy.onap.org|policy_onap|local|/opt/app/osaaf/local||mailto:|org.onap.policy|root|30|{'*.pdp', '*.pdp.onap.svc.cluster.local', 'brmsgw', 'brmsgw.onap', 'drools', 'drools.onap', 'pap', 'pap.onap', 'pdp', 'pdp.onap', 'policy', 'policy-apex-pdp', 'policy-apex-pdp.onap', 'policy-distribution', 'policy-distribution.onap', 'policy.api.simpledemo.onap.org'}|aaf_admin@osaaf.org|{'pkcs12'}
+policy@policy.onap.org|policy|local|/opt/app/osaaf/local||mailto:|org.onap.policy|root|60|{'policy-drools-pdp', 'policy-drools-pdp.onap', 'policy', 'policy-apex-pdp', 'policy-apex-pdp.onap', 'policy-api', 'policy-api.onap', 'policy-distribution', 'policy-distribution.onap', 'policy-pap', 'policy-pap.onap', 'policy-xacml-pdp', 'policy-xacml-pdp.onap', 'policy.api.simpledemo.onap.org'}|mmanager@osaaf.org|{'file', 'jks', 'pkcs12', 'script'}
 pomba@pomba.onap.org|onap.pomba|local|/opt/app/osaaf/local||mailto:|org.onap.pomba|root|30|{'onap.pomba', 'onap_pomba', 'pomba', 'pomba.api.simpledemo.onap.org', 'pomba.onap', 'pomba_onap'}|aaf_admin@osaaf.org|{'jks', 'pkcs12', 'script'}
 portal@portal.onap.org|portal|local|/opt/app/osaaf/local||mailto:|org.onap.portal|root|30|{'onap.portal', 'onap_portal', 'portal', 'portal-app', 'portal.api.simpledemo.onap.org', 'portal.onap', 'portal_onap'}|aaf_admin@osaaf.org|{'pkcs12', 'script'}
 refrepo@refrepo.onap.org|refrepo|local|/opt/app/osaaf/local||mailto:|org.onap.refrepo|root|30|{'refrepo', 'refrepo.api.simpledemo.onap.org', 'refrepo.onap'}|aaf_admin@osaaf.org|{'file', 'pkcs12'}
index a810534..7f271d2 100644 (file)
@@ -41,7 +41,7 @@ then
        print_usage
 fi
 
-while [[ $# -gt 0 ]]
+while [ $# -gt 0 ]
 do
 key="$1"
 shift
index cb4153e..6df7505 100755 (executable)
@@ -1,7 +1,7 @@
-#!/bin/bash
+#!/bin/sh
 {{/*
 
-# Copyright © 2020 Bell Canada
+# Copyright © 2020-2021 Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
index 9c3010c..8489cc5 100644 (file)
@@ -181,6 +181,8 @@ labels: {{- include "common.labels" (dict "labels" $labels "dot" $dot) | nindent
 {{- $labels := default (dict) .labels -}}
 {{- $matchLabels := default (dict) .matchLabels -}}
 {{- $sessionAffinity := default "None" $dot.Values.service.sessionAffinity -}}
+{{- $kubeTargetVersion := default $dot.Capabilities.KubeVersion.Version | trimPrefix "v" -}}
+{{- $ipFamilyPolicy := default "PreferDualStack" $dot.Values.service.ipFamilyPolicy -}}
 apiVersion: v1
 kind: Service
 metadata: {{ include "common.serviceMetadata" (dict "suffix" $suffix "annotations" $annotations "msb_informations" $msb_informations "labels" $labels "dot" $dot) | nindent 2 }}
@@ -189,6 +191,9 @@ spec:
   clusterIP: None
   {{- end }}
   ports: {{- include "common.servicePorts" (dict "serviceType" $serviceType "ports" $ports "dot" $dot "add_plain_port" $add_plain_port) | nindent 4 }}
+  {{- if semverCompare ">=1.20.0" $kubeTargetVersion }}
+  ipFamilyPolicy: {{ $ipFamilyPolicy }}
+  {{- end }}
   {{- if $publishNotReadyAddresses }}
   publishNotReadyAddresses: true
   {{- end }}
index 040adec..590d651 100755 (executable)
@@ -102,7 +102,7 @@ do
         for line in  `parse_yaml $filename`
         do
                 #skiping commented line
-                if [[ ${line:0:1} != '#' ]]; then
+                if [ "${line:0:1}" != '#' ]; then
                         #find all image subtag inside converted values.yaml file's lines
                         if echo $line | grep -q $IMAGE_TEXT ; then
                                 #find imageName inside line
index 1a75bd7..67bbfd6 100755 (executable)
@@ -86,9 +86,11 @@ deploy() {
        target_machine_notice_info
 }
 
-if [[ $# -eq 1 ]] && [[ $1 = "-h" || $1 = "--help" ]]; then
+if [ $# -eq 1 ] && [ "$1" = "-h" ]; then
        usage
-elif [[ $# -eq 1 ]] && [[ $1 = "--info" ]]; then
+elif [ $# -eq 1 ] && [ "$1" = "--help" ]; then
+       usage
+elif [ $# -eq 1 ] && [ "$1" = "--info" ]; then
        target_machine_notice_info
 else
        deploy $@
index 44fe79a..bf2bc12 100755 (executable)
@@ -76,9 +76,11 @@ manual_configuration() {
        generate_config_map $@
 }
 
-if [[ $# -eq 1 ]] && [[ $1 = "-h" || $1 = "--help" ]]; then
+if [ $# -eq 1 ] && [ "$1" = "-h" ]; then
        usage
-elif [[ $# -eq 0 ]]; then
+if [ $# -eq 1 ] && [ "$1" = "--help" ]; then
+       usage
+elif [ $# -eq 0 ]; then
        automatic_configuration
 else
        manual_configuration $@
index 7950e0c..2ee123b 100755 (executable)
@@ -344,7 +344,7 @@ while getopts ":b:s:e:u:l:k:v" PARAM; do
     esac
 done
 
-if [[ -z $BRANCH ]]; then
+if [ -z $BRANCH ]; then
   usage
   exit 1
 fi
index 1e7c3b4..310d9ae 100644 (file)
@@ -274,6 +274,10 @@ spec:
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}
         env:
+        {{- range $cred := .Values.credentials }}
+        - name: {{ $cred.name }}
+          {{- include "common.secret.envFromSecretFast" (dict "global" $ "uid" $cred.uid "key" $cred.key) | indent 10 }}
+        {{- end }}
         {{- if $certDir }}
         - name: DCAE_CA_CERTPATH
           value: {{ $certDir }}/cacert.pem
@@ -317,6 +321,8 @@ spec:
         volumeMounts:
         - mountPath: /app-config
           name: app-config
+        - mountPath: /app-config-input
+          name: app-config-input
         {{- if $logDir }}
         - mountPath: {{ $logDir}}
           name: component-log
index 32f5072..9e08ea1 100644 (file)
@@ -41,7 +41,7 @@ certPostProcessorImage: onap/org.onap.oom.platform.cert-service.oom-certservice-
 # Application configuration defaults.
 #################################################################
 # application image
-image: onap/org.onap.dcaegen2.collectors.ves.vescollector:1.8.0
+image: onap/org.onap.dcaegen2.collectors.ves.vescollector:1.9.2
 pullPolicy: Always
 
 # log directory where logging sidecar should look for log files
index ae86c43..694940e 100644 (file)
@@ -111,7 +111,7 @@ default_k8s_location: central
 # Use to override default setting in blueprints
 componentImages:
   tcagen2: onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.2.1
-  ves: onap/org.onap.dcaegen2.collectors.ves.vescollector:1.8.0
+  ves: onap/org.onap.dcaegen2.collectors.ves.vescollector:1.9.2
   prh: onap/org.onap.dcaegen2.services.prh.prh-app-server:1.5.6
   hv_ves: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.8.0
 
index 0d434ad..ce8e802 100755 (executable)
@@ -49,14 +49,14 @@ 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
     else
       SUBCHART_DIR="$CACHE_SUBCHART_DIR/$(echo "$START" |cut -d':' -f1)"
-      if [[ -d "$SUBCHART_DIR" ]]; then
-        if [[ -z "$END" ]]; then
+      if [ -d "$SUBCHART_DIR" ]; then
+        if [ -z "$END" ]; then
           cat $COMPUTED_OVERRIDES | sed -n '/^'"$START"'/,/'"$END"'/p' \
             | sed '1d;$d' | cut -c3- > $SUBCHART_DIR/subchart-overrides.yaml
         else
@@ -72,11 +72,11 @@ resolve_deploy_flags() {
   n=${#flags[*]}
   i=0 ; while [ "$i" -lt "$n" ]; 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
@@ -89,7 +89,7 @@ resolve_deploy_flags() {
 
 deploy() {
   # validate params
-  if [[ -z "$1" || -z "$2" ]]; then
+  if [ -z "$1" ] || [ -z "$2" ]; then
     usage
     exit 0
   fi
@@ -99,7 +99,7 @@ deploy() {
   FLAGS=${@:3}
   CHART_REPO="$(echo "$CHART_URL" |cut -d'/' -f1)"
   CHART_NAME="$(echo "$CHART_URL" |cut -d'/' -f2)"
-  if [[ $HELM_VER = "v3."* ]]; then
+  if expr "$HELM_VER" : "v3\..*" ; then
     CACHE_DIR=~/.local/share/helm/plugins/deploy/cache
   else
     CACHE_DIR=~/.helm/plugins/deploy/cache
@@ -111,23 +111,23 @@ deploy() {
 
   # determine if verbose output is enabled
   VERBOSE="false"
-  if [[ $FLAGS = *"--verbose"* ]]; then
+  if expr "$FLAGS" : ".*--verbose.*" ; then
     FLAGS="$(echo $FLAGS| sed -n 's/--verbose//p')"
     VERBOSE="true"
   fi
   # determine if delay for deployment is enabled
   DELAY="false"
-  if [[ $FLAGS = *"--delay"* ]]; then
+  if expr "$FLAGS" : ".*--delay.*" ; then
     FLAGS="$(echo $FLAGS| sed -n 's/--delay//p')"
     DELAY="true"
   fi
   # determine if set-last-applied flag is enabled
   SET_LAST_APPLIED="false"
-  if [[ $FLAGS = *"--set-last-applied"* ]]; then
+  if expr"$FLAGS" : ".*--set-last-applied.*" ; then
     FLAGS="$(echo $FLAGS| sed -n 's/--set-last-applied//p')"
     SET_LAST_APPLIED="true"
   fi
-  if [[ $FLAGS = *"--dry-run"* ]]; then
+  if expr "$FLAGS" : ".*--dry-run.*" ; then
     VERBOSE="true"
     FLAGS="$FLAGS --debug"
   fi
@@ -150,7 +150,7 @@ deploy() {
   SUBCHART_RELEASE="$(echo "$RELEASE" |cut -d'-' -f2)"
   # update specified subchart without parent
   RELEASE="$(echo "$RELEASE" |cut -d'-' -f1)"
-  if [[ $SUBCHART_RELEASE = $RELEASE ]]; then
+  if [ "$SUBCHART_RELEASE" = "$RELEASE" ]; then
     SUBCHART_RELEASE=
   fi
 
@@ -158,7 +158,7 @@ deploy() {
   rm -rf $CACHE_DIR
 
   # fetch umbrella chart (parent chart containing subcharts)
-  if [[ -d "$CHART_URL" ]]; then
+  if [ -d "$CHART_URL" ]; then
     mkdir -p $CHART_DIR
     cp -R $CHART_URL/* $CHART_DIR/
 
@@ -195,20 +195,20 @@ deploy() {
   generate_overrides $COMPUTED_OVERRIDES $GLOBAL_OVERRIDES
 
   # upgrade/install parent chart first
-  if [[ -z "$SUBCHART_RELEASE" ]]; then
+  if [ -z "$SUBCHART_RELEASE" ]; then
     LOG_FILE=$LOG_DIR/${RELEASE}.log
     :> $LOG_FILE
 
     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
@@ -224,12 +224,12 @@ deploy() {
     SUBCHART_OVERRIDES=$CACHE_SUBCHART_DIR/$subchart/subchart-overrides.yaml
 
     SUBCHART_ENABLED=0
-    if [[ -f $SUBCHART_OVERRIDES ]]; then
+    if [ -f $SUBCHART_OVERRIDES ]; then
       SUBCHART_ENABLED=$(cat $SUBCHART_OVERRIDES | grep -c "^enabled: true")
     fi
 
-    if [[ $SUBCHART_ENABLED -eq 1 ]]; then
-      if [[ -z "$SUBCHART_RELEASE" || $SUBCHART_RELEASE = "$subchart" ]]; then
+    if [ $SUBCHART_ENABLED -eq 1 ]; then
+      if [ -z "$SUBCHART_RELEASE" ] || [ "$SUBCHART_RELEASE" = "$subchart" ]; then
         LOG_FILE=$LOG_DIR/"${RELEASE}-${subchart}".log
         :> $LOG_FILE
 
@@ -237,19 +237,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
@@ -257,7 +257,7 @@ deploy() {
       array=($(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}"))
       n=${#array[*]}
       for i in $(seq $(($n-1)) -1 0); do
-        if [[ $HELM_VER = "v3."* ]]; then
+        if expr "$HELM_VER" : "v3\..*" ; then
           helm del "${array[i]}"
         else
           helm del "${array[i]}" --purge
@@ -267,7 +267,7 @@ deploy() {
   done
 
   # report on success/failures of installs/upgrades
-  if [[ $HELM_VER = "v3."* ]]; then
+  if expr "$HELM_VER" : "v3\..*" ; then
     helm ls --all-namespaces | grep -i FAILED | grep $RELEASE
   else
     helm ls | grep FAILED | grep $RELEASE
index 1689bf1..790f84f 100755 (executable)
@@ -29,7 +29,7 @@ undeploy() {
   done
 }
 
-if [[ $# < 1 ]]; then
+if [ $# < 1 ]; then
   echo "Error: command 'undeploy' requires a release name"
   exit 0
 fi
index 6f62a0e..2b90a99 100644 (file)
 SQL_DEST_DIR=${SQL_DEST_DIR:-/tmp/sql}
 DB_PORT=${DB_PORT:-3306}
 
-[[ -z "$SQL_SRC_DIR" ]] && { echo "Error: SQL_SRC_DIR must be provided as an environment variable"; exit 1; }
-[[ -z "$DB_USER" ]] && { echo "Error: DB_USER must be provided as an environment variable"; exit 1; }
-[[ -z "$DB_PASS" ]] && { echo "Error: DB_PASS must be provided as an environment variable"; exit 1; }
-[[ -z "$DB_HOST" ]] && { echo "Error: DB_HOST must be provided as an environment variable"; exit 1; }
+[ -z "$SQL_SRC_DIR" ] && { echo "Error: SQL_SRC_DIR must be provided as an environment variable"; exit 1; }
+[ -z "$DB_USER" ] && { echo "Error: DB_USER must be provided as an environment variable"; exit 1; }
+[ -z "$DB_PASS" ] && { echo "Error: DB_PASS must be provided as an environment variable"; exit 1; }
+[ -z "$DB_HOST" ] && { echo "Error: DB_HOST must be provided as an environment variable"; exit 1; }
 
 mkdir -p $SQL_DEST_DIR
 
index d48070c..099f80c 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 97f4e4d..15d07fb 100755 (executable)
@@ -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 2512e5f..d5e2fa4 100755 (executable)
@@ -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 19864d4..a93f109 100755 (executable)
@@ -35,7 +35,7 @@ copy_package_certs_to_robot () {
 
 mkdir "$DIR/$SCRIPTDIR/tmp"
 cd "$DIR/$SCRIPTDIR/tmp"
-if [[ -f rootCA-robot-$SDCVALID.cert  &&  -f package-robot-$SDCVALID.cert  &&  -f package-robot-$SDCINVALID.cert  &&  -f package-private-robot-$SDCVALID.key  &&  -f package-private-robot-$SDCINVALID.key ]]; then
+if [ -f rootCA-robot-$SDCVALID.cert ] && [ -f package-robot-$SDCVALID.cert ] && [ -f package-robot-$SDCINVALID.cert ] && [ -f package-private-robot-$SDCVALID.key ] && [ -f package-private-robot-$SDCINVALID.key ]; then
         echo "All files are present";
 else
         generate_ca_key_cert_and_package_cert_issued_by_CA $SDCVALID
index 28e9c13..346534c 100644 (file)
@@ -119,8 +119,7 @@ spec:
           livenessProbe:
             httpGet:
               path: /sdc2/rest/healthCheck
-              port: {{ .Values.liveness.port }}
-              scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
+              port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
             periodSeconds: {{ .Values.liveness.periodSeconds }}
             timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
@@ -128,9 +127,9 @@ spec:
             failureThreshold: {{ .Values.liveness.failureThreshold }}
           {{ end }}
           readinessProbe:
-            exec:
-              command:
-              - "/var/lib/jetty/ready-probe.sh"
+            httpGet:
+              path: /sdc2/rest/healthCheck
+              port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
             timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
@@ -138,9 +137,9 @@ spec:
             failureThreshold: {{ .Values.readiness.failureThreshold }}
           resources: {{ include "common.resources" . | nindent 12 }}
           startupProbe:
-            exec:
-              command:
-              - "/var/lib/jetty/ready-probe.sh"
+            httpGet:
+              path: /sdc2/rest/healthCheck
+              port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
             periodSeconds: {{ .Values.startup.periodSeconds }}
             timeoutSeconds: {{ .Values.startup.timeoutSeconds }}
@@ -160,12 +159,12 @@ spec:
                 fieldPath: status.podIP
           volumeMounts:
           - name: sdc-environments-output
-            mountPath: /var/lib/jetty/chef-solo/environments/
+            mountPath: /app/jetty/chef-solo/environments/
           - name: sdc-environments-output
-            mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.p12
+            mountPath: /app/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.p12
             subPath: org.onap.sdc.p12
           - name: sdc-environments-output
-            mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.trust.jks
+            mountPath: /app/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.trust.jks
             subPath: org.onap.sdc.trust.jks
           - name: {{ include "common.fullname" . }}-localtime
             mountPath: /etc/localtime
@@ -178,7 +177,7 @@ spec:
           lifecycle:
             postStart:
               exec:
-                command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
+                command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/app/jetty/config/catalog-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
         # side car containers
         - name: {{ include "common.name" . }}-filebeat-onap
           image: {{ include "repositoryGenerator.image.logging" . }}
index b9db3f9..aaf8fad 100644 (file)
@@ -64,7 +64,7 @@ spec:
         - name: {{ include "common.fullname" . }}-environments
           mountPath: /home/onap/chef-solo/environments/
         - name: sdc-logs
-          mountPath: /var/lib/jetty/logs
+          mountPath: /home/onap/logs
         env:
         - name: ENVNAME
           value: {{ .Values.env.name }}
index fc3b53f..3e5c58b 100644 (file)
@@ -35,8 +35,8 @@ global:
 # Application configuration defaults.
 #################################################################
 # application image
-image: onap/sdc-backend-all-plugins:1.8.5
-backendInitImage: onap/sdc-backend-init:1.8.5
+image: onap/sdc-backend-all-plugins:1.9.0
+backendInitImage: onap/sdc-backend-init:1.9.0
 
 pullPolicy: Always
 
@@ -90,7 +90,6 @@ liveness:
   failureThreshold: 3
   # necessary to disable liveness probe when setting breakpoints
   # in debugger so K8s doesn't restart unresponsive container
-  port: api
   enabled: true
 
 readiness:
@@ -111,6 +110,7 @@ service:
   type: NodePort
   name: sdc-be
   both_tls_and_plain: true
+  internalPort: 8080
   msb:
     - port: 8443
       url: "/sdc/v1"
index 3422f9d..2308f95 100644 (file)
@@ -38,8 +38,8 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/sdc-cassandra:1.8.5
-cassandraInitImage: onap/sdc-cassandra-init:1.8.5
+image: onap/sdc-cassandra:1.9.0
+cassandraInitImage: onap/sdc-cassandra-init:1.9.0
 pullPolicy: Always
 
 config:
index 0a5c0a3..407d61c 100644 (file)
@@ -148,12 +148,12 @@ spec:
             value: {{ .Values.config.javaOptions }}
           volumeMounts:
           - name: sdc-environments-output
-            mountPath: /var/lib/jetty/chef-solo/environments/
+            mountPath: /app/jetty/chef-solo/environments/
           - name: sdc-environments-output
-            mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-fe/files/default/org.onap.sdc.p12
+            mountPath: /app/jetty/chef-solo/cookbooks/sdc-catalog-fe/files/default/org.onap.sdc.p12
             subPath: org.onap.sdc.p12
           - name: sdc-environments-output
-            mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-fe/files/default/org.onap.sdc.trust.jks
+            mountPath: /app/jetty/chef-solo/cookbooks/sdc-catalog-fe/files/default/org.onap.sdc.trust.jks
             subPath: org.onap.sdc.trust.jks
           - name: {{ include "common.fullname" . }}-localtime
             mountPath: /etc/localtime
@@ -161,7 +161,7 @@ spec:
           - name: {{ include "common.fullname" . }}-logs
             mountPath: /var/log/onap
           - name: {{ include "common.fullname" . }}-configs
-            mountPath: /var/lib/jetty/config/catalog-fe/plugins-configuration.yaml
+            mountPath: /app/jetty/config/catalog-fe/plugins-configuration.yaml
             subPath: plugins-configuration.yaml
           - name: {{ include "common.fullname" . }}-logback
             mountPath: /tmp/logback.xml
@@ -169,7 +169,7 @@ spec:
           lifecycle:
             postStart:
               exec:
-                command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-fe/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
+                command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/app/jetty/config/catalog-fe/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
         # side car containers
         - name: {{ include "common.name" . }}-filebeat-onap
           image: {{ include "repositoryGenerator.image.logging" . }}
index dde22b5..82afc4d 100644 (file)
@@ -47,7 +47,7 @@ certInitializer:
 # Application configuration defaults.
 #################################################################
 # application image
-image: onap/sdc-frontend:1.8.5
+image: onap/sdc-frontend:1.9.0
 pullPolicy: Always
 
 config:
index 7251006..257f8b7 100644 (file)
@@ -122,9 +122,9 @@ spec:
           - containerPort: {{ .Values.service.internalPort2 }}
           {{ if eq .Values.liveness.enabled true }}
           livenessProbe:
-            exec:
-              command:
-              - "/var/lib/jetty/ready-probe.sh"
+            httpGet:
+              path: /onboarding-api/v1.0/healthcheck
+              port: {{ .Values.service.internalPort2 }}
             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
             periodSeconds: {{ .Values.liveness.periodSeconds }}
             timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
@@ -132,18 +132,18 @@ spec:
             failureThreshold: {{ .Values.liveness.failureThreshold }}
           {{ end }}
           readinessProbe:
-            exec:
-              command:
-              - "/var/lib/jetty/ready-probe.sh"
+            httpGet:
+              path: /onboarding-api/v1.0/healthcheck
+              port: {{ .Values.service.internalPort2 }}
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
             timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
             successThreshold: {{ .Values.readiness.successThreshold }}
             failureThreshold: {{ .Values.readiness.failureThreshold }}
           startupProbe:
-            exec:
-              command:
-              - "/var/lib/jetty/ready-probe.sh"
+            httpGet:
+              path: /onboarding-api/v1.0/healthcheck
+              port: {{ .Values.service.internalPort2 }}
             initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
             periodSeconds: {{ .Values.startup.periodSeconds }}
             timeoutSeconds: {{ .Values.startup.timeoutSeconds }}
@@ -173,12 +173,12 @@ spec:
             value: {{ .Values.cert.certDir }}
           volumeMounts:
           - name: sdc-environments-output
-            mountPath: /var/lib/jetty/chef-solo/environments/
+            mountPath: /app/jetty/chef-solo/environments/
           - name: sdc-environments-output
-            mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.p12
+            mountPath: /app/jetty/chef-solo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.p12
             subPath: org.onap.sdc.p12
           - name: sdc-environments-output
-            mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.trust.jks
+            mountPath: /app/jetty/chef-solo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.trust.jks
             subPath: org.onap.sdc.trust.jks
           - name: {{ include "common.fullname" . }}-localtime
             mountPath: /etc/localtime
@@ -193,7 +193,7 @@ spec:
           lifecycle:
             postStart:
               exec:
-                command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/onboarding-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
+                command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/app/jetty/config/onboarding-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
         # side car containers
         - name: {{ include "common.name" . }}-filebeat-onap
           image: {{ include "repositoryGenerator.image.logging" . }}
index f26a020..f09958e 100644 (file)
@@ -59,8 +59,8 @@ certInitializer:
 # Application configuration defaults.
 #################################################################
 # application image
-image: onap/sdc-onboard-backend:1.8.5
-onboardingInitImage: onap/sdc-onboard-cassandra-init:1.8.5
+image: onap/sdc-onboard-backend:1.9.0
+onboardingInitImage: onap/sdc-onboard-cassandra-init:1.9.0
 pullPolicy: Always
 
 # flag to enable debugging - application support required
@@ -141,7 +141,7 @@ persistence:
 ##Certificate storage persistence
 ##This is temporary solution for SDC-1980
 cert:
-  certDir: /var/lib/jetty/cert
+  certDir: /app/jetty/cert
   persistence:
     enabled: true
     size: 10Mi
index 2f2cb6c..1f9b2d1 100644 (file)
@@ -37,4 +37,4 @@ dependencies:
   - name: sdc-helm-validator
     version: ~8.x-0
     repository: 'file://components/sdc-helm-validator'
-    condition: sdc-helm-validator.enabled
+    condition: sdcHelmValidator.enabled
index 79428f7..d01f855 100755 (executable)
         "VnfRepo": {
             "vnfRepoPort": "{{.Values.config.environment.vnfRepoPort}}",
             "vnfRepoHost": "refrepo.{{include "common.namespace" .}}"
+        },
+        "HelmValidator": {
+            "validator_enabled": "{{.Values.sdcHelmValidator.enabled}}",
+            "helm_version": "{{.Values.sdcHelmValidator.helmVersion}}",
+            "deployable": "{{.Values.sdcHelmValidator.deployable}}",
+            "lintable": "{{.Values.sdcHelmValidator.lintable}}",
+            "strict_lintable": "{{.Values.sdcHelmValidator.strictLintable}}",
+            "validator_url": "{{.Values.sdcHelmValidator.url}}"
         }
     },
     "override_attributes": {
index b7476a5..cd3dc1e 100644 (file)
@@ -63,5 +63,10 @@ cassandra:
 # dependency / sub-chart configuration
 sdc-wfd:
   enabled: true
-sdc-helm-validator:
+sdcHelmValidator:
   enabled: true
+  helmVersion: 3.5.2
+  deployable: true
+  lintable: false
+  strictLintable: false
+  url: http://sdc-helm-validator:8080/validate
index 0971b4f..5c7a9af 100755 (executable)
@@ -136,6 +136,7 @@ org:
                             unassign: POST|270000|sdncurl10|sdnc-request-header|org:onap:sdnc:northbound:generic-resource
                         vnf-topology-operation:
                             create: POST|270000|sdncurl10|sdnc-request-header|org:onap:sdnc:northbound:generic-resource
+                            update: POST|270000|sdncurl10|sdnc-request-header|org:onap:sdnc:northbound:generic-resource
                             activate: POST|270000|sdncurl10|sdnc-request-header|org:onap:sdnc:northbound:generic-resource
                             assign: POST|270000|sdncurl10|sdnc-request-header|org:onap:sdnc:northbound:generic-resource
                             changeassign: POST|270000|sdncurl10|sdnc-request-header|org:onap:sdnc:northbound:generic-resource