Skip to content

Commit

Permalink
fix(script): added region parameter to update-kubeconfig cli (Young-o…
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-ook authored May 17, 2021
1 parent 2bae7f3 commit 9ff197e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions script/update-kubeconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CURDIR=`dirname $0`
EKS_NAME=eks
SPINNAKER_MANAGED=false

export AWS_DEFAULT_REGION=us-east-1
export AWS_REGION=us-east-1
export KUBECONFIG=$CURDIR/kubeconfig

function print_usage() {
Expand All @@ -23,7 +23,7 @@ function process_args() {
case $opt in
n) EKS_NAME="$OPTARG"
;;
r) AWS_DEFAULT_REGION="$OPTARG"
r) AWS_REGION="$OPTARG"
;;
k) KUBECONFIG="$OPTARG"
;;
Expand All @@ -42,7 +42,7 @@ function init() {
fi

# update kubeconfig
aws eks update-kubeconfig --name $EKS_NAME
aws eks update-kubeconfig --name $EKS_NAME --region $AWS_REGION

if [ $SPINNAKER_MANAGED = "true" ]; then
local namespace=$EKS_NAME
Expand Down Expand Up @@ -114,5 +114,5 @@ function minify () {
process_args "$@"
init

unset AWS_DEFAULT_REGION
unset AWS_REGION
unset KUBECONFIG

0 comments on commit 9ff197e

Please sign in to comment.