File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ container_cpu="${KUBECTL_NODE_SHELL_POD_CPU:-100m}"
11
11
container_memory=" ${KUBECTL_NODE_SHELL_POD_MEMORY:- 256Mi} "
12
12
volumes=" []"
13
13
volume_mounts=" []"
14
- x_mode=0
14
+ x_mode=false
15
15
labels=" ${KUBECTL_NODE_SHELL_LABELS} "
16
16
pod_running_timeout=" ${KUBECTL_NODE_SHELL_POD_RUNNING_TIMEOUT:- 1m} "
17
17
image_pull_secret_name=" ${KUBECTL_NODE_SHELL_IMAGE_PULL_SECRET_NAME} "
@@ -73,7 +73,7 @@ while [ $# -gt 0 ]; do
73
73
shift
74
74
;;
75
75
-x)
76
- x_mode=1
76
+ x_mode=true
77
77
volumes=$( echo " $volumes " | jq ' . += [{"hostPath": {"path": "/", "type": ""}, "name": "host-root"}]' )
78
78
volume_mounts=$( echo " $volume_mounts " | jq ' . += [{"mountPath":"/host","name":"host-root"}]' )
79
79
shift
173
173
174
174
# Build the container command
175
175
if [ $# -gt 0 ]; then
176
- if [ " $x_mode " -eq 1 ]; then
176
+ if [ " $x_mode " = true ]; then
177
177
cmd=' ['
178
178
else
179
179
cmd=" [ $cmd_start $cmd_arg_prefix ,"
@@ -188,7 +188,7 @@ if [ $# -gt 0 ]; then
188
188
done
189
189
cmd=" $cmd ]"
190
190
else
191
- if [ " $x_mode " = 1 ]; then
191
+ if [ " $x_mode " = true ]; then
192
192
cmd=' null'
193
193
else
194
194
cmd=" [ $cmd_start $cmd_default ]"
@@ -213,8 +213,9 @@ cat <<EOT
213
213
{
214
214
"spec": {
215
215
"nodeName": "$node ",
216
- "hostPID": true,
217
- "hostNetwork": true,
216
+ "hostPID": $use_pid ,
217
+ "hostIPC": $use_ipc ,
218
+ "hostNetwork": $use_net ,
218
219
"imagePullSecrets": $image_pull_secrets ,
219
220
"containers": [
220
221
{
You can’t perform that action at this time.
0 commit comments