===================================================================== --- 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
		
			
				
	
	
		
			51 lines
		
	
	
		
			989 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			989 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/zsh
 | |
| #####################################################################
 | |
| DEPENDENCIES+=()
 | |
| REQUIRED_ENV+=()
 | |
| 
 | |
| use kubectl --group kubectl
 | |
| 
 | |
| CHECK_ENVIRONMENT
 | |
| #####################################################################
 | |
| 
 | |
| MAIN() {
 | |
| 	local USAGE="
 | |
| 	usage: [context] [...options...]
 | |
| 
 | |
| 	args:
 | |
| 	  context   (optional) the full name of the kubeconfig context to set
 | |
| 
 | |
| 	options:
 | |
| 	  --subsession   REDIS subsession (default 0)
 | |
| 
 | |
| 	  -h, --help   show this dialogue and exit
 | |
| 	"
 | |
| 	local CONTEXT
 | |
| 	local SUBSESSION=0
 | |
| 
 | |
| 	while [[ $# -gt 0 ]]
 | |
| 	do
 | |
| 		case $1 in
 | |
| 			--subsession ) SUBSESSION=$2; shift 1 ;;
 | |
| 
 | |
| 			-h | --help ) USAGE; return 0 ;;
 | |
| 
 | |
| 			* )
 | |
| 				[ $CONTEXT ] && ERROR "unexpected argument '$2'"
 | |
| 				CONTEXT=$1
 | |
| 				;;
 | |
| 		esac
 | |
| 		shift 1
 | |
| 	done
 | |
| 
 | |
| 	[ $CONTEXT ] || CONTEXT=$(KUBECTL__SELECT_CONTEXT)
 | |
| 	[ $CONTEXT ] || ERROR 'must provide or select a valid kube context'
 | |
| 
 | |
| 	CHECK_ERRORS
 | |
| 
 | |
| 	KUBECTL__SET_CONTEXT $CONTEXT
 | |
| }
 | |
| 
 | |
| #####################################################################
 | |
| MAIN $@
 |