Skip to content

feat(source): add unstructured source#6172

Open
ivankatliarchuk wants to merge 10 commits intokubernetes-sigs:masterfrom
gofogo:issue-3437-unstructured
Open

feat(source): add unstructured source#6172
ivankatliarchuk wants to merge 10 commits intokubernetes-sigs:masterfrom
gofogo:issue-3437-unstructured

Conversation

@ivankatliarchuk
Copy link
Member

@ivankatliarchuk ivankatliarchuk commented Feb 7, 2026

What does it do ?

A new unstructured source that creates DNS records from any Kubernetes custom resource using Go templates.

Supporting every possible ingress or product isn’t practical. For example, it’s fairly common to have custom products, and ExternalDNS doesn’t really fit that model today, as it doesn’t provide even basic support for custom sources.

Added flags

  • --unstructured-resource=
  • --fqdn-target-template=
  • --fqdn-host-target-template=

Motivation

We shouldn't have to wait for external-dns to add built-in support for some specific CRDs. With this source, they can point external-dns at any resource (KubeVirt VMs, Crossplane resources, MetalLB pools, etc.) and use templates to extract hostnames and targets from .spec or .status fields.

Fixes #3437
Fixes #5104

First attempt #3490. That was abandoned

More

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

I could slice this PR, move tests to another PR and 400+ lines in docs

┌──────────┬───────┐
│ Category │ Lines │
├──────────┼───────┤
│ Non-test │ +515  │
├──────────┼───────┤
│ Test     │ +1728 │
├──────────┼───────┤
│ Ratio    │ 1:3.3│
└──────────┴───────┘

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@k8s-ci-robot
Copy link
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

@k8s-ci-robot k8s-ci-robot requested a review from szuecs February 7, 2026 08:11
@k8s-ci-robot k8s-ci-robot added the apis Issues or PRs related to API change label Feb 7, 2026
@k8s-ci-robot k8s-ci-robot requested a review from vflaux February 7, 2026 08:11
@k8s-ci-robot k8s-ci-robot added docs internal Issues or PRs related to internal code source cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 7, 2026
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@coveralls
Copy link

coveralls commented Feb 7, 2026

Pull Request Test Coverage Report for Build 21788334937

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 119 unchanged lines in 6 files lost coverage.
  • Overall coverage decreased (-0.1%) to 79.053%

Files with Coverage Reduction New Missed Lines %
openshift_route.go 1 83.97%
apis/externaldns/types.go 1 99.62%
apis/externaldns/validation/validation.go 2 97.62%
fqdn/fqdn.go 5 93.59%
testutils/endpoint.go 16 71.29%
store.go 94 46.28%
Totals Coverage Status
Change from base Build 21559764040: -0.1%
Covered Lines: 16243
Relevant Lines: 20547

💛 - Coveralls

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@ivankatliarchuk ivankatliarchuk force-pushed the issue-3437-unstructured branch 4 times, most recently from 0489f54 to 995236f Compare February 7, 2026 11:33
@ivankatliarchuk ivankatliarchuk marked this pull request as draft February 7, 2026 13:56
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 7, 2026
@ivankatliarchuk ivankatliarchuk force-pushed the issue-3437-unstructured branch 2 times, most recently from c45dd7f to 78f2b7b Compare February 7, 2026 14:29
@ivankatliarchuk ivankatliarchuk marked this pull request as ready for review February 7, 2026 14:30
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 7, 2026
@ivankatliarchuk ivankatliarchuk force-pushed the issue-3437-unstructured branch 8 times, most recently from 79a2707 to b8cba40 Compare February 7, 2026 16:29
@ivankatliarchuk ivankatliarchuk force-pushed the issue-3437-unstructured branch 4 times, most recently from e1e01f4 to 8e032e3 Compare February 7, 2026 18:44
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apis Issues or PRs related to API change cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. docs internal Issues or PRs related to internal code size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DNSEndpoint targets value from configmap Support ApisixRoute

3 participants