From 6e2ad466d72eac29294e7f83ec75209df26571d9 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Wed, 5 Jan 2022 06:16:01 +0000 Subject: [PATCH] Updated gs-login to support old orgs in default Signed-off-by: Marcus Noble --- home/.bin/gs-login | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/home/.bin/gs-login b/home/.bin/gs-login index ea25779..5ea738f 100755 --- a/home/.bin/gs-login +++ b/home/.bin/gs-login @@ -69,7 +69,11 @@ case ${#POS_ARGS[@]} in ;; 3) if [ ${MC_EXIST} -eq 0 ]; then gs-login ${POS_ARGS[0]}; fi - kubectl gs login ${POS_ARGS[0]} --workload-cluster ${POS_ARGS[1]} --certificate-group ${CERTIFICATE_GROUP} --certificate-ttl ${TTL} --organization ${POS_ARGS[2]} ${DEBUG} + ORG_FLAG="--organization ${POS_ARGS[2]}" + if [[ "${POS_ARGS[2]}" == "default" ]]; then + ORG_FLAG="--insecure-namespace" + fi + kubectl gs login ${POS_ARGS[0]} --workload-cluster ${POS_ARGS[1]} --certificate-group ${CERTIFICATE_GROUP} --certificate-ttl ${TTL} ${ORG_FLAG} ${DEBUG} ;; *) print_usage