124 Commits

Author SHA1 Message Date
Isaac Wilson
e33ab8d46b
feat(gateway): add gateway-api listenerset support (#6254)
* Add listenerset support

Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>
Signed-off-by: jukie <isaac.wilson514@gmail.com>

* Add cross-namespace test

Signed-off-by: jukie <isaac.wilson514@gmail.com>

* lint

Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>

* lint

Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>

* Add flag to gate listenerset informer

Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>

* generate docs

Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>

* Include default behavior

Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>

* Support listenerset target annotation

Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>

* docs

Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>

* feedback

Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>

* Update source/gateway_listenerset_test.go

Co-authored-by: Ivan Ka <5395690+ivankatliarchuk@users.noreply.github.com>

* Fix gateway labelFilter

Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>

* lint

Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>

* test case

Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>

* feedback

Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>

* lint

Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>

---------

Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>
Signed-off-by: jukie <isaac.wilson514@gmail.com>
Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>
Co-authored-by: Ivan Ka <5395690+ivankatliarchuk@users.noreply.github.com>
2026-04-02 17:23:04 +05:30
Seena Fallah
736a2d58ae
feat!: generalize PTR record support from rfc2136 to all providers (#6232)
* feat(metrics): add source wrapper metrics for invalid and deduplicated endpoints

Add GaugeVecMetric.Reset() to clear stale label combinations between cycles.

Introduce invalidEndpoints and deduplicatedEndpoints gauge vectors in the
source wrappers package, partitioned by record_type and source_type. The
dedup source wrapper now tracks rejected (invalid) and de-duplicated
endpoints per collection cycle.

Update the metrics documentation and bump the known metrics count.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* feat(source): add PTR source wrapper for automatic reverse DNS

Implement ptrSource, a source wrapper that generates PTR endpoints from
A/AAAA records. The wrapper supports:

- Global default via WithCreatePTR (maps to --create-ptr flag)
- Per-endpoint override via record-type provider-specific property
- Grouping multiple hostnames sharing an IP into a single PTR endpoint
- Skipping wildcard DNS names

Add WithPTRSupported and WithCreatePTR options to the wrapper Config
and wire the PTR wrapper into the WrapSources chain when PTR is in
managed-record-types.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* feat(config): add --create-ptr flag and deprecate --rfc2136-create-ptr

Add the generic --create-ptr boolean flag to Config, enabling automatic
PTR record creation for any provider. Add IsPTRSupported() helper that
checks whether PTR is included in --managed-record-types.

Add validation: --create-ptr (or legacy --rfc2136-create-ptr) now
requires PTR in --managed-record-types, preventing misconfiguration.

Mark --rfc2136-create-ptr as deprecated in the flag description.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* refactor(rfc2136): remove inline PTR logic in favor of PTR source wrapper

Remove the createPTR field, AddReverseRecord, RemoveReverseRecord, and
GenerateReverseRecord methods from the rfc2136 provider. PTR record
generation is now handled generically by the PTR source wrapper before
records reach the provider.

Update the PTR creation test to supply pre-generated PTR endpoints
(simulating what the source wrapper produces) instead of relying on
the provider to create them internally.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* feat(controller): wire PTR source wrapper into buildSource

Pass the top-level Config to buildSource so it can read IsPTRSupported()
and the CreatePTR / RFC2136CreatePTR flags. When PTR is in
managed-record-types, the PTR source wrapper is installed in the
wrapper chain with the combined create-ptr default.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* chore(pdns): remove stale comment and fix whitespace

Remove an outdated comment about a single-target-per-tuple assumption
that no longer applies.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* docs: add PTR records documentation and update existing guides

Add docs/advanced/ptr-records.md covering the --create-ptr flag,
per-resource annotation overrides, prerequisites, and usage examples.

Update:
- annotations.md: document record-type annotation
- flags.md: add --create-ptr, mark --rfc2136-create-ptr as deprecated
- tutorials/rfc2136.md: point to generic --create-ptr flag
- contributing/source-wrappers.md: add PTR wrapper to the chain
- mkdocs.yml: add PTR Records navigation entry

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* feat(rfc2136)!: remove rfc2136-create-ptr in favor of create-ptr

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

---------

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2026-03-30 13:36:16 +05:30
Ivan Ka
f1d771815f
feat(client): add --kube-api-qps and --kube-api-burst flags for Kubernetes client rate limiting (#6322)
* feat(client): add --kube-api-qps and --kube-api-burst flags for Kubernetes client rate limiting

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(client): add --kube-api-qps and --kube-api-burst flags for Kubernetes client rate limiting

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(client): add --kube-api-qps and --kube-api-burst flags for Kubernetes client rate limiting

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(client): add --kube-api-qps and --kube-api-burst flags for Kubernetes client rate limiting

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(client): add --kube-api-qps and --kube-api-burst flags for Kubernetes client rate limiting

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(client): add --kube-api-qps and --kube-api-burst flags for Kubernetes client rate limiting

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(client): add --kube-api-qps and --kube-api-burst flags for Kubernetes client rate limiting

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-03-30 02:40:12 +05:30
Ivan Ka
ea4d2d1681
refactor(source/crd): migrate CRD source to controller-runtime cache (#6312)
* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source/crd): migrate CRD source to controller-runtime cache

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
2026-03-29 00:14:12 +05:30
Ivan Ka
d217706973
refactor(fqdn): encapsulate FQDN template logic into TemplateEngine (#6292)
* refactor(source): extract FQDN template logic into fqdn.TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source): extract FQDN template logic into fqdn.TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source): extract FQDN template logic into fqdn.TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source): extract FQDN template logic into fqdn.TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source): extract FQDN template logic into fqdn.TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source): extract FQDN template logic into fqdn.TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source): extract FQDN template logic into fqdn.TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source): extract FQDN template logic into fqdn.TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source): extract FQDN template logic into fqdn.TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source): extract FQDN template logic into fqdn.TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source): extract FQDN template logic into fqdn.TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(source): extract FQDN template logic into fqdn.TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(fqdn): encapsulate FQDN template logic into TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(fqdn): encapsulate FQDN template logic into TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* efactor(fqdn): encapsulate FQDN template logic into TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(fqdn): encapsulate FQDN template logic into TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(fqdn): encapsulate FQDN template logic into TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(fqdn): encapsulate FQDN template logic into TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(fqdn): encapsulate FQDN template logic into TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(fqdn): encapsulate FQDN template logic into TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(fqdn): encapsulate FQDN template logic into TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(fqdn): encapsulate FQDN template logic into TemplateEngine

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-03-23 19:40:19 +05:30
Ivan Ka
e1aee5dc00
refactor(wrappers): introduce wrapper.Build as single entry point for source pipeline (#6300)
* refactor(wrappers): introduce BuildWrappedSource as single entry point for source pipeline

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(wrappers): introduce BuildWrappedSource as single entry point for source pipeline

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(wrappers): introduce BuildWrappedSource as single entry point for source pipeline

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(wrappers): introduce wrapper.Build as single entry point for source pipeline

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-03-22 15:58:13 +05:30
Ivan Ka
7c909a015c
chore(source): standardize source fields with sources.Config (#6073)
* chore(source): standardize sources with config

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): standardize sources with config

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): standardize sources with config

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): standardize sources with config

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): standardize sources with config

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): standardize sources with config

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): standardize sources with config

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): standardize sources with config

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): standardize sources with config

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): standardize sources with config

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): standardize sources with config

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-03-16 14:41:40 +05:30
Ivan Ka
45b4aa2d83
fix(source): filter provider-specific properties to configured provider (#6220)
* fix(source): filter provider-specific properties to configured provider

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(source): filter provider-specific properties to configured provider

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(source): filter provider-specific properties to configured provider

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(source): filter provider-specific properties to configured provider

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(source): filter provider-specific properties to configured provider

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(source): filter provider-specific properties to configured provider

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(source): filter provider-specific properties to configured provider

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(source): filter provider-specific properties to configured provider

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(source): filter provider-specific properties to configured provider

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* Apply suggestions from code review

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* fix(source): filter provider-specific properties to configured provider

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
2026-03-16 00:01:36 +05:30
Ivan Ka
c35ed0b82a
feat(source): add unstructured source (#6172)
* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* feat(source): add unstructured source

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* Update docs/sources/unstructured.md

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source): add unstructured source

* feat(source): add unstructured source

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
2026-03-12 05:23:33 +05:30
Vyacheslav Klimov
f4c758665b
feat(pdns): add --[no-]prefer-alias flag and alias annotation support (#6129)
* feat: add support for expand alias in pdns provider

* feat: codereview

* feat: rewrite docs

* feat: gofmt

* feat: rewrite using postprocessor

* feat: gofmt

* feat: update docs

* fix: prefer-alias respects existing annotations

* feat: update formatting verbs

* fix: fix return values and call sites after convertRRSetToEndpoints signature change

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: remove unused error return from convertRRSetToEndpoints

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 17:38:27 +05:30
Ivan Ka
1751267905
chore(store): Added RESTConfig() to ClientGenerator (#6177)
* chore(store): Added RESTConfig() to ClientGenerator

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(store): Added RESTConfig() to ClientGenerator

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-02-21 14:55:45 +05:30
Ivan Ka
b304dfe37d
chore(linter): unused params and functions linter (#6142)
* chore(linter): enable unused

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
2026-01-31 23:20:24 +05:30
Ivan Ka
8e89808f2c
refactor(kubeclient): consolidate duplicate code (#6076)
* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
2026-01-29 02:15:48 +05:30
Ivan Ka
56fb17abc7
refactor(controller): controller no longer responsible for SingletonClientGenerator creation (#6077)
* refactore(controller): abstract things that should not be in controller

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(controller): abstract things that should not be in controller

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(controller): abstract things that should not be in controller

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(controller): abstract things that should not be in controller

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(controller): abstract things that should not be in controller

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(controller): abstract things that should not be in controller

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(controller): abstract things that should not be in controller

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-01-11 01:29:56 +05:30
Ivan Ka
d2fb11a3fc
chore(source)!: remove cloudfoundry support (#6074)
* chore(source): remove cloudfoundry support

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): remove cloudfoundry support

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): remove cloudfoundry support

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): remove cloudfoundry support

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): remove cloudfoundry support

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): remove cloudfoundry support

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): remove cloudfoundry support

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): remove cloudfoundry support

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-01-07 13:19:41 +05:30
Ivan Ka
2bdb8df7e2
refactor(source): handle context in similar way (#6049)
* chore(source): sources to handle context in similar way

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): sources to handle context in similar way

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(source): sources to handle context in similar way

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-12-30 16:28:34 +05:30
Ivan Ka
690259f3a9
feat(service): ignore unschedulable (#6002)
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-12-14 06:29:43 -08:00
Quan Hoang
62f4d7d5f8
feat: add support for ingress backed GlooEdge Gateway (#5909) 2025-11-16 10:33:38 -08:00
Pascal Bourdier
699e994a9c
ci(linter): add go-critic (#5875)
* ci: add go-critic linter

follow go-critic advices when possible

* docs: add a short description about go-critic
2025-10-01 09:06:19 -07:00
Ivan Ka
1d6b2cde18
chore(source): use types instead of strings (#5699)
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-08-01 00:03:15 -07:00
Ivan Ka
48760e653b
fix(instrumented_http): migrate to own http instrumenter (#5650)
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-07-18 10:16:25 -07:00
Ivan Ka
4fd5596601
feat(source/pods): support for annotation and label filter (#5583)
* feat(source): pods added support for annotation filter and label selectors

* feat(source/pods): support for annotation and label filter

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-07-03 09:15:34 -07:00
Michel Loiseleur
8cc73bd1e4
feat(traefik)!: disable legacy listeners on traefik.containo.us API Group (#5565)
* feat(traefik)!: disable legacy listeners on traefik.containo.us API Group

* update docs accordingly

* update test accordingly

* type argument is infered

* fix rebase
2025-07-03 09:15:27 -07:00
Andrew Hay
e467e60335
chore(store*): add reduce complexity and improve code coverage (#5568)
* chore(store*): add reduce complexity and improve code coverage

* docs(store.go): reasoning for helper function

* style(store): standardized order of args

* chore: gofmt auto-format source/store.go for lint compliance
2025-06-29 13:58:30 -07:00
Alen Zubic
28f9e9c06e
feat(source)!: introduce optional force-default-targets (#5316)
* BREAKING CHANGE: Improve default targets management

* fix: Remove old test case

* fix: Test confirming legacy mode allows empty CRD targets

* fix: Remove comments

* fix: Move flag definition closer to detault-targets

* fix: Initial merge adaptation

* fix: Improved legacy needs a chance to work with empty CRD list

* fix: Code coverage and dead code

* fix: Simpler Endpoints logic

* fix: Flag description

* feat: Add tutorial

* fix: Improve linting

* fix: Improve linting

* fix: Import linting
2025-06-17 23:48:51 -07:00
Ivan Ka
0aababa741
feat(source/node): fqdn support combineFQDNAnnotation (#5526)
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-06-15 15:36:59 -07:00
Ivan Ka
7792986483
feat(source/pod): add support for fqdn templating (#5512)
* feat(source/pod): add support for fqdn templating

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source/pod): add support for fqdn templating

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source/pod): add support for fqdn templating

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source/pod): add support for fqdn templating

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* feat(source/pod): add support for fqdn templating

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source/pod): add support for fqdn templating

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source/pod): add support for fqdn templating

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(source/pod): add support for fqdn templating

Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
2025-06-13 06:14:58 -07:00
Kevin Valk
e379fe172e
refactor: handle internal IPv6 addresses consistently with --expose-internal-ipv6 flag throughout all sources 2025-05-14 17:15:47 +02:00
Ivan Ka
ba64e8bb01
chore(deps): code cleanup, do not use pkg/errors (#5335)
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-04-29 01:17:57 -07:00
Markus
c0a9eed521
feat(source): optional exclusion of unschedulable nodes (#5045)
* feat(source/node): Make exclusion of unschedulable Nodes configurable

This fixes a behavioral regression introduced in #4761, where
nodes that were previously added to DNS are removed when they are considered
unschedulable, for example due to automated maintenance tasks.

This change will introduce a new flag called `exclude-unschedulable`, which
defaults to `true` in order to keep in line with the current behavior.
However, it would also be reasonable to restore the initial behavior before

* Allow testing for expected log entries in testNodeSourceEndpoints

This commit adds the required logic to be able to test for
the existence (and absence) of certain log messages
in testNodeSourceEndpoints. As an example, this is implemented
for the tests around excludeUnschedulable.

A side effect of using LogsToBuffer is that tests can't run in
parallel due to the log buffer being shared across all
parallel test cases. As such, these specific tests are now executed
one after another.

* Ensure logging is only hooked for tests that require it

* Document new exclude-unschedulable flag for nodes source
2025-04-07 07:34:40 -07:00
Ivan Ka
65d534e4a1
chore(code-cleanup): move logic away from main.go add tests (#5222)
* feat(code cleanup): remove from main.go

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(code-cleanup): move logic from main.go add tests

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(code-cleanup): move logic from main.go add tests

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(code-cleanup): move logic from main.go add tests

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(code-cleanup): move logic from main.go add tests

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(code-cleanup): move logic away from main.go add tests

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(code-cleanup): move logic away from main.go add tests

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(code-cleanup): move logic away from main.go add tests

Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>

* chore(code-cleanup): move logic away from main.go add tests

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(code-cleanup): move logic away from main.go add tests

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
2025-03-31 15:58:43 -07:00
hjoshi123
87e3c4bc9c
feat: added expose internal ipv6 flag 2025-03-17 08:37:06 -06:00
Steven Kreitzer
724b86b8b8
feat(source): fitler by gateway name (#5160)
* feat: filter by gateway name

Signed-off-by: Steven Kreitzer <skre@skre.me>

* address comments

* address comments

* address comments

---------

Signed-off-by: Steven Kreitzer <skre@skre.me>
2025-03-12 01:51:47 -07:00
Dan Markhasin
87464189b3 Enable reconcile on endpoint events 2025-02-02 23:42:50 +02:00
Kubernetes Prow Robot
a61780280d
Merge pull request #4782 from foyerunix/reverse-for-all-pods
feat(source): allow to register all pods and their associated PTR record
2025-01-28 07:51:24 -08:00
foyerunix
bf8c4c0ba6 Allow to register all pods and their associated PTR record
Add two new options:
- --ignore-non-host-network-pods
- --pod-source-domain

Combined toghether, they can be used to register the IPs
of all pods with their associated PTR record.

Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
2025-01-14 07:23:38 +00:00
Vivian Ta
2ea4a15075 feat: Add F5 TransportServer source 2024-11-28 22:51:18 -08:00
Kyle
38178940a3
feat: add annotation and label filters to Ambassador Host Source (#2633)
* Add annotation filter to Ambassador Host Source

This change makes the Ambassador Host source respect the External-DNS annotationFilter allowing for an Ambassador Host resource to specify what External-DNS deployment to use when there are multiple External-DNS deployments within the same cluster. Before this change if you had two External-DNS deployments within the cluster and used the Ambassador Host source the first External-DNS to process the resource will create the record and not the one that was specified in the filter annotation.

I added the `filterByAnnotations` function so that it matched the same way the other sources have implemented annotation filtering. I didn't add the controller check only because I wanted to keep this change to implementing the annotationFilter.

Example: Create two External-DNS deployments 1 public and 1 private and set the Ambassador Host to use the public External-DNS using the annotation filter.

```
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: external-dns-private
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: external-dns-private
  template:
    metadata:
      labels:
        app: external-dns-private
      annotations:
        iam.amazonaws.com/role: {ARN} # AWS ARN role
    spec:
      serviceAccountName: external-dns
      containers:
      - name: external-dns
        image: k8s.gcr.io/external-dns/external-dns:latest
        args:
        - --source=ambassador-host
        - --domain-filter=example.net # will make ExternalDNS see only the hosted zones matching provided domain, omit to process all available hosted zones
        - --provider=aws
        - --policy=upsert-only # would prevent ExternalDNS from deleting any records, omit to enable full synchronization
        - --aws-zone-type=private # only look at public hosted zones (valid values are public, private or no value for both)
        - --registry=txt
        - --txt-owner-id= {Hosted Zone ID} # Insert Route53 Hosted Zone ID here
        - --annotation-filter=kubernetes.io/ingress.class in (private)
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: external-dns-public
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: external-dns-public
  template:
    metadata:
      labels:
        app: external-dns-public
      annotations:
        iam.amazonaws.com/role: {ARN} # AWS ARN role
    spec:
      serviceAccountName: external-dns
      containers:
      - name: external-dns
        image: k8s.gcr.io/external-dns/external-dns:latest
        args:
        - --source=ambassador-host
        - --domain-filter=example.net # will make ExternalDNS see only the hosted zones matching provided domain, omit to process all available hosted zones
        - --provider=aws
        - --policy=upsert-only # would prevent ExternalDNS from deleting any records, omit to enable full synchronization
        - --aws-zone-type= # only look at public hosted zones (valid values are public, private or no value for both)
        - --registry=txt
        - --txt-owner-id= {Hosted Zone ID} # Insert Route53 Hosted Zone ID here
        - --annotation-filter=kubernetes.io/ingress.class in (public)
---
apiVersion: getambassador.io/v3alpha1
  kind: Host
  metadata:
    name: your-hostname
    annotations:
      external-dns.ambassador-service: emissary-ingress/emissary
      kubernetes.io/ingress.class: public
  spec:
		acmeProvider:
      authority: none
		hostname: your-hostname.example.com
```

Fixes kubernetes-sigs/external-dns#2632

* Add Label filltering for Ambassador Host source

Currently the `--label-filter` flag can only be used to filter CRDs, Ingress, Service and Openshift Route objects which match the label selector passed through that flag. This change extends the functionality to the Ambassador Host type object.

When the flag is not specified the default value is `labels.Everything()` which is an empty string, the same as before. An annotation based filter is inefficient because the filtering has to be done in the controller instead of the API server like with label filtering. The Annotation based filtering has been left in for legacy reasons so the Ambassador Host source can be used inconjunction with the other sources that don't yet support label filltering.

It is possible to use label based filltering with annotation based filltering so you can initially filter by label then filter the returned hosts by annotation. This is not recomended

* Update Ambassador Host source docs

Add that the Ambassador Host source now supports both annotation and label filltering.
2024-08-28 18:02:57 +01:00
Kristopher Kirkland
9015377c12 Add flags to disable each of the Traefik API groups 2023-11-29 12:14:59 -06:00
John Gardiner Myers
76a2ea17aa Make --ignore-hostname-annotation flag more consistent 2023-10-02 23:51:43 -07:00
John Gardiner Myers
75639b759c Support --label-filter for node source 2023-09-20 08:56:26 -07:00
Megum1n
70a43a4231
Merge branch 'master' into gloo-multiple-namespaces 2023-07-08 22:49:13 +02:00
John Gardiner Myers
4a40346d42 Remove flags and documentation for removed contour-ingressroute source 2023-07-04 16:37:37 -07:00
Megum1n
41d3de5364
Merge branch 'master' into gloo-multiple-namespaces 2023-06-24 02:11:35 +02:00
Thomas Kosiewski
95abe994c4
Merge remote-tracking branch 'kubernetes-sigs/master' 2023-06-01 18:49:38 +02:00
Megum1n
028656d649
Change variable type and description 2023-05-08 12:08:00 +02:00
Arnaud Lefray
56773c0430
chore: merge with master 2023-05-04 15:23:10 +02:00
Charles Xu
1d232c4b86 feat: resolve LB-type Service hostname to create A/AAAA instead of CNAME 2023-04-18 21:10:56 -07:00
Kubernetes Prow Robot
e6ec8ea329
Merge pull request #2220 from ericrrath/crd-source-event-handler
CRD source: add event-handler support
2023-04-13 23:20:39 -07:00
megum1n
ac605fa4ce
Rename gloo-namespace flag back to singular word 2023-04-13 23:00:26 +02:00