File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ volume_mounts="[]"
1414x_mode=0
1515labels=" ${KUBECTL_NODE_SHELL_LABELS} "
1616pod_running_timeout=" ${KUBECTL_NODE_SHELL_POD_RUNNING_TIMEOUT:- 1m} "
17+ image_pull_secret_name=" ${KUBECTL_NODE_SHELL_IMAGE_PULL_SECRET_NAME} "
1718custom_image=" "
1819use_ipc=true
1920use_mount=true
@@ -195,13 +196,20 @@ resources_json='"resources": {
195196 }'
196197$kubectl run --image " $image " " $pod " --dry-run=server 2>&1 | grep -q ' failed quota' || resources_json=' "resources": {}'
197198
199+ if [ -n " ${image_pull_secret_name} " ]; then
200+ image_pull_secrets=' [ { "name": "' ${image_pull_secret_name} ' " } ]'
201+ else
202+ image_pull_secrets=' null'
203+ fi
204+
198205overrides=" $(
199206cat << EOT
200207{
201208 "spec": {
202209 "nodeName": "$node ",
203210 "hostPID": true,
204211 "hostNetwork": true,
212+ "imagePullSecrets": $image_pull_secrets ,
205213 "containers": [
206214 {
207215 "securityContext": $security_context ,
You can’t perform that action at this time.
0 commit comments