Updated gs-login to support old orgs in default

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2022-01-05 06:16:01 +00:00
parent e8fd0e0be6
commit 6e2ad466d7
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

View File

@ -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