make klogs a workable command which logs amonst k8s applicaiton
This commit is contained in:
parent
051ab834ef
commit
e2baa7ef69
@ -388,19 +388,26 @@ function kexec {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function k_logs {
|
function klogs {
|
||||||
CONTEXT=gcloud
|
KCONTEXT=${KCONTEXT:-gcloud}
|
||||||
while getopts ":c:p:" opt; do
|
finalopts=()
|
||||||
case "${opt}" in
|
while [[ $@ != "" ]] do
|
||||||
c)
|
case $1 in
|
||||||
CONTEXT=$OPTARG
|
-c)
|
||||||
|
KCONTEXT="$2"
|
||||||
|
shift; shift
|
||||||
;;
|
;;
|
||||||
p)
|
--context=*)
|
||||||
PROJECT=$OPTARG
|
KCONTEXT="${i#*=}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-p)
|
||||||
|
PROJECT="$2"
|
||||||
|
shift; shift
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: cmd [-h]"
|
finalopts+=($1)
|
||||||
return
|
shift
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user