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

[release-1.25] Use default address family when adding kubernetes service address to SAN list #6904

Merged

Conversation

brandond
Copy link
Member

@brandond brandond commented Feb 7, 2023

Proposed Changes

Use default address family when adding kubernetes service address to SAN list

We were using the legacy ServiceCIDR, which is always IPv4 if one is configured. We should instead use the first CIDR, which determines the cluster's default address family.

For the same reason, don't prefer advertising the IPv4 node addresses if both IPv4 and IPv6 addresses are given, just use whatever's given first.

Types of Changes

Verification

  • See linked issue
  • On a dual-stack cluster with IPv6 preferred (given first in the CIDR list), check for the cluster service address in the apiserver cert: openssl x509 -noout -text /var/lib/rancher/k3s/server/tls/serving-kube-apiserver.crt

Testing

Linked Issues

User-Facing Change

The apiserver advertised address and IP SAN entry are now set correctly on clusters that use IPv6 as the default IP family.

Further Comments

@brandond brandond requested a review from a team as a code owner February 7, 2023 00:20
@brandond brandond changed the title [release-1.25] Use default address family when adding kubernetes service address to … [release-1.25] Use default address family when adding kubernetes service address to SAN list Feb 7, 2023
@brandond brandond merged commit ae874ea into k3s-io:release-1.25 Feb 9, 2023
@brandond brandond deleted the apiserver-ip-san_release-1.25 branch June 6, 2024 21:08
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