78 Commits

Author SHA1 Message Date
Ivan Ka
f5c0abbe77
chore(controller-gen): move tools under go tools (#5878)
* chore(controller-gen): move tools under go tools

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

* chore(controller-gen): move tools under go tools

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

* chore(controller-gen): move tools under go tools

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

* chore(controller-gen): move tools under go tools

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

* chore(controller-gen): move tools under go tools

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

* chore(controller-gen): move tools under go tools

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

* chore(controller-gen): move tools under go tools

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

* chore(controller-gen): move tools under go tools

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

* chore(controller-gen): move tools under go tools

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

* chore(controller-gen): move tools under go tools

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

* chore(controller-gen): move tools under go tools

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

* chore(controller-gen): move tools under go tools

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

* chore(controller-gen): move tools under go tools

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

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-10-10 00:57:02 -07: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
hayden
ef621078c2
fix(endpoint/source) Allow '.' in TXT Records (#5844)
* [endpoint] [source] Allow '.' in TXT Records

Signed-off-by: hfuss <hayden.fuss@kaleido.io>

* pr feedback; lint fix

Signed-off-by: hfuss <hayden.fuss@kaleido.io>

* using functional interfaces for future cleaners and validators of other record types

Signed-off-by: hfuss <hayden.fuss@kaleido.io>

* Revert "using functional interfaces for future cleaners and validators of other record types"

This reverts commit d9e1c2c3810a40b2cce22f53d8ac86ba64b488e6.

---------

Signed-off-by: hfuss <hayden.fuss@kaleido.io>
2025-09-21 02:18:20 -07:00
Ivan Ka
7792e78eba
feat(source): add min-ttl support (#5641)
* feat(source/min-ttl): added min-ttl support

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

* feat(source/min-ttl): added min-ttl support

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

* feat(source/min-ttl): added min-ttl support

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

* feat(source/min-ttl): added min-ttl support

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

* feat(source/min-ttl): added min-ttl support

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

* feat(source/min-ttl): added min-ttl support

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

* feat(source/min-ttl): added min-ttl support

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

* feat(source/min-ttl): added min-ttl support

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

* feat(source/min-ttl): added min-ttl support

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

* feat(source/min-ttl): added min-ttl support

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

* feat(source/min-ttl): added min-ttl support

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

* feat(source/min-ttl): added min-ttl support

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

* feat(source): add min-ttl support

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

* feat(source): add min-ttl support

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

* feat(source/min-ttl): added min-ttl support

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

* feat(source): add min-ttl support

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-09-10 02:28:00 -07:00
Pascal Bachor
90ed615ad5
fix(endpoint): debug message when owner label is missing (#5788)
* fix: debug message of FilterEndpointsByOwnerID in case owner label is missing

* more consistent messages

* add unit test for changed debug message

---------

Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
2025-09-10 00:22:03 -07:00
Ivan Ka
4de8bd6fde
fix(endpoint): deduplicate targets (#5805)
* fix(deduplicate): deduplicate targets

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

* fix(deduplicate): deduplicate targets

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

* fix(deduplicate): deduplicate targets

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

* fix(deduplicate): deduplicate targets

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

* fix(deduplicate): deduplicate targets

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

* fix(deduplicate): deduplicate targets

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

* fix(deduplicate): deduplicate targets

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

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-09-08 05:01:31 -07:00
Pascal Bachor
eafce22825
fix: typo (#5787)
Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
2025-09-02 00:15:15 -07:00
Ivan Ka
e9983a5726
feat(events): raise k8s events with fake provider (#5659)
* feat(events): publish k8s events

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

* feat(events): publish k8s events

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

* feat(events): publish k8s events

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

* feat(events): publish k8s events

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

* feat(events): publish k8s events

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

* feat(events): raise k8s events with fake provider

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

* feat(events): raise k8s events with fake provider

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

* feat(events): raise k8s events with fake provider

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

* feat(events): raise k8s events with fake provider

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

* feat(events): raise k8s events with fake provider

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

* feat(events): raise k8s events with fake provider

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

* feat(events): raise k8s events with fake provide

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

* feat(events): raise k8s events with fake provider

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

* feat(events): raise k8s events with fake provider

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-08-20 00:37:07 -07:00
Ivan Ka
9045e45bc3
fix(source/service): make sure only unique targets pushed to registry (#5614)
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-07-07 23:05:27 -07:00
Arthur Le Roux
e17b5ed07b
feat(cloudflare): add support for MX records (#5283)
* feat(cloudflare): add support for MX records

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* test(txt): add additional TXT and MX record test cases

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* feat(endpoint): implement parsing for MX and SRV records with structured targets

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* fix(txt): remove TXT record type from supported types in NewTXTRegistry

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* refactor(digitalocean): streamline MX record handling

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* refactor(cloudflare): improve error handling in change creation

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* fix(endpoint): return all parsed SRV targets instead of a single target

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* test(endpoint): add parsing tests for MX and SRV records

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* fix(endpoint): streamline MX and SRV record validation and parsing

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* fix(digital_ocean): simplify MX record parsing

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* fix(docs): update link to CRD source in MX record documentation

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* fix(cloudflare): improve error handling for MX record parsing

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* fix(cloudflare): improve error message formatting for MX record parsing

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* refactor(endpoint): rename ParseMXRecord to NewMXTarget and update references

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* fix(endpoint): update NewMXTarget to return pointer and adjust tests accordingly

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* refactor(cloudflare): consolidate proxyEnabled and proxyDisabled variable declarations

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* fix(endpoint): update TestNewMXTarget to reflect changes in MXTarget struct fields and add missing test case for host validation

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* fix(digitalocean): improve MX record handling by adjusting error handling and ensuring proper priority and host retrieval

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* refactor(endpoint): change MXTarget fields to unexported and update NewMXTarget to use them

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* refactor(cloudflare): update groupByNameAndTypeWithCustomHostnames to use provider methods and enhance MX record handling in tests

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* test(cloudflare): enhance test cover

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* refactor(endpoint): remove unused SRVTarget struct from endpoint.go

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* refactor(endpoint): rename NewMXTarget to NewMXRecord for clarity and update references

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>

* Update docs/sources/mx-record.md

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

---------

Signed-off-by: Arthur Le Roux <arthurleroux@protonmail.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
2025-06-23 23:32:28 -07:00
Ivan Ka
17fa4b4e7a
feat(source): support ttl annotation on pod (#5527)
* feat(source/pod): add support ttl annotation

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

* feat(source/pod): add support ttl annotation

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

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-06-19 21:50:51 -07:00
Ivan Ka
d63bfb324c
feat(controller)!: publish metrics for all supported endpoint types (#5516)
* feat(controller): add more metrics for all supported endpoint types

* feat(controller): add cardinality and labels for records metrics

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

* feat(controller): add cardinality and labels for records metrics

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

* feat(controller): add cardinality and labels for records metrics

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

* feat(controller): add cardinality and labels for records metrics

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

* feat(controller): add cardinality and labels for records metrics

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

* feat(controller): add cardinality and labels for records metrics

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

* feat(controller): add cardinality and labels for records metrics

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

* feat(controller): add cardinality and labels for records metrics

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

* fix rebase

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-06-13 02:40:58 -07:00
Ivan Ka
00fde1e510
chore(source/crd): add labels without looping over (#5492) 2025-06-03 00:02:38 -07:00
Michel Loiseleur
d0e6a9075e
chore(crd): move code to apis/v1alpha1 (#5446)
* chore(crd): move code to `api/v1alpha1`

* fix license check

* fix linter

* remove obsolete exclusion on linter
2025-05-23 08:16:37 -07:00
Michel Loiseleur
2481c07e95
chore(crd): use conventional paths and update controller-gen to v0.17.2 (#5287)
* chore(crd): update controller-gen to v0.17.2

* review: only one crd manifest

* set crd in expected paths
2025-05-04 12:53:56 -07:00
Julilla Paul
f593c08aa9
chore: refactor CheckEndpoint into helper functions 2025-02-10 11:46:55 -08:00
Julilla Paul
3b2453bc1a
chore: add debug logs and make integer parsing strict 2025-02-10 11:35:07 -08:00
Julilla Paul
10f4a26184
chore: make CheckEndpoint an Endpoint type method 2025-02-10 11:20:39 -08:00
Julilla Paul
ad9f300589
chore: move validation to endpoint 2024-11-20 13:46:57 -08:00
Morre
c0a183b006
fix: re-add api-approved.kubernetes.io annotation 2024-05-21 09:27:03 +02:00
Leonardo Quatrocchi
05ca35e228 Merge remote-tracking branch 'origin/master' into bugfix/group-endpoints-per-hosted-zone-for-aws 2024-04-22 20:36:38 -03:00
dongjiang
b5ef2fc913
Update endpoint/endpoint.go
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
2024-04-07 09:44:08 +08:00
Leonardo Quatrocchi
d9b743922a Specify and clarify root cause of issue 4241 2024-04-06 03:25:05 -03:00
Leonardo Quatrocchi
4fb2f2e283 Specific bugfix near the root cause for duplicated deletes on plan.go 2024-04-05 01:29:38 -03:00
Leonardo Quatrocchi
deba1ea445 Fix suggestions 2024-04-04 21:15:48 -03:00
leonardocaylent
3ca4d0250f
Update endpoint/endpoint.go
Co-authored-by: Eric Bailey <yurrriq@users.noreply.github.com>
2024-04-04 16:35:21 -03:00
Leonardo Quatrocchi
6066b700b8 Fix for duplicated endpoints 2024-04-04 01:24:05 -03:00
dongjiang1989
dc9e0a5816
dongjiang, fix ipv6 shortener and expander equal
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2024-03-31 19:51:28 +08:00
Leonardo Quatrocchi
2b3da1b608 Fix for duplicated endpoints and unit tests 2024-03-29 23:27:25 -03:00
Leonardo Quatrocchi
7fe2d3f069 Fix for duplicated endpoints and unit tests 2024-03-29 03:39:17 -03:00
Leonardo Quatrocchi
82046ccb15 Removing comments and clean up 2024-03-16 15:05:59 -03:00
Leonardo Quatrocchi
0ca279694a Fix Lint 2024-03-16 11:41:26 -03:00
leonardocaylent
30c9e77765
Fix lint 2024-03-16 00:00:00 -03:00
leonardocaylent
a3826d541b
Update endpoint.go with Key function 2024-03-15 22:56:02 -03:00
Leonardo Quatrocchi
294b4c673e Fix format on aws and endpoint files 2024-03-05 02:35:13 -03:00
Leonardo Quatrocchi
846f4b40fa Going back to endpoint.go 2024-03-05 02:27:20 -03:00
Joel Studler
2fdc7354c0 Add unit tests for NAPTR and invalid endpoints 2024-01-27 13:16:53 +01:00
Kyle Cronin
20bff0aae5 Remove EndpointFilterInterface 2023-08-16 23:48:30 -04:00
Kyle Cronin
7fb144d8d8 Fix planning for multi-cluster dual stack record types
When AAAA multi-target / dual stack support was
added via #2461 it broke ownership of domains across
different clusters with different ingress records types.

For example if 2 clusters manage the same zone,
1 cluster uses A records and the other uses CNAME
records, when each record type is treated as a separate
planning record, it will cause ownership to bounce back
and forth and records to be constantly created and
deleted.

This change updates the planner to keep track of multiple
current records for a domain. This allows for A and AAAA
records to exist for a domain while allowing record type
changes.

The planner will ignore desired records for a domain that
represent conflicting record types allowed by RFC 1034 3.6.2.
For example if the desired records for a domain contains
a CNAME record plus any other record type no changes for
that domain will be planned.

The planner now contains an owned record filter provided
by the registry. This allows the planner to accurately plan
create updates when there are record type changes between
the current and desired endpoints. Without this filter the
planner could add create changes for domains not owned
by the controller.
2023-08-15 19:37:50 -04:00
John Gardiner Myers
a9ae5ea43a Add SetIdentifier to EndpointKey 2023-06-18 16:47:37 -07:00
John Gardiner Myers
4417ad4894 Move EndpointKey to endpoints package 2023-06-18 16:47:37 -07:00
John Gardiner Myers
beb893df7d Address review comment 2023-06-12 21:28:18 -07:00
John Gardiner Myers
55bbb29f55 Route53 update configuration of target health checks 2023-06-09 17:11:28 -07:00
John Gardiner Myers
4b15f20e76 Simplify GetProviderSpecificProperty 2023-06-09 07:33:41 -07:00
Kubernetes Prow Robot
3346b4e53c
Merge pull request #3519 from Sewci0/feature/mx-support
Add support for MX records in Azure, GCP and AWS
2023-05-15 12:13:07 -07:00
Skyler Mäntysaari
6f42a8a2da Initial IPv6 support 2023-03-30 17:49:28 -07:00
John Gardiner Myers
94d09b37dc Separate plan by record type 2023-03-30 17:47:59 -07:00
Seweryn Chlewicki
205e8c0334
Add support for MX records in Azure, GCP and AWS 2023-03-30 20:32:32 +01:00
Ole Markus With
7dbf503fe1 Don't create endpoint if attempting to create one with invalid dns name 2022-09-10 12:31:13 +02:00
Will Hegedus
b5d01eed1a feat: add debug logging for IP addr parse errors
Log whenever a target is not able to be parsed as an IP address. This is expected
to occur fairly often (for example, with CNAME targets), but allows more visibility
into how targets are being compared.

NOTE: depending on the number and type of targets, this could be quite noisy.
2022-06-06 13:06:43 -04:00