-
Notifications
You must be signed in to change notification settings - Fork 44
Watch for keystone-overrides #795
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
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fmount The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
d07c59f to
b0508a9
Compare
| if ls := secret.GetLabels(); ls != nil { | ||
| lSelector := labels.GetLabelSelector(ls) | ||
| kSelector := labels.GetLabelSelector(keystonev1.KeystoneOverridesLabelSelector) | ||
| if labels.EqualLabelSelectors(lSelector, kSelector) { |
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.
@Deydra71 labels.EqualLabelSelectors is available in lib-common: openstack-k8s-operators/lib-common#638 and it is useful here where we want to trigger a reconcile based on a set of labels extracted from the secret.
We expect the secret labels to be the same of what is defined in keystonev1.KeystoneOverridesLabelSelector, which is instead available in keystone-operator: openstack-k8s-operators/keystone-operator#625.
This way this logic has minimal dependencies on the object that the controller reconciles, and minimize the amount of changes required in a service operator.
|
@Deydra71 I think I reduced as much as possible the amount of code required in the service operator.
By doing this is very easy to consume the same function on a different operator and copy/paste the same pattern. I'll verify this with Manila. |
This patch implements a watcher over keystone-overrides secrets based on a particular labelSelector. By doing this it is possible to extract and process keystone parameters (auth_url, www_authenticate_uri, region) and override the default information. Signed-off-by: Francesco Pantano <[email protected]>
|
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Closing as we discussed a different (better) solution |
This patch implements a watcher over keystone-overrides secrets based on a particular labelSelector. By doing this it is possible to extract and process keystone parameters (auth_url, www_authenticate_uri, region) and override the default information.