Skip to content

docs(annotations): scope the access annotation to the Service source - #6624

Open
oscrx wants to merge 1 commit into
kubernetes-sigs:masterfrom
oscrx:docs/scope-access-annotation
Open

docs(annotations): scope the access annotation to the Service source#6624
oscrx wants to merge 1 commit into
kubernetes-sigs:masterfrom
oscrx:docs/scope-access-annotation

Conversation

@oscrx

@oscrx oscrx commented Aug 11, 2026

Copy link
Copy Markdown

Description

external-dns.kubernetes.io/access is read in exactly one place — getAccessFromAnnotations, called only from extractNodePortTargets in source/service.go. Every other source ignores it silently.

Two docs problems follow from that:

  1. The FAQ entry is written source-agnostically and states a default that is not true outside the Service source. It says "If this annotation is not set, and the node has both public and private IP addresses, then the public IP will be used by default." The Ingress source takes its targets from status.loadBalancer.ingress, so when the ingress controller publishes both a public and a private address, both are published — there is no preference for the public one. This was pointed out in Target detection with NodePort ingress #3270 in December 2023 and never addressed.

  2. The annotation support matrix has no access column at all (nor endpoints-type). Both are documented only in prose further down the page, so the table a user consults to check per-source support does not mention them.

This PR is docs-only:

  • scopes the FAQ entry to Service of type NodePort, states that other sources ignore the annotation and that the documented default does not apply to them;
  • explains what the Ingress source actually does, and lists the three ways to control which addresses reach DNS for an Ingress (ingress controller configuration, the target annotation, --target-net-filter/--exclude-target-net);
  • notes that --target-net-filter/--exclude-target-net are process-wide and that an endpoint whose targets are all filtered out is dropped;
  • adds access and endpoints-type columns to the support matrix, with footnotes for the NodePort-only and headless-only restrictions;
  • notes that ExternalDNS does not warn when an annotation is set on a source that ignores it.

No behaviour change is proposed here. Whether the Ingress source should honour access is a separate question — it would need a node informer and nodes RBAC in that source, and a definition of which nodes an arbitrary Ingress refers to. That belongs in a proposal rather than this PR.

Fixes #5266

Related: #3270, #1841 — the same report, in 2023 and 2020, both bot-closed without a docs fix.

Checklist

  • Unit tests updated — n/a, docs-only
  • End user documentation updated
  • mkdocs build --strict passes locally

🤖 Generated with Claude Code

@kubernetes-prow
kubernetes-prow Bot requested a review from Raffo August 11, 2026 00:35
@kubernetes-prow kubernetes-prow Bot added the docs label Aug 11, 2026
@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 requested a review from szuecs August 11, 2026 00:35
@kubernetes-prow kubernetes-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 11, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 11, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: oscrx / name: Oscar Wieman (ba440c5)

@kubernetes-prow

Copy link
Copy Markdown

Hi @oscrx. 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.

Regular contributors should join the org to skip this step.

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 cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 11, 2026
`external-dns.kubernetes.io/access` is read in exactly one place:
`getAccessFromAnnotations` in source/source.go, called only from
`extractNodePortTargets` in source/service.go. Every other source
ignores it.

The FAQ entry describing it is written source-agnostically, and its
stated default ("the public IP will be used by default") does not hold
outside the Service source. The Ingress source takes its targets from
`status.loadBalancer.ingress`, so when the controller publishes both a
public and a private address, both are published rather than the public
one being preferred.

Scope the FAQ entry, document the alternatives available for Ingress,
and add `access` and `endpoints-type` columns to the annotation support
matrix, where both were previously absent.

Reported in kubernetes-sigs#5266, kubernetes-sigs#3270 and kubernetes-sigs#1841.

Signed-off-by: Oscar Wieman <oscar@oscarr.nl>
@oscrx
oscrx force-pushed the docs/scope-access-annotation branch from 08b4670 to ba440c5 Compare August 11, 2026 00:41
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 11, 2026
@ivankatliarchuk

Copy link
Copy Markdown
Member

/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 Aug 11, 2026
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 31446894312

Coverage remained the same at 81.772%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 21396
Covered Lines: 17496
Line Coverage: 81.77%
Coverage Strength: 1456.8 hits per line

💛 - Coveralls

@ivankatliarchuk

Copy link
Copy Markdown
Member

/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 11, 2026
| Service | Yes | Yes[^1] | Yes[^1][^2] | Yes[^3] | Yes | Yes |
| Skipper | Yes | Yes[^1] | | Yes | Yes | Yes |
| Traefik | | Yes[^1] | | Yes[^6] | Yes | Yes |
| Source | access | controller | endpoints-type | hostname | internal-hostname | target | ttl | (provider-specific) |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks a bit weird to add a column in this table for an annotation used only by one source.
Would you please restore the original table?

Comment thread docs/faq.md
If this annotation is not set, and the node has both public and private IP addresses, then the public IP will be used by default.

This applies to the [Service source](sources/service.md) only, and only to `Service`s of type `NodePort`.
Every other source ignores the annotation, and the default described above does not apply to them either.

@mloiseleur mloiseleur Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Every other source ignores the annotation, and the default described above does not apply to them either.
Every other source ignores the annotation.

AFAIR, even though the annotation cannot be used, the default applies for node source.

Comment thread docs/faq.md
and a private address, both are published. To control which addresses end up in DNS for an `Ingress`:

- configure the ingress controller to publish the addresses you want in `status.loadBalancer.ingress`
(`ingress-nginx`, for example, has `--report-node-internal-ip-address`);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(`ingress-nginx`, for example, has `--report-node-internal-ip-address`);

Please avoid citing specific soft here, especially when this one is now no more maintained.

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 lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

external-dns.alpha.kubernetes.io/access=private has no effect on Ingress

4 participants