Skip to content

Commit

Permalink
Fix issue with rabbitmq operator status check
Browse files Browse the repository at this point in the history
#986 broke
kuttl tests as was checking for wrong deployment name as it's not
similar to other openstack operators.
  • Loading branch information
karelyatin committed Dec 23, 2024
1 parent 17f0544 commit cde79d2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/get-operator-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cde79d2

Please sign in to comment.