Skip to content

feat(service): publish externalIPs for ClusterIP services - #6951

Open
mloiseleur wants to merge 2 commits into
kubernetes-sigs:masterfrom
mloiseleur:feat/service-clusterip-external-ips
Open

mloiseleur wants to merge 2 commits into
kubernetes-sigs:masterfrom
mloiseleur:feat/service-clusterip-external-ips

Conversation

@mloiseleur

@mloiseleur mloiseleur commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

What does it do ?

A non-headless ClusterIP Service now publishes its spec.externalIPs, as LoadBalancer and ExternalName Services already do.
--publish-internal-services and the internal-hostname annotation still use the ClusterIP, so existing records do not change.
New records appear for ClusterIP Services that have spec.externalIPs and a hostname annotation or a matching --fqdn-template.

Motivation

Fixes #1281

More

  • Yes, this PR title follows Conventional Commits
  • Yes, I added unit tests
  • Yes, I updated end user documentation accordingly

A non-headless ClusterIP Service with spec.externalIPs produced no
targets unless --publish-internal-services or the internal-hostname
annotation was set. Use the externalIPs in that case, as LoadBalancer
and ExternalName Services already do.

The ClusterIP still wins when --publish-internal-services or the
internal-hostname annotation is set, so existing records do not change.
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubernetes-prow kubernetes-prow Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 9, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ivankatliarchuk 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

@kubernetes-prow kubernetes-prow Bot added the docs label Nov 9, 2026
@kubernetes-prow
kubernetes-prow Bot requested a review from szuecs November 9, 2026 21:35
@kubernetes-prow kubernetes-prow Bot added source cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 9, 2026
@coveralls

coveralls commented Nov 9, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 43067938124

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+0.004%) to 83.475%

Details

  • Coverage increased (+0.004%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 28 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

28 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
webhook/webhook.go 16 89.96%
service.go 12 93.32%

Coverage Stats

Coverage Status
Relevant Lines: 19837
Covered Lines: 16559
Line Coverage: 83.48%
Coverage Strength: 1466.34 hits per line

💛 - Coveralls

@mloiseleur
mloiseleur marked this pull request as ready for review November 11, 2026 17:24
@kubernetes-prow kubernetes-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 11, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from Raffo and u-kai November 11, 2026 17:24
@kubernetes-prow kubernetes-prow Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 11, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. docs size/L Denotes a PR that changes 100-499 lines, ignoring generated files. source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support ClusterIP services with externalIPs set

2 participants