From 3024bbd0ccce8c962d36a0d3363357409dd5b60c Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Tue, 14 Dec 2021 07:49:42 +0000 Subject: [PATCH] Added lookup for MC if no args given to gs-login Signed-off-by: Marcus Noble --- home/.bin/gs-login | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/home/.bin/gs-login b/home/.bin/gs-login index 8ee8447..d2f654b 100755 --- a/home/.bin/gs-login +++ b/home/.bin/gs-login @@ -55,6 +55,10 @@ while test $# -gt 0; do done case ${#POS_ARGS[@]} in + 0) + INST=$(opsctl list installations --short | tr ' ' '\n' | fzf) + kubectl gs login --kubeconfig=${KUBECONFIG} ${INST} ${DEBUG} 2>/dev/null || opsctl kgs login -i ${INST} || opsctl create kubeconfig ${INST} + ;; 1) kubectl gs login --kubeconfig=${KUBECONFIG} ${POS_ARGS[0]} ${DEBUG} 2>/dev/null || opsctl kgs login -i ${POS_ARGS[0]} || opsctl create kubeconfig ${POS_ARGS[0]} ;;