File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change 22
33NEW_ARGS=" "
44COMMAND=" "
5- CURRENT_CONTEXT=$( kubectl config current-context)
6- CURRENT_NAMESPACE=$( kubectl config view --minify | grep namespace | cut -d ' :' -f 2 | sed ' s/^[ \t]*//;s/[ \t]*$//' )
7-
85HELM_SUDO_PROMPT=${HELM_SUDO_PROMPT:- false}
6+
97if [ " $HELM_SUDO_PROMPT " = true ]; then
8+ CURRENT_CONTEXT=$( kubectl config current-context)
9+ CURRENT_NAMESPACE=$( kubectl config view --minify | grep namespace | cut -d ' :' -f 2 | sed ' s/^[ \t]*//;s/[ \t]*$//' )
1010 read -p " WARNING: Currently in context '${CURRENT_CONTEXT} ' using namespace '${CURRENT_NAMESPACE:- " default" } '. Continue? (y/N) " -r -n 1 yn
1111 case $yn in
1212 [Yy]* ) ;;
1313 * ) exit 0;;
1414 esac
15- echo
15+ echo
1616fi
1717
18- for arg in " $@ "
19- do
20- if [ ${arg} != " --" * ] && [ -z " ${COMMAND} " ]; then
21- COMMAND=${arg}
22- fi
23- NEW_ARGS=" ${NEW_ARGS} ${arg} "
24- done
25-
26- helm --kube-as-user ${USER} --kube-as-group system:masters ${NEW_ARGS}
18+ helm --kube-as-user ${USER} --kube-as-group system:masters " $@ "
You can’t perform that action at this time.
0 commit comments