Skip to content

Conversation

@addyess
Copy link
Contributor

@addyess addyess commented Apr 15, 2025

Resolves: LP#2104884

share the following values over the openstack-client relation so that openstack endpoints are contacted through the proxy:

this dictionary will be filled by the openstack-integrator with the following env variables useful for proxying to openstack endpoints
HTTP_PROXY
HTTPS_PROXY
NO_PROXY

Signed-off-by: Adam Dyess <adam.dyess@canonical.com>
Copy link

@HomayoonAlimohammadi HomayoonAlimohammadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thanks a lot @addyess! LGTM, left some minor nits and questions.

Comment on lines +164 to +165
@property
def proxy_config(self) -> Dict[str, str]:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HomayoonAlimohammadi i switched this to a property to match the requires side of the relation

config = None
if self.is_ready and (data := self._data):
config = data.proxy_config
return config or {}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because of pydantic validators, we can trust that after calling self.is_ready that whatever is in proxy_config is either None or Dict[str,str]

@addyess addyess changed the title Support sharing the proxy-config via o7s-interface relation Support sharing the proxy-config via o7k-interface relation Apr 16, 2025
@addyess addyess merged commit cf43839 into master Apr 16, 2025
5 checks passed
@addyess addyess deleted the KU-3229/support-o7k-endpoint-through-proxy branch April 16, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants