-
Notifications
You must be signed in to change notification settings - Fork 4
Support sharing the proxy-config via o7k-interface relation #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Adam Dyess <adam.dyess@canonical.com>
dd354af to
60d2982
Compare
HomayoonAlimohammadi
left a comment
There was a problem hiding this 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.
| @property | ||
| def proxy_config(self) -> Dict[str, str]: |
There was a problem hiding this comment.
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 {} |
There was a problem hiding this comment.
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]
Resolves: LP#2104884
share the following values over the
openstack-clientrelation so that openstack endpoints are contacted through the proxy:this dictionary will be filled by the
openstack-integratorwith the following env variables useful for proxying to openstack endpointsHTTP_PROXYHTTPS_PROXYNO_PROXY