Skip to content

Let the K8S cluster decide on ipFamily usage (freshened #1651) - #1699

Open
josephtate wants to merge 2 commits into
pulp:mainfrom
josephtate:freshen-pr-1651
Open

josephtate wants to merge 2 commits into
pulp:mainfrom
josephtate:freshen-pr-1651

Conversation

@josephtate

@josephtate josephtate commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

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/SingleStack IPFamilies/IPFamilyPolicy entirely 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 how pulp-web and the redis Service already behave today. No new CRD field, no configuration surface at all.

Verified against real kind clusters, not just unit tests:

  • Single-stack IPv6-only cluster: Services get real IPv6 ClusterIPs, confirmed independently addressable (curl from a separate pod returns HTTP:200 against 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).
  • Dual-stack cluster: no regression -- the full Pulp stack (api/content/web/worker) still comes up and serves traffic correctly. However, the Services stay single-stack IPv4-only; they do not become dual-stack, since omitting ipFamilies/ipFamilyPolicy makes 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_families CR 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

@openshift-ci
openshift-ci Bot requested review from git-hyagi and ipanova November 5, 2026 19:27
@openshift-ci

openshift-ci Bot commented Nov 5, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: josephtate
Once this PR has been reviewed and has the lgtm label, please assign git-hyagi for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci

openshift-ci Bot commented Nov 5, 2026

Copy link
Copy Markdown

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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-sigs/prow repository.

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Operator won't start services in single-stack IPv6 EKS

2 participants