@@ -164,6 +164,9 @@ const initCmd = new Command({
164
164
. option ( 'https-proxy' , {
165
165
describe : 'https proxy to be used in the runner' ,
166
166
} )
167
+ . option ( 'no-proxy' , {
168
+ describe : 'no_proxy to be used in the runner' ,
169
+ } )
167
170
. option ( 'verbose' , {
168
171
describe : 'Print logs' ,
169
172
} )
@@ -234,6 +237,7 @@ const initCmd = new Command({
234
237
'env-vars' : envVars ,
235
238
'http-proxy' : httpProxy ,
236
239
'https-proxy' : httpsProxy ,
240
+ 'no-proxy' : noProxy ,
237
241
url,
238
242
token,
239
243
name,
@@ -298,6 +302,7 @@ const initCmd = new Command({
298
302
const detectedProxyVars = detectProxy ( ) ;
299
303
httpProxy = httpProxy || detectedProxyVars . httpProxy ;
300
304
httpsProxy = httpsProxy || detectedProxyVars . httpsProxy ;
305
+ noProxy = noProxy || detectedProxyVars . noProxy ;
301
306
envVars = envVars || [ ] ;
302
307
if ( ! Array . isArray ( envVars ) ) {
303
308
envVars = [ envVars ] ;
@@ -352,6 +357,15 @@ const initCmd = new Command({
352
357
353
358
} ) ;
354
359
}
360
+ if ( noProxy ) {
361
+ questions . push ( {
362
+ type : 'input' ,
363
+ name : 'noProxy' ,
364
+ default : noProxy ,
365
+ message : 'NO_PROXY to be used by runner inside Kubernetes?' ,
366
+
367
+ } ) ;
368
+ }
355
369
356
370
if ( appProxy && ! appProxyHost ) {
357
371
// will only be asked if you want to install app-proxy but you give no host in the options
@@ -449,6 +463,10 @@ const initCmd = new Command({
449
463
envVars . push ( `https_proxy=${ httpsProxy } ` ) ;
450
464
envVars . push ( `HTTPS_PROXY=${ httpsProxy } ` ) ;
451
465
}
466
+ if ( noProxy ) {
467
+ envVars . push ( `no_proxy=${ noProxy } ` ) ;
468
+ envVars . push ( `NO_PROXY=${ noProxy } ` ) ;
469
+ }
452
470
453
471
// save the answers for backup
454
472
_argv [ 'kube-context-name' ] = kubeContextName ;
0 commit comments