Skip to content

Commit d227645

Browse files
committed
rgw-broker: add update-broker-addr.sh
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
1 parent adb6af5 commit d227645

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

scripts/update-broker-addr.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
SCRIPTS_ROOT=`dirname $0`
4+
YAML=${SCRIPTS_ROOT}/yaml
5+
6+
ip=`kubectl config view --minify=true -ojsonpath='{.clusters[0].cluster.server}' | sed 's/.*\///g' | sed 's/:.*//g'`
7+
port=`kubectl get svc -n broker broker-rgw-object-broker-node-port -o jsonpath={.'spec'.'ports'[0].'nodePort'}`
8+
broker_addr="$ip:$port"
9+
10+
cat $YAML/broker.yaml.template | sed s/{addr}/$broker_addr/g > $YAML/broker.yaml
11+
12+
echo Updated broker address to $broker_addr

0 commit comments

Comments
 (0)