Added lookup for MC if no args given to gs-login
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
parent
586538f14f
commit
3024bbd0cc
@ -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]}
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user