From 56e07cfd240077836210046c098f810345d2a47d Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Mon, 13 Dec 2021 15:11:17 +0000 Subject: [PATCH] Set kubeconfig file on login Signed-off-by: Marcus Noble --- home/.bin/gs-login | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home/.bin/gs-login b/home/.bin/gs-login index 3648b59..8ee8447 100755 --- a/home/.bin/gs-login +++ b/home/.bin/gs-login @@ -56,13 +56,13 @@ done case ${#POS_ARGS[@]} in 1) - kubectl gs login ${POS_ARGS[0]} ${DEBUG} 2>/dev/null || opsctl kgs login -i ${POS_ARGS[0]} || opsctl create kubeconfig ${POS_ARGS[0]} + 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]} ;; 2) - kubectl gs login ${POS_ARGS[0]} --workload-cluster ${POS_ARGS[1]} --certificate-group ${CERTIFICATE_GROUP} --certificate-ttl ${TTL} ${DEBUG} + kubectl gs login --kubeconfig=${KUBECONFIG} ${POS_ARGS[0]} --workload-cluster ${POS_ARGS[1]} --certificate-group ${CERTIFICATE_GROUP} --certificate-ttl ${TTL} ${DEBUG} ;; 3) - kubectl gs login ${POS_ARGS[0]} --workload-cluster ${POS_ARGS[1]} --certificate-group ${CERTIFICATE_GROUP} --certificate-ttl ${TTL} --organization ${POS_ARGS[2]} ${DEBUG} + kubectl gs login --kubeconfig=${KUBECONFIG} ${POS_ARGS[0]} --workload-cluster ${POS_ARGS[1]} --certificate-group ${CERTIFICATE_GROUP} --certificate-ttl ${TTL} --organization ${POS_ARGS[2]} ${DEBUG} ;; *) print_usage