Merge "[CPS] Fix statefulset upgrade"
authorLukasz Rajewski <lukasz.rajewski@orange.com>
Wed, 13 Apr 2022 07:21:37 +0000 (07:21 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 13 Apr 2022 07:21:37 +0000 (07:21 +0000)
kubernetes/dcaegen2-services/components/dcae-pm-mapper/values.yaml
kubernetes/helm/plugins/deploy/deploy.sh
kubernetes/policy/components/policy-clamp-cl-k8s-ppnt/templates/service.yaml
kubernetes/robot/values.yaml

index 6099d0c..e023d81 100644 (file)
@@ -135,10 +135,10 @@ applicationConfig:
   aaf_identity: ""
   aaf_password: ""
   pm-mapper-filter: "{ \"filters\":[] }"
-  key_store_path: ""
-  key_store_pass_path: ""
-  trust_store_path: ""
-  trust_store_pass_path: ""
+  key_store_path: /opt/app/pm-mapper/etc/cert/cert.jks
+  key_store_pass_path: /opt/app/pm-mapper/etc/cert/jks.pass
+  trust_store_path: /opt/app/pm-mapper/etc/cert/trust.jks
+  trust_store_pass_path: /opt/app/pm-mapper/etc/cert/trust.pass
   dmaap_dr_delete_endpoint: https://dmaap-dr-node:8443/delete
   streams_publishes:
     dmaap_publisher:
@@ -158,7 +158,7 @@ applicationConfig:
         username: ${DR_USERNAME}
         password: ${DR_PASSWORD}
         location: san-francisco
-        delivery_url: https://dcae-pm-mapper:8443/delivery
+        delivery_url: http://dcae-pm-mapper:8081/delivery
 
 # DataRouter Feed Configuration
 drFeedConfig:
@@ -176,7 +176,7 @@ drSubConfig:
     userpwd: ${DR_PASSWORD}
     dcaeLocationName: loc00
     privilegedSubscriber: true
-    deliveryURL: https://dcae-pm-mapper:8443/delivery
+    deliveryURL: http://dcae-pm-mapper:8081/delivery
 
 # MessageRouter Topic, Publisher Configuration
 mrTopicsConfig:
index 51438ad..36853ba 100755 (executable)
@@ -67,6 +67,8 @@ generate_overrides() {
     fi
   done
 }
+
+
 resolve_deploy_flags() {
   flags=($1)
   n=${#flags[*]}
@@ -90,11 +92,11 @@ resolve_deploy_flags() {
 
 check_for_dep() {
     try=0
-    retries=30
-    until (kubectl get deployment -n $RELEASE | grep -P "\b$1\b") &>/dev/null; do
+    retries=60
+    until (kubectl get deployment -n $HELM_NAMESPACE | grep -P "\b$1\b") &>/dev/null; do
         (( ++try > retries )) && exit 1
         echo "$1 not found. Retry $try/$retries"
-        sleep 5
+        sleep 10
     done
     echo "$1 found. Waiting for pod intialisation"
     sleep 15
@@ -125,7 +127,7 @@ deploy_subchart() {
         # Add annotation last-applied-configuration if set-last-applied flag is set
         if [ "$SET_LAST_APPLIED" = "true" ]; then
           helm get manifest "${RELEASE}-${subchart}" \
-          | kubectl apply set-last-applied --create-annotation -n onap -f - \
+          | kubectl apply set-last-applied --create-annotation -n $HELM_NAMESPACE -f - \
           > $LOG_FILE.log 2>&1
         fi
       fi
@@ -257,7 +259,7 @@ deploy() {
     # Add annotation last-applied-configuration if set-last-applied flag is set
     if [ "$SET_LAST_APPLIED" = "true" ]; then
       helm get manifest ${RELEASE} \
-      | kubectl apply set-last-applied --create-annotation -n onap -f - \
+      | kubectl apply set-last-applied --create-annotation -n $HELM_NAMESPACE -f - \
       > $LOG_FILE.log 2>&1
     fi
   fi
index be2449f..73381c9 100644 (file)
@@ -1,6 +1,6 @@
 {{/*
 #  ============LICENSE_START=======================================================
-#   Copyright (C) 2021 Nordix Foundation. All rights reserved.
+#   Copyright (C) 2021-2022 Nordix Foundation. 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.
 #  ============LICENSE_END=========================================================
 */}}
 
-{{ include "common.service" . }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: policy-clamp-cl-k8s-ppnt
+  namespace: {{ include "common.namespace" . }}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  name: {{ include "common.namespace" . }}-policy-clamp-cl-k8s-ppnt-binding
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ include "common.release" . }}
+    heritage: {{ .Release.Service }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: cluster-admin
+subjects:
+  - kind: ServiceAccount
+    name: policy-clamp-cl-k8s-ppnt
+    namespace: {{ include "common.namespace" . }}
+
index 7bba71f..d8beeed 100644 (file)
@@ -424,7 +424,7 @@ readiness:
 
 service:
   name: robot
-  type: NodePort
+  type: ClusterIP
   portName: httpd
   externalPort: 443
   internalPort: 443