-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Add label to delegate endpoints control to custom controller #87488
Conversation
…dpoints control Signed-off-by: Tomofumi Hayashi <tohayash@redhat.com>
@s1061123: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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/test-infra repository. |
Welcome @s1061123! |
Hi @s1061123. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: s1061123 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign @deads2k |
/sig network |
/assign @robscott |
Hey @s1061123, just trying to make sure I understand the goal here. The corresponding issue compares this to what exists for kube-proxy to tell it to ignore Services with the If I'm understanding this correctly, we already have a label that covers this capability for EndpointSlices ( |
Hi @robscott, Thank you for your comments! I've looked the code and I suppose there are a little gaps. First, let me clarify the label, Looking the code (master branch), this label is for endpointslice, added by k8s endpointslice controller and once it is changed to another value, then k8s endpointslice controller ignores only to watch update. When the Service/Pod are created with service selector, k8s endpointslice controller always creates endpointslice whatever the label is. If we change endpointslice label value, I tested it in K8s v1.17.2 and here's the logs. I added nginx service, changed the label and scale the service, then k8s endpointslice controller creates another endpointslice. https://gist.github.com/s1061123/bfa450cb28a923c8624360ae17e5e522 With custom controller case, I imagined that the following scenario might be reasonable:
I understood that Endpoint will be replaced with EndpointSlice, hence I am okey to use EndpointSlice, however, current I am going to update diffs to support endpointslices. |
Hey @s1061123, thanks for the additional detail! I'm still not quite sure I'm understanding this proposal correctly though. It sounds like you're hoping to have some kind of label on a Service that would prevent the EndpointSlice controller from creating or managing EndpointSlices for the Service. Right now the only way to accomplish that would be to have an empty selector on the Service itself. Currently we have two scenarios covered that seem related to this proposal:
Are you able to accomplish what you want with 1 or 2? If not, it would be helpful to have some more examples of how you'd like this to work and why. |
Thank you for your quick reply, @robscott,
I would like to use service selector for the service/pod of my custom controller because service selector is the good way to making association between service and pods and it is common in Kubernetes community hence I would like to use this mechanisms. |
Thank you for your advice! I am going to write KEP for that. By the way, should I close this PR, or keep it as WIP? |
👍 Sounds good. I think it would be better to close this at least temporarily since our processes tend to bug us about PRs that have gone stale. This could always be reopened after the KEP process. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR introduces new label, "service.kubernetes.io/endpoint-controller-name", to delegate endpoints control to custom controller.
Which issue(s) this PR fixes:
Fixes #87412
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: