[zsh] Fix kp launcher making the KUBECONFIG not overrideable

This commit is contained in:
Sebastian Schulze 2022-02-04 21:00:44 +01:00
parent 1765056eb7
commit c80a1b91d7
Signed by: bascht
GPG Key ID: 5BCB1D3B4D38A35A
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ alias -g baml="|bat -l yaml"
alias -g obaml="-o yaml|bat -l yaml"
# Switch between multiple kubeconfigs, stored in gopass
kp() { export KUBECONFIG=/dev/shm/kubeconfig-${1} && touch $KUBECONFIG && chmod 0500 $KUBECONFIG && gopass $(gopass ls -f | fzf --query "'${1} kubeconfig" --select-1) > $KUBECONFIG && source <(kubectl completion zsh) }
kp() { export KUBECONFIG=/dev/shm/kubeconfig-${1} && touch $KUBECONFIG && chmod 0600 $KUBECONFIG && gopass $(gopass ls -f | fzf --query "'${1} kubeconfig" --select-1) > $KUBECONFIG && source <(kubectl completion zsh) }
# Give my <tab> key some rest
kfp() { kubectl get pod -l app="${1:-$(basename $PWD)}" -o jsonpath="{.items[0].metadata.name}" }
kpe() { kubectl exec -ti $(kfp ${1:-$(basename $PWD)}) $2 }