File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 2
2
set -e
3
3
4
4
kubectl=kubectl
5
- version=1.8.0
5
+ version=1.8.1
6
6
generator=" "
7
7
node=" "
8
8
nodefaultctx=0
@@ -85,9 +85,11 @@ if [ -z "$node" ]; then
85
85
exit 1
86
86
fi
87
87
88
- # Set the default context and namespace to avoid situations where the user switch them during the build process
89
- [ " $nodefaultctx " = 1 ] || kubectl=" $kubectl --context=$( ${kubectl} config current-context) "
90
- [ " $nodefaultns " = 1 ] || kubectl=" $kubectl --namespace=$( ${kubectl} config view --minify --output ' jsonpath={.contexts..namespace}' ) "
88
+ if [ -z " $KUBERNETES_PORT " ]; then
89
+ # Set the default context and namespace to avoid situations where the user switch them during the build process
90
+ [ " $nodefaultctx " = 1 ] || kubectl=" $kubectl --context=$( ${kubectl} config current-context) "
91
+ [ " $nodefaultns " = 1 ] || kubectl=" $kubectl --namespace=$( ${kubectl} config view --minify --output ' jsonpath={.contexts..namespace}' ) "
92
+ fi
91
93
92
94
# Check the node and retrieve the node OS label
93
95
os=" $( $kubectl get node $node -o jsonpath=" {.metadata.labels.kubernetes\.io/os}" || exit 1) "
You can’t perform that action at this time.
0 commit comments