From 18bd3c0985815d32745b6f901d3e03a0c60fd016 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Mon, 21 Feb 2022 14:17:10 +0000 Subject: [PATCH] Updated gs-login to support new opsctl login Signed-off-by: Marcus Noble --- home/.bin/gs-login | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/home/.bin/gs-login b/home/.bin/gs-login index 5ea738f..b2e5a6c 100755 --- a/home/.bin/gs-login +++ b/home/.bin/gs-login @@ -60,12 +60,10 @@ MC_EXIST=$(kubectl config get-contexts --no-headers -o name gs-${POS_ARGS[0]} 2> case ${#POS_ARGS[@]} in 1) - kubectl config delete-context gs-${POS_ARGS[0]} &>/dev/null - kubectl gs login ${POS_ARGS[0]} ${DEBUG} 2>/dev/null || opsctl kgs login -i ${POS_ARGS[0]} || opsctl create kubeconfig -i ${POS_ARGS[0]} + opsctl login ${DEBUG} ${POS_ARGS[0]} ;; 2) - 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} ${DEBUG} + opsctl login ${DEBUG} ${POS_ARGS[0]} ${POS_ARGS[1]} ;; 3) if [ ${MC_EXIST} -eq 0 ]; then gs-login ${POS_ARGS[0]}; fi