Fix checking the existence of the cld
Related-PROD: K0RQA-15
Change-Id: I590822526fa0115b3c833d584bd5f2e795619231
diff --git a/k8s/workspace/run-networks-child.sh b/k8s/workspace/run-networks-child.sh
index 973cdcd..7b0d819 100644
--- a/k8s/workspace/run-networks-child.sh
+++ b/k8s/workspace/run-networks-child.sh
@@ -16,17 +16,10 @@
fi
CLUSTER_NAME="$1"
-
-echo ""
-echo "Checking if ClusterDeployment '$CLUSTER_NAME' exists..."
-
-if ! kubectl get cld -A -o name | grep -q "/$CLUSTER_NAME$"; then
- echo -e "Error: ClusterDeployment '$CLUSTER_NAME' not found in any namespace"
- exit 1
+if ! check_cluster_deployment_exists "$CLUSTER_NAME"; then
+ exit 1
fi
-echo -e "ClusterDeployment '$CLUSTER_NAME' found"
-
KUBECONFIG_PATH="$MY_PROJFOLDER/envs/kubeconfigs/${CLUSTER_NAME}-kubeconfig.yaml"
CHECKER_ENV_PATH="$MY_PROJFOLDER/envs/checkers/${CLUSTER_NAME}-checker.env"