Fix Strimzi secret copy to nonrtric namespace 43/14343/1
authoraravind.est <aravindhan.a@est.tech>
Fri, 25 Apr 2025 08:36:01 +0000 (09:36 +0100)
committeraravind.est <aravindhan.a@est.tech>
Fri, 25 Apr 2025 08:36:01 +0000 (09:36 +0100)
Strimzi dmeparticipant secret gets copied from onap namespace.
install-nonrtric script misses the required shell function. this fixes that issue

Issue-ID: NONRTRIC-1020
Change-Id: Iceb85e1e72a969a1660a0112e27f0d1152dca9bc
Signed-off-by: aravind.est <aravindhan.a@est.tech>
smo-install/scripts/sub-scripts/install-nonrtric.sh

index d734250..0c15a52 100755 (executable)
@@ -77,6 +77,20 @@ else
     helm install --debug oran-nonrtric local/nonrtric --namespace nonrtric -f $OVERRIDEYAML --set nonrtric.persistence.mountPath="/dockerdata-nfs/deployment-$3"
 fi
 
+
+check_for_secrets() {
+    try=0
+    retries=60
+    until (kubectl get secret -n onap | grep -P "\b$1\b") >/dev/null 2>&1; do
+        try=$(($try + 1))
+        [ $try -gt $retries ] && exit 1
+        echo "$1 not found. Retry $try/$retries"
+        sleep 10
+    done
+    echo "$1 found"
+}
+
+
 # Copying kafka secrets from onap namespace
 # SMO installation uses ONAP strimzi kafka
 # All KafkaUser and KafkaTopic resources should be created as part of ONAP namespace