Commit Graph

38 Commits

Author SHA1 Message Date
Markus Cisler
14d64e09f2 Change DomainFilter to apply to records as well
This moves `domain_filter.go` to the `endpoint` package to make it
possible to filter and exclude record names in
`plan.filterRecordsForPlan()` so it does not have to be implemented in
every single provider.

Because some providers access `DomainFilter.filters` directly it had to
be exported.
2020-02-24 11:19:45 +01:00
Tongyao Si
feed7d7838 fix(azure): not use SPN to authenticate when clientid or secret is 'msi'
Add unit test

Fix unit test error

Fix unit test error

Fix unit test error

Fix unit test error

Fix unit test error

Fix unit test error

Fix unit test error
2020-02-17 21:46:21 +08:00
tariqibrahim
672b00d821 add ctx parameter to provider interface and aws API 2020-01-12 13:16:55 -08:00
Tariq Ibrahim
bf4b1767fa
add more linters and improve code quality 2020-01-07 15:18:00 -08:00
Tariq Ibrahim
41ba7f1ff5
rename project root package to sigs.k8s.io 2020-01-06 08:08:35 -08:00
Tongyao Si
97acc4f339 fix: lint 2019-11-28 19:58:01 +08:00
Tongyao Si
0c4878f115 feat(Azure): support specifying user assigned identity's clientID to authenticate 2019-11-28 19:08:45 +08:00
Tim Jacomb
6414a39890 Address review comments 2019-11-03 07:49:59 +01:00
saidst
fc3ca1e1ea Attempt to optimize changes to azure_tests.go (#2) 2019-11-03 07:49:58 +01:00
Tim Jacomb
135b76dbbb Advance loop properly 2019-11-03 07:49:58 +01:00
stsaid
5a1715b582 fixed issue in iteration of recordset/zone-results from azure. 2019-11-03 07:49:55 +01:00
Tim Jacomb
4f08319438 Fix Azure tests 2019-11-03 07:49:53 +01:00
Tim Jacomb
186906e1e3 Fix iteration and mock, no infinite loop 2019-11-03 07:49:52 +01:00
stsaid
5d556868f1 Reworked azuresdk usage (#1) 2019-11-03 07:49:49 +01:00
Tim Jacomb
bb9edf7993 Use mocks properly 2019-11-03 07:49:46 +01:00
Tim Jacomb
f170849b42 It compiles! 2019-11-03 07:49:44 +01:00
Tim Jacomb
aafe52b7d6 WIP Upgrade client-go + azure sdk 2019-11-03 07:49:29 +01:00
Tim Jacomb
7be10ecbff WIP 2019-11-03 07:48:43 +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
Michael Fraenkel
fab942f486 Cache the endpoints on the controller loop
The controller will retrieve all the endpoints at the beginning of its
loop. When changes need to be applied, the provider may need to query
the endpoints again. Allow the provider to skip the queries if its data was
cached.
2019-05-07 19:51:53 -04:00
Michael FIG
90407b3927 Azure: Support multiple A targets. 2019-04-17 10:47:43 -06:00
Roman Sokolkov
9f668a5de7
Move token code to separate function and add test 2018-06-01 10:13:28 +02:00
Roman Sokolkov
b2a5ed229d
Add Azure MSI support 2018-05-31 14:57:58 +02:00
Gary Kramlich
4d532e25e7 Merge branch 'master' into issue-239-multiple-targets 2018-04-12 12:15:39 -05:00
Gary Kramlich
1cef71e0be Inititial support for multiple targets per record 2018-03-13 23:16:51 -05:00
Christoph Brand
fe0e424d33 Add Foreign Cloud support to Azure Provider (#485) 2018-03-07 19:28:21 +01:00
Till Klocke
5d54849699 Implementation of multiple targets based on PR #404 and #396 (#418)
* Endpoint.Target is now Endpoint.Targets. This is its own type representing mutliple targets for a single DNS name while adding some convenience for sorting and comparing

* Made everything compile and tests run through with the new Endpoint.Targets

* The ingress source can now properly handle multiple target ips per host

* Added custom conflict resolver, to better understand how conflict resolution has to work for me

* My custom conflict resolver behaves a bit different than the PerResource resolver, therefore I needed to modify the expected test result

Removed unnecessary FIXME

* The ingress source now creates CNAME endpoints with multiple targets to let the DNS provider decide how to handle multiple CNAME targets. This could be interesting for weighted targets etc.

* Adopted the expected results to the new way we create endpoints for CNAMEs

* Removed Add method from Targets since manipulating the slice through here is unnecessary complicated and doesn't deliver enough convenience

* Reverted ConflictResolver to the original one. There is some discussing to do what the best way is to handle conflicts

* Added missing documenting comment to IsLess of Targets

* Added documenting comments to Targets,Targets.Same and NewTargets to clarify their intention and usage

* Service source now also generates endpoints with multiple targets

* Service and Ingress source now sort all Targets for every Endpoint to make order of Targets predictable

* Endpoints generated by the Google Cloud DNS provider now also have sorted Targets to make order of Targets predictable

* Modified provider dyn to be able to compile with multi target changes

* Fixed small nitpicks, so my code is acceptable

* Fixed merge method after updating to new Targets. Replacing '!=' with .Same of course needs a boolean negation

* Tests for dyn provider now also use the new Targets instead of Target

* Simplified extractServiceIps as implied by linki to make it more readable

* ref: change service ClusterIP retrieval again

* Added entry to CHANGELOG.md describing the new features contained in this PR
2018-02-21 18:11:45 +01:00
Filip Ström
f32f0777e8 Added TTL check when retrieving endpoints. Updated tests to include TTL checks. 2018-01-10 15:49:36 +01:00
Filip Ström
3f564f14ad Added TTL annotation check for azure records. 2018-01-08 13:50:37 +01:00
Valentyn Boginskey
4dacf81238 New filter: --zone-id-filter (#422)
* Add aws-zone-id flag

* Add Zone ID filter

* Update AWS provider and main

* Make ZoneIDFilter generic

* Implement ZoneIDFilter for all providers

* Update CHANGELOG
2017-12-20 17:00:13 +01:00
Kevin J. Qiu
71723bdd5b Allow specifying a custom TTL through annotation on Ingress or Service (#320)
* Add RecordTTL

* Route53: test for custom TTL

* Fix tests

* Fix remaining tests

* Add ttl when endpoint is created from ingress

* Missed a word

* Fix bad refactoring

* Add ingress custom TTL test

* gofmt

* Satisfy go-lint

* Unshadow `endpoint` in azure provider

* Fix and add an output test

* Add TTL for endpoints generated from service templates

* Take TTL into account when generating update plan

* Tests for TTL change impact on the plan

* Refactor factory method name

* Refactoring

* Run gofmt

* Make endpoint string format look like BIND config

* Update plan and plan_test

* Replace NewEndpointWithTTLValue with NewEndpointWithTTL in aws

* Remove NewEndpointWithTTLValue func

* Update references to TTL

* Remove getTTLValue func

* Handle merge conflict

* Update tests

* Update README, CHANGELOG and documentation

* Run gofmt

* Move getTTLFromAnnotations to a common file

* Refactor getTTLFromAnnotations

* Gofmt

* Add tests for getTTLFromAnnotations

* Trigger build

* Add boilerplate header

* Update README/CHANGELOG according to code review

* Add ttl.md and link it from README

* change CNAME string to endpoint.RecordTypeCNAME

* fix test cases with AWS ALIAS records, these do not behave different in these tests
2017-10-11 14:17:02 +02:00
Nick Jüttner
f5639c4cb7 #228 Simplify DNS provider requirements by extracting common (#263)
* #228 Simplify DNS provider requirements by extracting common

* #228 Simplify DNS provider requirements by extracting common

* Missing boilerplate added

* rename recordtypefilter, fail fast statements

* rework zone finder, update deps

* chore: drop namespace from cloudflare method name
2017-10-11 12:16:28 +02:00
Martin Linkhorst
3331a57a18 Fix issue with uppercase logrus import (#351)
* chore: use lowercase for logrus repository

* chore: update dependencies using glide
2017-10-09 17:14:18 +02:00
Seth Pollack
f14a953b5f Kops Compatibility #1: Set RecordType at source (#248)
* set RecordType at source

* add comments for linting
2017-08-25 14:41:40 +02:00
Martin Linkhorst
407dba8340
chore: correct some spelling mistakes 2017-08-11 17:16:33 +02:00
Nils Juenemann
73d397961e Support for multiple domains within --domain-filter (#252)
* Support for multiple domains within --domain-filter

The parameter accepts a comma separated list of domains with or without trailing dot. Example: --domain-filter="example.org, company.test.,staging.com". Closes #247 and #229

* Add boilerplate header

* Add documentation for methods and structs

* use StringsVar for the domain-filter flag

* go fmt

* Remove camel case from tests

* Revert changes in README.md

* Move DomainFilter to provider package

* Make a new slice and copy elements to it

* Update CHANGELOG.md

* docs: change minor spelling mistake
2017-06-29 18:59:05 +02:00
Yerken
229944f7ab make all provider implementation public, return struct instead of interface (#234) 2017-06-13 10:32:13 +02:00
Peter Huene
3355528c16 Implement Azure DNS provider (#210) (#214)
* vendor Azure Go SDK (#210)

* vendor the Azure Go SDK and dependencies

* add initial Azure DNS provider implementation (#210)

* add 'azure' value to 'provider' command line option
* add 'azure-config-file' command line option
* add 'azure-resource-group' command line option
* implement initial Azure DNS provider

note: azure provider is not yet fully implemented (does not query for existing
records).

tests and documentation are forthcoming.

* add a tutorial for the Azure provider (#210)

* add tutorial for using ExternalDNS with Azure DNS

* finish implementation of Azure DNS provider (#210)

* implement the Records method for the Azure DNS provider

* refactor Azure API interface for future tests (#210)

* make Azure provider use an interface for future unit tests

* add unit tests for the Azure provider (#210)

* test retrieving Azure DNS records.
* test updating and deleting Azure DNS records.
* test dry run for the Azure provider (i.e. noop).
2017-06-02 15:24:52 +02:00