From cd733b2404204e68a93e23a988183a731ce2c856 Mon Sep 17 00:00:00 2001 From: Zach Dwiel Date: Thu, 20 Sep 2018 11:25:45 -0400 Subject: [PATCH] add support for running kubernetes orchestrator from behind proxy --- rl_coach/orchestrators/kubernetes_orchestrator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rl_coach/orchestrators/kubernetes_orchestrator.py b/rl_coach/orchestrators/kubernetes_orchestrator.py index 4bb8702..71336c7 100644 --- a/rl_coach/orchestrators/kubernetes_orchestrator.py +++ b/rl_coach/orchestrators/kubernetes_orchestrator.py @@ -1,4 +1,4 @@ - +import os import uuid from rl_coach.orchestrators.deploy import Deploy, DeployParameters from kubernetes import client, config @@ -41,6 +41,9 @@ class Kubernetes(Deploy): self.deploy_parameters.namespace = current_context['context']['namespace'] 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: if not self.deploy_parameters.redis_ip: