Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions bin/kubectl-rabbitmq
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,20 @@ perf_test() {
manage() {
get_instance_details "$@"

TLS="$(kubectl $NAMESPACE get service ${service} -o jsonpath='{.spec.ports[?(@.name=="management-tls")]}')"
if [[ -n "$TLS" ]]; then
MGMT_PORT=15671
MGMT_URL="https://localhost:$MGMT_PORT/"

else
MGMT_PORT=15672
MGMT_URL="http://localhost:$MGMT_PORT/"
fi
(
sleep 2
open "http://localhost:15672/"
open "$MGMT_URL"
) &
kubectl ${NAMESPACE} port-forward "service/${service}" 15672
kubectl ${NAMESPACE} port-forward "service/${service}" $MGMT_PORT
}

list_rabbitmq_clusters() {
Expand Down