Skip to content

fix(source): skip PodIP-derived records when PodIP is empty - #6695

Open
immanuwell wants to merge 1 commit into
kubernetes-sigs:masterfrom
immanuwell:fix-pod-empty-ip
Open

fix(source): skip PodIP-derived records when PodIP is empty#6695
immanuwell wants to merge 1 commit into
kubernetes-sigs:masterfrom
immanuwell:fix-pod-empty-ip

Conversation

@immanuwell

@immanuwell immanuwell commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What does it do ?

Skips records that need PodIP while Kubernetes has not assigned one.
Explicit targets and node based records keep working

Motivation

Fixes #6375. Supersedes #6376

Repro:

  1. Run ExternalDNS with the pod source and Azure Private DNS
  2. Create a Pod with external-dns.kubernetes.io/internal-hostname, and keep it Pending with an unmatched node selector
  3. Current master creates a CNAME with an empty target
  4. When the Pod gets an IP, Azure rejects the A record because that CNAME already exists

Pretty easy to hit during autoscaling

More

  • Yes, this PR title follows Conventional Commits
  • Yes, I added unit tests
  • No end user docs needed for this bug fix

@kubernetes-prow

Copy link
Copy Markdown

[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 raffo 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 source cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 1, 2026
@kubernetes-prow

Copy link
Copy Markdown

Hi @immanuwell. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

@kubernetes-prow kubernetes-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 1, 2026
Signed-off-by: immanuwell <pchpr.00@list.ru>
@kubernetes-prow kubernetes-prow Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 1, 2026
@mloiseleur

Copy link
Copy Markdown
Collaborator

/ok-to-test

@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 3, 2026
@mloiseleur

Copy link
Copy Markdown
Collaborator

@immanuwell Did you confirm the fix is working? Would you please share what you used and your findings?

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 33536224558

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.01%) to 81.599%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

2 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
pod.go 2 96.63%

Coverage Stats

Coverage Status
Relevant Lines: 18956
Covered Lines: 15468
Line Coverage: 81.6%
Coverage Strength: 1110.78 hits per line

💛 - Coveralls

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pod source creates CNAME records with empty target when PodIP is not yet assigned

3 participants