1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 19:20:19 +01:00

add support for running kubernetes orchestrator from behind proxy

This commit is contained in:
Zach Dwiel
2018-09-20 11:25:45 -04:00
committed by zach dwiel
parent ad4d2c3053
commit cd733b2404

View File

@@ -1,4 +1,4 @@
import os
import uuid import uuid
from rl_coach.orchestrators.deploy import Deploy, DeployParameters from rl_coach.orchestrators.deploy import Deploy, DeployParameters
from kubernetes import client, config from kubernetes import client, config
@@ -41,6 +41,9 @@ class Kubernetes(Deploy):
self.deploy_parameters.namespace = current_context['context']['namespace'] self.deploy_parameters.namespace = current_context['context']['namespace']
self.nfs_pvc_name = 'nfs-checkpoint-pvc' self.nfs_pvc_name = 'nfs-checkpoint-pvc'
if os.environ.get('http_proxy'):
client.Configuration._default.proxy = os.environ.get('http_proxy')
def setup(self) -> bool: def setup(self) -> bool:
if not self.deploy_parameters.redis_ip: if not self.deploy_parameters.redis_ip: