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="[]"
14
14
x_mode=0
15
15
labels=" ${KUBECTL_NODE_SHELL_LABELS} "
16
16
pod_running_timeout=" ${KUBECTL_NODE_SHELL_POD_RUNNING_TIMEOUT:- 1m} "
17
+ image_pull_secret_name=" ${KUBECTL_NODE_SHELL_IMAGE_PULL_SECRET_NAME} "
17
18
custom_image=" "
18
19
use_ipc=true
19
20
use_mount=true
@@ -195,13 +196,20 @@ resources_json='"resources": {
195
196
}'
196
197
$kubectl run --image " $image " " $pod " --dry-run=server 2>&1 | grep -q ' failed quota' || resources_json=' "resources": {}'
197
198
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
+
198
205
overrides=" $(
199
206
cat << EOT
200
207
{
201
208
"spec": {
202
209
"nodeName": "$node ",
203
210
"hostPID": true,
204
211
"hostNetwork": true,
212
+ "imagePullSecrets": $image_pull_secrets ,
205
213
"containers": [
206
214
{
207
215
"securityContext": $security_context ,
You can’t perform that action at this time.
0 commit comments