-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
mixins: Normalize headless service name for query-frontend/scheduler #8880
mixins: Normalize headless service name for query-frontend/scheduler #8880
Conversation
00ba0da
to
573570e
Compare
@JoaoBraveCoding please fill in the PR template so we know why these changes are being made. |
@dannykopping done, sorry I forgot |
573570e
to
dd5f1d4
Compare
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.
Thank you @JoaoBraveCoding! I like the initiative here; have you tested this with your setup?
I'm hesitant to approve this though because it's changing the name of a service, which could cause disruption. I think we should hide this name behind a config option, defaulting to query-scheduler-discovery
, and allowing folks to override it if they want to.
Do you mean just the service name (metadata.name) or are you also worried that I've changed the name of the service resource in the mixin? Regarding the first, I am happy to put the name under a config variable defaulting to
Not yet but I don't expect this to break anything since the only actual change was adding a service (the non-headless for scheduler) and modifying the name of a service ( |
Yeah if it changes the way we identify the resource in k8s then I think that's a risk. |
90464c7
to
4798de2
Compare
4798de2
to
2808ae2
Compare
I've tested the change (thank you @dannykopping for suggesting it 😅 it had some bugs) This PR shows the modifications I had to make to use my version JoaoBraveCoding/observatorium#1 (I ran the |
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.
Almost there, thanks for the changes!
Problem: Mixins in general are rather complex pieces of code to consume. When trying to use the loki mixins it wasn't apparent at first that I could use a headless service for DNS SRV discovery for both query_frontend and query_scheduler, especially because for frontend the service is named query_frontend_headless_service and for the scheduler, it's named query_scheduler_service_discovery. Furthermore, the query_frontend mixin provides a non-headless version of the service while query_scheduler doesn't. This PR aims at normalizing this for end users, both headless services are now named query_frontend_headless_service and query_scheduler_headless_service and both also provide a non-headless version of the service. Signed-off-by: JoaoBraveCoding <jmarcal@redhat.com>
2808ae2
to
d5f7613
Compare
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.
LGTM, thank you very much @JoaoBraveCoding!
What this PR does / why we need it:
Mixins in general are rather complex pieces of code to consume. When trying to use the loki mixins it wasn't apparent at first that I could use a headless service for DNS SRV discovery for both query_frontend and query_scheduler, especially because for frontend the service is named
query_frontend_headless_service
and for the scheduler, it's namedquery_scheduler_service_discovery
. Furthermore, the query_frontend mixin provides a non-headless version of the service while query_scheduler doesn't. This PR aims at normalizing this for end users, both headless services are now namedquery_frontend_headless_service
andquery_scheduler_headless_service
and both also provide a non-headless version of the service.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)CHANGELOG.md
updateddocs/sources/upgrading/_index.md