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

Policy controller should index services by clusterIPs #12420

Merged
merged 1 commit into from Apr 11, 2024

Conversation

alpeb
Copy link
Member

@alpeb alpeb commented Apr 10, 2024

This changes the policy controller service indexer to index services by their spec.clusterIPs instead of spec.clusterIP, to account for dual-stack services that hold both an IPv4 and an IPv6 address in spec.clusterIPs.

This change is fully backwards-compatible.

This assists the ongoing effort to support IPv6/dual-stack in linkerd, but doesn't imply full support yet.

This changes the policy controller service indexer to index
services by thier `spec.clusterIPs` instead of `spec.clusterIP`, to
account for dual-stack services that hold both an IPv4 and an IPv6
address in `spec.clusterIPs`.

This change is fully backwards-compatible.

This assists the ongoing effort to support IPv6/dual-stack in linkerd,
but doesn't imply full support yet.
@alpeb alpeb requested a review from a team as a code owner April 10, 2024 14:49
Copy link
Member

@olix0r olix0r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elsewhere (i.e. in the destination controller) we tend to revert back to cluster_ip if the cluster_ips is empty. Should we do that same defensive thing here?' What kubernetes version allows us to depend on clusterIPs being set reliably?

@alpeb
Copy link
Member Author

alpeb commented Apr 10, 2024

This is guaranteed on Service reads since k8s 1.20

Services will now have a clusterIPs field to go with clusterIP. clusterIPs[0] is a synonym for clusterIP and will be syncronized on create and update operations.

kubernetes/kubernetes#95894

@alpeb alpeb merged commit 6ad8fd2 into main Apr 11, 2024
41 checks passed
@alpeb alpeb deleted the alpeb/policy-clusterips branch April 11, 2024 12:06
the-wondersmith pushed a commit to the-wondersmith/linkerd2 that referenced this pull request Apr 24, 2024
This changes the policy controller service indexer to index
services by thier `spec.clusterIPs` instead of `spec.clusterIP`, to
account for dual-stack services that hold both an IPv4 and an IPv6
address in `spec.clusterIPs`.

This change is fully backwards-compatible.

This assists the ongoing effort to support IPv6/dual-stack in linkerd,
but doesn't imply full support yet.

Signed-off-by: Mark S <the@wondersmith.dev>
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.

None yet

4 participants