Skip to content

Commit 83f90a7

Browse files
committed
Fix colors and args
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
1 parent 9fd4632 commit 83f90a7

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -euo pipefail
44

5-
NATS_K8S_VERSION=${DEFAULT_NATS_K8S_VERSION:=https://github.com/nats-io/k8s/blob/47b50c48403ceb3b13a0f4beed55c4467d25e2b3}
5+
NATS_K8S_VERSION=${DEFAULT_NATS_K8S_VERSION:=https://github.com/nats-io/k8s/blob/9fd463279f8ccafaa50d12977bad583520551852}
66
NATS_BOOTSTRAP_YML=${DEFAULT_NATS_BOOTSTRAP_YML:=$NATS_K8S_RELEASE/setup/bootstrap-policy.yml}
77
NATS_SETUP_IMAGE=${DEFAULT_NATS_SETUP_IMAGE:=synadia/nats-setup:latest}
88

@@ -16,7 +16,7 @@ kubectl run nats-setup --generator=run-pod/v1 --image-pull-policy=Always --servi
1616
kubectl wait --for=condition=Ready pod/nats-setup --timeout=30s
1717

1818
# Pass the custom parameters to the nats-setup container image.
19-
kubectl exec nats-setup -- nats-setup.sh $@
19+
kubectl exec nats-setup -- nats-setup.sh "$@"
2020

2121
# Get a local copy of the nsc directory with the accounts.
2222
kubectl cp nats-setup:/nsc nsc

setup/nats-setup.sh

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
set -eu
33

4-
NATS_K8S_VERSION=https://raw.githubusercontent.com/nats-io/nats.k8s/afe90c5392dfd8e24d970587c217f90a917bf567
4+
NATS_K8S_VERSION=https://raw.githubusercontent.com/nats-io/nats.k8s/9fd463279f8ccafaa50d12977bad583520551852
55

66
NATS_SERVER_YML=${DEFAULT_NATS_SERVER_YML:=$NATS_K8S_VERSION/nats-server/nats-server-with-auth.yml}
77

@@ -198,7 +198,7 @@ main() {
198198

199199
CYAN='\033[0;36m'
200200
NC='\033[0m'
201-
echo "${CYAN}"
201+
echo -e "${CYAN}"
202202
echo "##############################################"
203203
echo "# #"
204204
echo "# _ _ _ _____ ____ _ _____ ____ #"
@@ -224,7 +224,7 @@ main() {
224224
echo " | |"
225225
echo " +-------------------------------------------+"
226226
echo
227-
echo "${NC}"
227+
echo -e "${NC}"
228228

229229
if [ $with_auth = true ]; then
230230
# Skip if directory already exists
@@ -266,61 +266,61 @@ main() {
266266
kubectl wait --for=condition=Ready pod/nats-0 --timeout=60s
267267
kubectl wait --for=condition=Ready pod/nats-box --timeout=60s
268268

269-
echo "${CYAN}"
269+
echo -e "${CYAN}"
270270
echo " +------------------------------------------+"
271271
echo " | |"
272272
echo " | Done. Enjoy your new NATS cluster! |"
273273
echo " | |"
274274
echo " +------------------------------------------+"
275-
echo "${NC}"
275+
echo -e "${NC}"
276276
echo "=== Getting started"
277277
echo
278278
echo "You can now start receiving and sending messages using "
279279
echo "the nats-box instance deployed into your namespace:"
280280
echo
281-
echo " ${CYAN}kubectl exec -it pod/nats-box -- /bin/sh -l ${NC}"
281+
echo -e " ${CYAN}kubectl exec -it pod/nats-box -- /bin/sh -l ${NC}"
282282
echo
283283
if [ $with_auth = true ]; then
284284
echo "Using the test account user:"
285-
echo " ${CYAN}"
285+
echo -e " ${CYAN}"
286286
echo " nats-sub test &"
287287
echo " nats-pub test 'Hello World'"
288-
echo " ${NC}"
288+
echo -e " ${NC}"
289289
echo "Or try using the system account user to inspect all events in the cluster:"
290-
echo " ${CYAN}"
290+
echo -e " ${CYAN}"
291291
echo " nats-sub -creds /var/run/nats/creds/sys/sys.creds '>'"
292-
echo " ${NC}"
292+
echo -e " ${NC}"
293293
else
294-
echo " ${CYAN}"
294+
echo -e " ${CYAN}"
295295
echo " nats-sub test &"
296296
echo " nats-pub test 'Hello World'"
297-
echo " ${NC}"
297+
echo -e " ${NC}"
298298
fi
299299
echo "The nats-box also includes nats-top which you can use to"
300300
echo "inspect the flow of messages from one of the members"
301301
echo "of the cluster (press 'q' to exit)."
302302
echo
303-
echo " ${CYAN}nats-top${NC}"
303+
echo -e " ${CYAN}nats-top${NC}"
304304
echo
305305

306306
if [ $with_stan = true ]; then
307307
echo "NATS Streaming with persistence is also available as part of your cluster."
308308
echo "It is installed under the STAN account so you can use the following credentials:"
309-
echo " ${CYAN}"
309+
echo -e " ${CYAN}"
310310
echo " stan-pub test 'Hello World'"
311311
echo " stan-sub test -all"
312-
echo " ${NC}"
312+
echo -e " ${NC}"
313313
fi
314314

315315
if [ $with_surveyor = true ]; then
316316
echo "You can also connect to your monitoring dashboard:"
317-
echo " ${CYAN}"
317+
echo -e " ${CYAN}"
318318
echo " kubectl port-forward deployments/nats-surveyor-grafana 3000:3000"
319-
echo " ${NC}"
319+
echo -e " ${NC}"
320320
echo "Then open the following in your browser:"
321-
echo " ${CYAN}"
321+
echo -e " ${CYAN}"
322322
echo " http://127.0.0.1:3000/d/nats/nats-surveyor?refresh=5s&orgId=1"
323-
echo " ${NC}"
323+
echo -e " ${NC}"
324324
fi
325325
}
326326

0 commit comments

Comments
 (0)