docs(proposal): generic target-from resource dereference#6536
docs(proposal): generic target-from resource dereference#6536mloiseleur wants to merge 3 commits into
Conversation
Proposal 007. Generic external-dns.alpha.kubernetes.io/target-from annotation to source a record target from a field on another resource, replacing per-product source-to-CRD coupling (istio ingress, proposed gateway/global-accelerator).
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Default annotation prefix is external-dns.kubernetes.io/ since kubernetes-sigs#6424.
Coverage Report for CI Build 28705265521Coverage remained the same at 83.384%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
|
I actually have branch with changes on my machine. Was experimenting with best possible options |
u-kai
left a comment
There was a problem hiding this comment.
I like this proposal!
One concern: cross-namespace target-from references could introduce unexpected vulnerabilities. Worth considering something like Gateway API's ReferenceGrant for this?
|
On ReferenceGrant specifically: I'm not sure it fits the model external-dns operates under. Today, the referencer sets an annotation pointing at another resource - the referenced resource's owner has no say, for target, ingress, or any other lookup. That's not particular to this proposal; it's how the whole annotation-driven model already works. So the question isn't really "does this one feature need a grant mechanism" but "does external-dns's model need one at all" - given RBAC already governs what the controller can read. There's already a Kubernetes-native mechanism for this: RBAC. Operators grant external-dns's ServiceAccount access to exactly the namespaces and resources they want it to read - that's the existing "who can point at what" boundary, and it already applies to every source in this codebase today. On a possible
So if we do add something like new flag or CRD (ReferenceGrant), I'd frame it purely as a caching/efficiency knob, not a security boundary - RBAC already owns that job, and not clear why we should be introducing another abstraction. |
What does it do ?
Adds proposal 007: a generic
external-dns.kubernetes.io/target-fromannotation resolving a record's target from a field on another resource (dynamic client + RESTMapper, no vendor CRDs in sources).Replaces per-product source-to-CRD coupling.
Motivation
Recurring, repeatedly-held/closed requests to couple sources to product CRDs: #6438 (Istio→Gateway API), #6190 / #6166 (→AWS Global Accelerator), #6457, #4687.
Formalizes the generic annotation @ivankatliarchuk sketched in #6190.
More