Repository navigation
Let the K8S cluster decide on ipFamily usage (freshened #1651) - #1699
josephtate wants to merge 2 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: josephtate The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @josephtate. Thanks for your PR. I'm waiting for a pulp member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
d87119e to
03fb7fd
Compare
pulp#1651 (by @macwinnie) dropped the hardcoded IPFamilies: ["IPv4"] and IPFamilyPolicy: SingleStack from the api, content, database, and otel Services, letting Kubernetes default them from the cluster's own Service CIDR instead, the same way pulp-web and the redis Service already do. That fixes pulp#1380 (Services fail to create on a single-stack IPv6 cluster) with no new CRD field at all, but the original PR had no tests and went stale without maintainer review. Add unit tests confirming each of the four Service builders leaves IPFamilies/IPFamilyPolicy unset. These can't be verified through the existing Ginkgo/envtest suite: envtest's own control plane only has IPv4 configured, so a live Service fetched after creation resolves to the same ["IPv4"]/SingleStack value whether the operator hardcodes it or omits it and lets the cluster decide. This is one of two possible approaches to pulp#1380. A companion branch instead adds explicit spec.ip_family_policy/spec.ip_families CR fields for users who want deliberate control rather than just inheriting whatever the cluster defaults to. closes pulp#1380 Assisted By: Hermes Agent (claude-sonnet-5-5)
03fb7fd to
2a118d1
Compare
Freshen up #1651 (rebased onto current main, cherry-picked as-is, original authorship preserved) and add the test coverage + changelog fragment the original PR lacked, so maintainers have a working, up-to-date version of this approach to evaluate against #1700, which takes a different approach.
#1651 (by @macwinnie) took the simplest possible fix for #1380: drop the hardcoded
IPv4/SingleStackIPFamilies/IPFamilyPolicyentirely from the four Services that set them (pulp-api,pulp-content,database,otel), letting the Kubernetes API server default them from the cluster's own Service CIDR -- exactly howpulp-weband theredisService already behave today. No new CRD field, no configuration surface at all.Verified against real kind clusters, not just unit tests:
curlfrom a separate pod returnsHTTP:200against the live ClusterIP). This is the actual bug in Operator won't start services in single-stack IPv6 EKS #1380 -- the API server previously rejected these Services outright (spec.ipFamilies[0]: Invalid value: "IPv4": not configured on this cluster).ipFamilies/ipFamilyPolicymakes Kubernetes default a Service to the cluster's primary family (IPv4, since it's listed first in--service-cluster-ip-range), not to dual-stack, even when the cluster supports both.Caveat: this does not give you a way to opt into dual-stack. It only solves the single-stack-IPv6-only case; a cluster that supports both families will still get IPv4-only Services, identical to today's behavior. #1700 adds explicit
spec.ip_family_policy/spec.ip_familiesCR fields for deliberate dual-stack support, and was verified on the same dual-stack cluster to produce genuinely dual-stack Services (both an IPv4 and an IPv6 ClusterIP simultaneously, both independently reachable).Original PR by @macwinnie: #1651 (closed as stale, never got a maintainer
/ok-to-test, not rejected on technical merit).AI disclosure
Per the AI policy: the added test coverage, changelog fragment, and this description were written with Hermes Agent running claude-sonnet-5-5 (Anthropic). The commit carries an
Assisted By:label. Martin Winter's original commit (cherry-picked unchanged, preserving his authorship) is not covered by this disclosure. I reviewed the code and this description and can explain the change.closes #1380