-
Notifications
You must be signed in to change notification settings - Fork 31
K8SPS-475 don't include expose labels to selector #1001
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
This is an expected behavior as specified here: https://perconadev.atlassian.net/browse/K8SPXC-1082 |
I suggest keeping the changes related only to this |
thanks @pooknull 🙌🏽 |
commit: bed66a5 |
* K8SPS-475 don't include expose labels to selector * additions and fixes * fix orchestrator selector * dont keep old metadata for services, rely only on the ignore mechanism * remove false to ensure service * remove labels from selector * fix router and haproxy selector --------- Co-authored-by: Viacheslav Sarzhan <[email protected]> Co-authored-by: Natalia Marukovich <[email protected]>
CHANGE DESCRIPTION
Problem:
While testing the expose primary functionality, we observed the following issues:
adding a label to exposePrimary applies label to selector and it breaks pod selection. we have the same problem with expose.labels
deleting the label from exposePrimary deletes the label from service selector but doesn't delete it from service metadata - 👉🏽 after checking with @pooknull , seems that this is actually a feature, so we will not change the behaviour.
The labels were also added by default to the already existing services and as a result, the pod selection was failing if the labels were not added to the respective component as well.
With this PR, we will add the labels only to the labels section and not to the selector. Selector labels will be added as a separate task, ticket: https://perconadev.atlassian.net/browse/K8SPS-486
Note that we also updated: router, haproxy and orchestractor, together with mysql to behave the same way.
Cause:
Short explanation of the root cause of the issue if applicable.
Solution:
On top of the respective fixes for the selector and the deletion of the old labels, we added unit testing were missing.
CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
Config/Logging/Testability