Skip to content
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

feat(multicluster): propagate service labels to endpoints #13583

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maxbrunet
Copy link
Contributor

When Kubernetes creates endpoints for a service, it propagates the labels from the parent service to the endpoints, allowing these labels to be used for discovery. When using Linkerd mirrored endpoints, this ability was lost until now.

This change simply mimics the vanilla Kubernetes behavior by propagating the remote service labels to mirror endpoints.

kubernetes/kubernetes@a716ea7/pkg/controller/endpoint/endpoints_controller.go#L506

The tests were updated to include a custom label on the services and validate its propagation to the endpoints

When Kubernetes creates endpoints for a service, it propagates the
labels from the parent service to the endpoints, allowing these labels
to be used for discovery. When using Linkerd mirrored endpoints,
this ability was lost until now.

This change simply mimics the vanilla Kubernetes behavior by propagating
the remote service labels to mirror endpoints.

https://github.com/kubernetes/kubernetes/blob/a716ea756d87f60900dbbb500fc27ae30f7bd384/pkg/controller/endpoint/endpoints_controller.go#L506

Signed-off-by: Maxime Brunet <[email protected]>
@maxbrunet maxbrunet requested a review from a team as a code owner January 21, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants