File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 77import json
88import threading
99from urllib .parse import urlparse
10+ import os
1011
1112from kubernetes import client , watch
1213from tornado .ioloop import IOLoop
@@ -235,6 +236,24 @@ def submit(self):
235236 if self .git_credentials :
236237 env .append (client .V1EnvVar (name = 'GIT_CREDENTIAL_ENV' , value = self .git_credentials ))
237238
239+ # copy additional variables from current environment to new pod environment
240+ proxy_environment_variables = [
241+ 'http_proxy' ,
242+ 'https_proxy' ,
243+ 'HTTP_PROXY' ,
244+ 'HTTPS_PROXY' ,
245+ 'no_proxy' ,
246+ 'NO_PROXY' ,
247+ ]
248+
249+ for env_var in proxy_environment_variables :
250+ try :
251+ env .append (client .V1EnvVar (name = env_var , value = os .environ [env_var ]))
252+ except KeyError :
253+ # skip the environment variable if it isn't present
254+ pass
255+
256+ component_label = "binderhub-build"
238257 self .pod = client .V1Pod (
239258 metadata = client .V1ObjectMeta (
240259 name = self .name ,
You can’t perform that action at this time.
0 commit comments