v3.8.0
===================================================================== --- Changes ------------------------------ - kubectl driver updates; getting better, but still need to fix autocomplete in certain circumstances - added -y|--yes flags to scwrypts to auto-accept user-prompts (use with caution) - figured out the whole mikefarah/yq vs kislyuk/yq thing; use YQ for compatiblity --- Bug fixes ---------------------------- - helm template generation now loads values in a more appropriate order which prevents overwrite by the wrong values file
This commit is contained in:
58
plugins/kubectl/serve
Executable file
58
plugins/kubectl/serve
Executable file
@ -0,0 +1,58 @@
|
||||
#!/bin/zsh
|
||||
#####################################################################
|
||||
DEPENDENCIES+=()
|
||||
REQUIRED_ENV+=()
|
||||
|
||||
use kubectl --group kubectl
|
||||
|
||||
CHECK_ENVIRONMENT
|
||||
#####################################################################
|
||||
|
||||
MAIN() {
|
||||
local USAGE="
|
||||
usage: [service] [...options...]
|
||||
|
||||
args:
|
||||
service (optional) name of the service to forward locally
|
||||
|
||||
options:
|
||||
--context override context
|
||||
--namespace override namespace
|
||||
--subsession REDIS subsession (default 0)
|
||||
|
||||
to show a required password on screen, use both:
|
||||
--password-secret Secret resource
|
||||
--password-key key within Secret's 'data'
|
||||
|
||||
-h, --help show this dialogue and exit
|
||||
"
|
||||
local CONTEXT NAMESPACE SERVICE
|
||||
local SUBSESSION=0
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
case $1 in
|
||||
--context ) CONTEXT=$2; shift 1 ;;
|
||||
--namespace ) NAMESPACE=$2; shift 1 ;;
|
||||
--subsession ) SUBSESSION=$2; shift 1 ;;
|
||||
|
||||
--password-secret ) PASSWORD_SECRET=$2; shift 1 ;;
|
||||
--password-key ) PASSWORD_KEY=$2; shift 1 ;;
|
||||
|
||||
-h | --help ) USAGE; return 0 ;;
|
||||
|
||||
* )
|
||||
[ $SERVICE ] && ERROR "unexpected argument '$2'"
|
||||
SERVICE=$1
|
||||
;;
|
||||
esac
|
||||
shift 1
|
||||
done
|
||||
|
||||
CHECK_ERRORS
|
||||
|
||||
KUBECTL__SERVE
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
MAIN $@
|
Reference in New Issue
Block a user