=====================================================================

--- 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:
2022-08-02 19:08:33 -06:00
parent 89e899d49d
commit e8bb889789
7 changed files with 65 additions and 35 deletions

6
zsh/aws/eks/common.zsh Normal file
View File

@ -0,0 +1,6 @@
_DEPENDENCIES+=(
kubectl
)
_REQUIRED_ENV+=()
source ${0:a:h}/../common.zsh
#####################################################################

19
zsh/aws/eks/login Executable file
View 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'?"