Skip to content

Commit

Permalink
Automatically add LXD instance name to NO_PROXY (#108)
Browse files Browse the repository at this point in the history
* Add LXD instance name to no_proxy

* Add .svc to no proxy
  • Loading branch information
yhaliaw authored Aug 28, 2023
1 parent 64f3ed0 commit 8dc19e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ def __init__(
self.status = runner_status
self.instance = instance

# If the proxy setting are set, then add NO_PROXY local variables.
if self.config.proxies.get("http") or self.config.proxies.get("https"):
if self.config.proxies.get("no_proxy"):
self.config.proxies["no_proxy"] += ","
self.config.proxies["no_proxy"] += f"{self.config.name},.svc"

def create(
self,
image: str,
Expand Down

0 comments on commit 8dc19e0

Please sign in to comment.