From cde79d226e27a39199186ab86bff9b58138760a5 Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Mon, 23 Dec 2024 13:59:46 +0530 Subject: [PATCH] Fix issue with rabbitmq operator status check https://github.com/openstack-k8s-operators/install_yamls/pull/986 broke kuttl tests as was checking for wrong deployment name as it's not similar to other openstack operators. --- scripts/get-operator-status.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/get-operator-status.sh b/scripts/get-operator-status.sh index 3d641e5..475a548 100644 --- a/scripts/get-operator-status.sh +++ b/scripts/get-operator-status.sh @@ -9,7 +9,13 @@ if [ -z "$OPERATOR_NAME" ]; then echo "Please set OPERATOR_NAME"; exit 1 fi -REPLICAS=$(oc get -n "${OPERATOR_NAMESPACE}" deployment ${OPERATOR_NAME}-operator-controller-manager -o json | jq -e '.status.availableReplicas') +if [ "$OPERATOR_NAME" = "rabbitmq-cluster" ]; then + DEPL_NAME="rabbitmq-cluster-operator" +else + DEPL_NAME=${OPERATOR_NAME}-operator-controller-manager +fi + +REPLICAS=$(oc get -n "${OPERATOR_NAMESPACE}" deployment ${DEPL_NAME} -o json | jq -e '.status.availableReplicas') if [ "$REPLICAS" != "1" ]; then exit 1 fi