126 Commits

Author SHA1 Message Date
Seweryn Chlewicki
0f14da0f15
Handle old format 2023-06-26 15:20:35 +01:00
Seweryn Chlewicki
013f8cf9e9
Fix TXT registry handling of NewTXT domains 2023-06-23 12:14:20 +01:00
John Gardiner Myers
43eea7fa9b Refactor Provider to require DomainFilter 2023-06-19 20:25:59 -07:00
John Gardiner Myers
bb4e7478b7 Address review comments 2023-06-18 16:50:02 -07:00
John Gardiner Myers
5aae0af68a Add DynamoDB registry implementation 2023-06-18 16:49:58 -07:00
John Gardiner Myers
b902453493 Simplify implementation of inmemory provider 2023-06-18 16:47:37 -07:00
Matias Charriere
65e480df0e
remove hardcoded check in registry/txt
Signed-off-by: Matias Charriere <matias@giantswarm.io>
2023-06-18 13:58:16 +02:00
Matias Charriere
44b5761330
reimplement ForceUpdate using ProviderSpecific properties
Signed-off-by: Matias Charriere <matias@giantswarm.io>
2023-06-15 11:50:05 +02:00
Matias Charriere
a0e291b46b
update registry tests to match new strategy
Signed-off-by: Matias Charriere <matias@giantswarm.io>
2023-06-15 11:50:05 +02:00
Matias Charriere
1bd3834743
handle missing TXT records with a forcedUpdate strategy
This change tries to remove part of the logic added in 50f196c0db280de7a9b55a8f7fd6b0a607ac5472.
The forceUpdate strategy relies on existing code of the planner to migrate TXT records to the new format,
being the main goal to avoid conflicts during apply.

Signed-off-by: Matias Charriere <matias@giantswarm.io>
2023-06-15 11:50:04 +02:00
Viacheslav Sychov
2554f9f879 #1828: Support encrypted DNS txt records
Signed-off-by: Viacheslav Sychov <viacheslav.sychov@gmail.com>
2023-04-28 20:29:54 +02:00
John Gardiner Myers
781ee3d71f Address review comments 2023-04-12 22:46:39 -07:00
John Gardiner Myers
98532480b0 Support dual-stack domains in TXT registry 2023-03-30 17:49:31 -07:00
Alfred Krohmer
7dd84a589d Route53: retry single changes in a batch if the batch fails
If a single change fails during the retry, it will be added to a queue.
In the next iteration, changes from this queue will be submitted after
all other changes.

When submitting single changes, they are always submitted as batches of
changes with the same DNS name and ownership relation to avoid
inconsistency between the record created and the TXT records.
2023-01-16 16:03:16 +01:00
Ricardo Katz
708de4f98d Fix null pointer on generateTxtRecord 2023-01-06 14:03:17 -03:00
Kubernetes Prow Robot
644b880897
Merge pull request #3017 from olemarkus/ignore-invalid-endpoint
Don't create endpoint if attempting to create one with invalid dns name
2022-10-06 12:37:53 -07:00
Andy Bursavich
74ffff6c26 gofumpt 2022-09-20 20:48:57 -07: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
Andrey Lebedev
50f196c0db Handle the migration to the new TXT format: create missing records 2022-07-13 21:49:27 +02:00
Dinar Valeev
25c7cb28ea
Add additional txt record with record type marker
In order to track multiple record types with the same name, lets migrate
to new format, were record name contains record type in it.

Signed-off-by: Dinar Valeev <dinar.valeev@absa.africa>
2022-04-14 16:39:36 +02:00
Kubernetes Prow Robot
67fad71451
Merge pull request #2095 from voro015/registry_aws-sd-map-fix
Fixed AWSSDRegistry nil labels map
2021-06-30 01:25:03 -07:00
Artem Voronin
0b370ac6ba Fixed registry aws-sd nil labels 2021-05-20 15:12:42 +03:00
Thibault Jamet
17fb8813d0
Reduce AWS Route53 API calls
Currently, planning instructs to create all records even
those which does not match any zone.
Later, those records will be checked towards the existing
records and filtered whether they match or not a hosted zone.

This causes a problem, at least in the specific case of the Route53
implementation as it always calls the ApplyChanges method, which in its
turn always retrieves all records in all zones.

This causes high pressure on Route53 APIs, for non-necessary actions.

By being able to filter all unmanaged records from the plan, we can
prevent from calling ApplyChanges when nothing has to be done and hence
prevent an unnecessary listing of records.

By doing so, the rate of API calls to AWS Route53 is expected to be
reduced by 2
2021-04-25 18:10:36 +02:00
Raffaele Di Fazio
daeee26684
Add flag to opt in for NS records management (#1915)
* adds flag to opt in for NS records management

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* go fmt

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* goimports

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* fix more tests

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* go fmt again

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* fix test

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* more tests

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* make ordering of managed records consistent

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* fix flag

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
2021-01-12 06:32:26 -08:00
Raffaele Di Fazio
f5aa1c4c37
Add new method to provider interface to implement provider specific changes (#1868)
* adds tests for shouldUpdateProviderSpecific

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* move AWS health to where it belongs

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* add test that breaks things

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* adds adjustendpoints method

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* fix controller

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* actually pass the provider where needed

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* OMG goland do your go fmt thing

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* use registry as proxy

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* make linter happy

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* change AdjustEndpoints signature

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* fix typo

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* actually use adjusted endpoints

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* revert cloudflare change

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* Update provider/cloudflare/cloudflare.go

Co-authored-by: Nick Jüttner <nick@juni.io>

Co-authored-by: Nick Jüttner <nick@juni.io>
2020-12-09 23:40:54 -08:00
dan.simone@oracle.com
07c8175f66 Call strings.ToLower() on wildcardReplacement 2020-09-25 15:32:57 -07:00
dan.simone@oracle.com
e3bac0fb55 Merge remote-tracking branch 'origing/master' into dansimone/support-wildcard-records
# Conflicts:
#	registry/txt.go
#	registry/txt_test.go
2020-09-01 11:24:44 -07:00
Chema Sanchez
73be02b155 Fix index out of range when hostname has no dots 2020-08-27 09:28:12 +02:00
dan.simone@oracle.com
9024b2ef81 Clarify wildcard parameter 2020-07-29 13:16:03 -07:00
dan.simone@oracle.com
b01daf5927 Support wildcard records - Optional ability to replace the asterisk in generated registry TXT records with another string 2020-07-29 12:01:33 -07:00
Kubernetes Prow Robot
25d71ea45a
Merge pull request #1536 from sheerun/property-comparator
Allow for custom property comparators
2020-06-01 03:07:55 -07:00
Johannes Grumböck
6cb94432ca Use strings instead of regex for splitting 2020-05-18 07:15:49 +00:00
Johannes Grumböck
03db178dc7
Fix tests 2020-05-12 23:10:14 +02:00
Adam Stankiewicz
f008e894df Allow for custom property comparators
Fixes issue #1463

Co-authored-by: Alastair Houghton <alastair@alastairs-place.net>
2020-05-12 16:27:46 +02:00
Johannes Grumböck
d2ee19505b Removed commented testfunction 2020-05-12 13:35:59 +00:00
Johannes Grumböck
72d49c125c remediate lint staticcheck error 2020-05-12 13:35:59 +00:00
Johannes Grumböck
aab98ab4cd remediation of gofmt and gosimple linting errors 2020-05-12 13:35:59 +00:00
Johannes Grumböck
c80909f0e7 Added txt-suffix feature (rebased) 2020-05-12 13:35:40 +00:00
Raffaele Di Fazio
82539e35a3 makes tests pass
Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
2020-05-08 13:54:13 +02:00
tariqibrahim
672b00d821 add ctx parameter to provider interface and aws API 2020-01-12 13:16:55 -08:00
Tariq Ibrahim
41ba7f1ff5
rename project root package to sigs.k8s.io 2020-01-06 08:08:35 -08:00
Nick Jüttner
9418e3acd8
Merge pull request #1008 from devkid/feature/aws-routing-policies
[RFC] Add support for all AWS Route53 routing policies; add additional Setldentifier abstraction layer
2019-11-19 11:21:12 +01:00
Nick Jüttner
f763d2a413 Move into kubernetes-sigs organization (#1245)
* Move into kubernetes-sigs organization

* Disable labeler action for forks
2019-11-01 17:10:19 +01:00
Alfred Krohmer
b2a3e88303 Fixes and cleanup 2019-09-10 20:47:36 +02:00
Alfred Krohmer
6681a3a358 Add support for all AWS Route53 routing policies; add additional SetIdentifier abstraction layer
This adds support for all AWS Route53 routing policies, namely:
* simple (default)
* weighted
* latency
* failover
* geolocation
* multi value answer

These routing policies allow to create multiple records with the same
name, but different "SetIdentifiers". Therefor, as a prerequisite for
implementing support for above routing policies, there is a new
"abstraction layer" added that handles this SetIdentifier by adding a
new attribute in the Endpoint struct and adding another level in the
plan table.
2019-09-10 20:47:36 +02:00
Nick Jüttner
b685c73840
Update txt_test.go 2019-09-10 12:23:30 +02:00
Nick Jüttner
816929adbb
Update txt_test.go 2019-09-10 12:23:05 +02:00
Nick Jüttner
b2c5ad0210
Merge branch 'master' into fix-prefix-to-lower 2019-09-10 12:09:27 +02:00
Olaf Klischat
a348bd7a85 TXTRegistry: do not overwrite labels of records returned by the provider 2019-08-19 01:35:55 +02:00
Martin Linkhorst
40edf9cfcb fix: add test case for in-use upper-case txt prefixes 2019-07-31 12:26:55 +02:00