v2.2.0
===================================================================== --- New Scripts -------------------------- zsh ) amazon EKS - aws/eks/login --- Changes ------------------------------ - moved global .config to global/config.zsh - moved various global configurations to global/ --- Bug Fixes ---------------------------- - REDIS_AUTH no longer required to attempt connection - global configurations now propagate to non-zsh scripts
This commit is contained in:
6
zsh/aws/eks/common.zsh
Normal file
6
zsh/aws/eks/common.zsh
Normal file
@ -0,0 +1,6 @@
|
||||
_DEPENDENCIES+=(
|
||||
kubectl
|
||||
)
|
||||
_REQUIRED_ENV+=()
|
||||
source ${0:a:h}/../common.zsh
|
||||
#####################################################################
|
19
zsh/aws/eks/login
Executable file
19
zsh/aws/eks/login
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/zsh
|
||||
_DEPENDENCIES+=()
|
||||
_REQUIRED_ENV+=()
|
||||
source ${0:a:h}/common.zsh
|
||||
#####################################################################
|
||||
|
||||
__STATUS "performing AWS ECR docker login"
|
||||
|
||||
CLUSTER_NAME=$(\
|
||||
_AWS eks list-clusters \
|
||||
| jq -r '.[] | .[]' \
|
||||
| __FZF 'select a cluster'
|
||||
)
|
||||
[ ! $CLUSTER_NAME ] && __ABORT
|
||||
|
||||
__STATUS "updating kubeconfig for '$CLUSTER_NAME'"
|
||||
_AWS eks update-kubeconfig --name $CLUSTER_NAME \
|
||||
&& __SUCCESS "kubeconfig updated with '$CLUSTER_NAME'" \
|
||||
|| __ERROR "failed to update kubeconfig; do you have permissions to access '$CLUSTER_NAME'?"
|
Reference in New Issue
Block a user