-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
clustermesh: Add EndpointSlice support for API server #20697
clustermesh: Add EndpointSlice support for API server #20697
Conversation
Currently, clustermesh-apiserver doesn't support synchronizing EndpointSlice to kvstore. This happens because clustermesh-apiserver always set DaemonConfig.K8sEnableEndpointSlice option to false while calling DaemonConfig.Populate(). As a result, clustermesh-apiserver always fallbacks to the Endpoints. The problem of this is we cannot support dual-stack global service since Endpoints only contains the backends for primary IP address family (Service.spec.ipFamilies[0]). Thus, clustermesh-apiserver only synchronizes backends with single IP address family. Also, when cilium-agents are running with EndpoitSlice and clustermesh-apiservers are running with Endpoints, it will make a state that global services only contain local endpoints for secondary IP address family which is unexpected from users' perspective. To fix that, we expose a new command line configuration knob --enable-k8s-endpointslice=<bool> for clustermesh-apiserver and populate its value from cilium-config ConfigMap. So that cilium-agent and clustermesh-apiserver always use the same endpoint type. Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
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 💯
/test Job 'Cilium-PR-K8s-1.23-kernel-4.19' failed: Click to show.Test Name
Failure Output
If it is a flake and a GitHub issue doesn't already exist to track it, comment Job 'Cilium-PR-K8s-1.16-kernel-4.9' failed: Click to show.Test Name
Failure Output
If it is a flake and a GitHub issue doesn't already exist to track it, comment |
Please see the commit message for details. I think we need to backport this to 1.10 and 1.11 because it meets the backport criteria "Major bugfixes relevant to the correct operation of Cilium" because, without this change, global service only contains local endpoints for secondary IP family when users configure dual-stack service and their k8s support EndpointSlice which is an incorrect behavior I think.