Skip to content

Commit

Permalink
add proxy env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
kelkawi-a committed Jan 10, 2024
1 parent f2f4021 commit efcbd20
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,19 @@ def _update(self, event):
{"TEMPORAL_AUTH_CALLBACK_URL": f"https://{self.config['external-hostname']}/auth/sso/callback"}
)

http_proxy = os.environ.get("JUJU_CHARM_HTTP_PROXY")
https_proxy = os.environ.get("JUJU_CHARM_HTTPS_PROXY")
no_proxy = os.environ.get("JUJU_CHARM_NO_PROXY")

if http_proxy or https_proxy:
context.update(
{
"HTTP_PROXY": http_proxy,
"HTTPS_PROXY": https_proxy,
"NO_PROXY": no_proxy,
}
)

config = render("config.jinja", context)
container.push("/home/ui-server/config/charm.yaml", config, make_dirs=True)

Expand Down

0 comments on commit efcbd20

Please sign in to comment.