-
Notifications
You must be signed in to change notification settings - Fork 3.4k
daemon: drop the non headless service/endpoint resources #35838
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
daemon: drop the non headless service/endpoint resources #35838
Conversation
/test |
All the usage of service/endpoints resources and service cache in the daemon:
|
e07aba6
to
5d2f4b7
Compare
/test |
1 similar comment
/test |
a6a7dab
to
9bbcdbb
Compare
/test |
9bbcdbb
to
bed90e7
Compare
/test |
7fae3b2
to
84337ab
Compare
/test |
1 similar comment
/test |
84337ab
to
43e5479
Compare
/test |
/ci-l4lb |
I believe this should be ready for reviews. Although, it needs reviews from more groups than sig-k8s/sig-agent, and in particular (according to code owners) @cilium/sig-bgp, @cilium/sig-policy , @cilium/sig-lb (for redirect policy). I tried to summarize the impact of this change here: #35838 (comment), TLDR: according to my research it should have no impact outside of policies that will start to include headless Services (which might count as an additional feature?). But this needs reviews from all the groups mentioned above to validate that and have their opinion. Also cc @giorio94 @marseel that found this issue (thanks again for finding it!) |
43e5479
to
c27f2d6
Compare
/test |
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.
Thanks for addressing this! A few minor comments inline.
Redirect policy: Seems to be handling headless services well by ignoring service without frontend ips.
I assume this may be problematic in case of services marked as headless via the label, but associated with a ClusterIP, given that they would have a frontend IP.
And policy handling doesn't seems to require the frontend IP. Letting headless services be processed should result in CNP being able to process headless services without any new handling.
I personally don't have enough context to comment on this.
912ba08
to
ed917f4
Compare
I agree, that looks really a corner case, which is probably not handled consistently by every project. |
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.
BGP looks good to me. Thanks!
Headless services may have frontend IPs if labeled with `service.kubernetes.io/headless` and those should not be taken into account in the datapath. This commit allow to handle the cleanup of such services. Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
Before this commit two types of resources were exposed for services and endpoints: one excluding headless services/endpoints and one including them. This commit drop the non headless resource to make sure we only start one informer for services and endpoints and lower the load the apiserver. The consumers of the resources excluding the headless services/endpoint already handles headless services. Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
ed917f4
to
894b91a
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, thanks for the quick attention 👍
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.
Sorry, I just noticed I had not explicitly approved it.
/test |
/ci-e2e-upgrade |
For cases when envoyConfig was enabled, we were starting separate informers for services and endpoints. This resulted in a duplicated informers, adding overhead for both cilium-agent and k8s apiserver. Before, existing informer did not handle headless services, which was changed in #35838 so now we can rely on a single informer instead. Signed-off-by: Marcel Zieba <marcel.zieba@isovalent.com>
For cases when envoyConfig was enabled, we were starting separate informers for services and endpoints. This resulted in a duplicated informers, adding overhead for both cilium-agent and k8s apiserver. Before, existing informer did not handle headless services, which was changed in #35838 so now we can rely on a single informer instead. Signed-off-by: Marcel Zieba <marcel.zieba@isovalent.com>
[ upstream commit a4fecbe ] For cases when envoyConfig was enabled, we were starting separate informers for services and endpoints. This resulted in a duplicated informers, adding overhead for both cilium-agent and k8s apiserver. Before, existing informer did not handle headless services, which was changed in #35838 so now we can rely on a single informer instead. Signed-off-by: Marcel Zieba <marcel.zieba@isovalent.com> Signed-off-by: gray <greyschwinger@gmail.com>
[ upstream commit a4fecbe ] For cases when envoyConfig was enabled, we were starting separate informers for services and endpoints. This resulted in a duplicated informers, adding overhead for both cilium-agent and k8s apiserver. Before, existing informer did not handle headless services, which was changed in #35838 so now we can rely on a single informer instead. Signed-off-by: Marcel Zieba <marcel.zieba@isovalent.com> Signed-off-by: gray <greyschwinger@gmail.com>
[ upstream commit a4fecbe ] For cases when envoyConfig was enabled, we were starting separate informers for services and endpoints. This resulted in a duplicated informers, adding overhead for both cilium-agent and k8s apiserver. Before, existing informer did not handle headless services, which was changed in #35838 so now we can rely on a single informer instead. Signed-off-by: Marcel Zieba <marcel.zieba@isovalent.com> Signed-off-by: gray <greyschwinger@gmail.com>
Please ensure your pull request adheres to the following guidelines:
description and a
Fixes: #XXX
line if the commit addresses a particularGitHub issue.
Fixes: <commit-id>
tag, thenplease add the commit author[s] as reviewer[s] to this issue.
Before this PR two types of resources were exposed for services and endpoints: one excluding headless services/endpoints and one including them. This PR drop the non headless resource (and make the necessary changes to accommodate that) to make sure we only start one informer for services and endpoints and lower the load the apiserver.
Fixes: #35797