@@ -164,6 +164,9 @@ const initCmd = new Command({
164164 . option ( 'https-proxy' , {
165165 describe : 'https proxy to be used in the runner' ,
166166 } )
167+ . option ( 'no-proxy' , {
168+ describe : 'no_proxy to be used in the runner' ,
169+ } )
167170 . option ( 'verbose' , {
168171 describe : 'Print logs' ,
169172 } )
@@ -234,6 +237,7 @@ const initCmd = new Command({
234237 'env-vars' : envVars ,
235238 'http-proxy' : httpProxy ,
236239 'https-proxy' : httpsProxy ,
240+ 'no-proxy' : noProxy ,
237241 url,
238242 token,
239243 name,
@@ -298,6 +302,7 @@ const initCmd = new Command({
298302 const detectedProxyVars = detectProxy ( ) ;
299303 httpProxy = httpProxy || detectedProxyVars . httpProxy ;
300304 httpsProxy = httpsProxy || detectedProxyVars . httpsProxy ;
305+ noProxy = noProxy || detectedProxyVars . noProxy ;
301306 envVars = envVars || [ ] ;
302307 if ( ! Array . isArray ( envVars ) ) {
303308 envVars = [ envVars ] ;
@@ -352,6 +357,15 @@ const initCmd = new Command({
352357
353358 } ) ;
354359 }
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+ }
355369
356370 if ( appProxy && ! appProxyHost ) {
357371 // 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({
449463 envVars . push ( `https_proxy=${ httpsProxy } ` ) ;
450464 envVars . push ( `HTTPS_PROXY=${ httpsProxy } ` ) ;
451465 }
466+ if ( noProxy ) {
467+ envVars . push ( `no_proxy=${ noProxy } ` ) ;
468+ envVars . push ( `NO_PROXY=${ noProxy } ` ) ;
469+ }
452470
453471 // save the answers for backup
454472 _argv [ 'kube-context-name' ] = kubeContextName ;
0 commit comments