changes
This commit is contained in:
parent
c882cb2494
commit
eeebaf5c63
@ -260,3 +260,4 @@ alias edit_alias="vim $yadr_zsh/aliases.zsh $yadr_zsh/functions.zsh -p"
|
||||
alias docker_purge='docker stop $(docker ps -qa);docker rm $(docker ps -qa)'
|
||||
alias yarn_sass="SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ yarn"
|
||||
alias vim="nvim"
|
||||
alias k="kubectl"
|
||||
|
@ -298,7 +298,7 @@ function helm() {
|
||||
command helm $finalopts --kubeconfig=$HOME/.kube/${KCONTEXT}_config
|
||||
}
|
||||
function kexec {
|
||||
RAN=false
|
||||
RAN=true
|
||||
NAMESPACE=default
|
||||
finalopts=()
|
||||
while [[ $@ != "" ]] do
|
||||
@ -307,8 +307,8 @@ function kexec {
|
||||
KCONTEXT="${i#*=}"
|
||||
shift
|
||||
;;
|
||||
-r)
|
||||
RAN=true
|
||||
-R)
|
||||
RAN=false
|
||||
shift
|
||||
;;
|
||||
-p)
|
||||
@ -373,8 +373,8 @@ function kexec {
|
||||
fi
|
||||
done
|
||||
if [[ $RUNNING_POD_INDEX != -1 ]]; then
|
||||
echo "kubectl exec -it $RUNNING_PODS[$RUNNING_POD_INDEX] $finalopts"
|
||||
kubectl -n $NAMESPACE exec -it $RUNNING_PODS[$RUNNING_POD_INDEX] $finalopts
|
||||
echo "kubectl -it -n $NAMESPACE exec $RUNNING_PODS[$RUNNING_POD_INDEX] -- $finalopts"
|
||||
kubectl -it -n $NAMESPACE exec $RUNNING_PODS[$RUNNING_POD_INDEX] -- $finalopts
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -86,4 +86,3 @@ function set_k8s_context {
|
||||
export KCONTEXT=$C
|
||||
prompt_skwp_setup
|
||||
}
|
||||
prompt_skwp_setup "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user