run commands k and g against different clusters
This commit is contained in:
parent
1ebe560afb
commit
290a2f1208
@ -227,10 +227,38 @@ function gitcopy() {
|
|||||||
ruby ~/Projects/paiyou-hub/bin/trello_action.rb -n $trelloCardName -d "$commits" -l `git config user.name`
|
ruby ~/Projects/paiyou-hub/bin/trello_action.rb -n $trelloCardName -d "$commits" -l `git config user.name`
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
alias k="kubectl"
|
function k() {
|
||||||
|
CONTEXT=gcloud
|
||||||
|
while getopts ":c:" opt; do
|
||||||
|
case ${opt} in
|
||||||
|
c)
|
||||||
|
CONTEXT=$OPTARG
|
||||||
|
shift; shift
|
||||||
|
;;
|
||||||
|
\?) echo "Usage: h [-c CONTEXT]"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
kubectl $* --kubeconfig=$HOME/.kube/${CONTEXT}_config
|
||||||
|
}
|
||||||
function h() {
|
function h() {
|
||||||
helm $*
|
CONTEXT=gcloud
|
||||||
#helm $* --tls
|
while getopts ":c:" opt; do
|
||||||
|
case ${opt} in
|
||||||
|
c)
|
||||||
|
CONTEXT=$OPTARG
|
||||||
|
shift; shift
|
||||||
|
;;
|
||||||
|
\?) echo "Usage: h [-c CONTEXT]"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
TLS=""
|
||||||
|
case $CONTEXT in
|
||||||
|
gcloud)
|
||||||
|
TLS="--tls"
|
||||||
|
esac
|
||||||
|
helm $* $TLS --kubeconfig $HOME/.kube/${CONTEXT}_config
|
||||||
}
|
}
|
||||||
function kexec {
|
function kexec {
|
||||||
RAN=false
|
RAN=false
|
||||||
|
Loading…
Reference in New Issue
Block a user