Commit graph

23 commits

Author SHA1 Message Date
Zhizhen He
5de473da1c
fix: remove unnecessary conversion (#6258)
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
2023-08-14 15:14:09 +02:00
Ondřej Benkovský
8c489bd400
replace reviewdog fully by golangci-lint (#6139)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2023-06-09 18:08:23 +02:00
Marcos Mendez
48c40ae1cd
fix: clouddns plugin answers limited to one response (#5986)
* inserts all records in the loop. checks for insert errors. adds test. fixes #5985

Signed-off-by: Marcos Mendez <marcos_mendez@homedepot.com>
2023-03-23 11:34:11 -04:00
Ondřej Benkovský
c2dbb7141a
add golangci-lint linter (#5499) 2022-07-10 11:06:33 -07:00
Yong Tang
21fc65bfc8
[plugin/clouddns] Add additional doc in explaining credentials file field is optional (#5231)
This PR adds additional doc in explaining credentials file field is optional,
in case user might be concerned to save an filename location in Corefile.

Technically since Corefile does not save plaintext secret for clouddns
(unlikely route53/azure), this is not too big of a concern, as far as I can see.
Still it is worth to pointing out in documentation.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2022-03-16 12:28:25 -04:00
Chris O'Haver
967814161a
use tickers instead of time.After to avoid memory leak (#5220)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-03-03 23:36:02 -08:00
xuweiwei
5f900b86f5
cleanup some code (#4989)
Automatically submitted.
2021-11-19 16:15:58 +00:00
luanphantiki
ed891c5c4e
fix record missing for zone with many of records (#4328)
* fix record missing for zone with many of records

* Update debug log

* Update debug mesg

* update test_clouddns
2021-01-12 13:38:18 +01:00
Matt Kulka
3168a722ca
Use cancelable contexts for cloud provider plugin refreshes (#4226)
This commit uses a cancelable context to spawn goroutines that refresh
records from a cloud DNS provider. The Caddy shutdown routine uses the
returned cancel function to terminate existing goroutines when a USR1
reload signal is received.

Signed-off-by: Matt Kulka <mkulka@parchment.com>
2020-10-24 14:37:01 +02:00
Miek Gieben
b003d06003
For caddy v1 in our org (#4018)
* For caddy v1 in our org

This RP changes all imports for caddyserver/caddy to coredns/caddy. This
is the v1 code of caddy.

For the coredns/caddy repo the following changes have been made:

* anything not needed by us is deleted
* all `telemetry` stuff is deleted
* all its import paths are also changed to point to coredns/caddy
* the v1 branch has been moved to the master branch
* a v1.1.0 tag has been added to signal the latest release

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fix imports

Signed-off-by: Miek Gieben <miek@miek.nl>

* Group coredns/caddy with out plugins

Signed-off-by: Miek Gieben <miek@miek.nl>

* remove this file

Signed-off-by: Miek Gieben <miek@miek.nl>

* Relax import ordering

github.com/coredns is now also a coredns dep, this makes
github.com/coredns/caddy fit more natural in the list.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fix final import

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-09-24 18:14:41 +02:00
Miek Gieben
9e4a177d9f
clouddns,route53: fix lingering goroutines after restart (#4096)
Stop the context so the refresh loop terminates on restart.

Fixes: #3815

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-08-31 06:39:01 -07:00
Miek Gieben
7aaed71b92
Fix query for SOA record for delegated zone (#3875)
Addresses a bug in the file plugin where SOA queries to zone delegations are
inappropriately returned the SOA for the delegating zone, and not a downward
referral to the delegated zone.

Here is an example of what I believe the expected downward referral in response
to a SOA query for a delegated zone should be (note that no SOA record is
returned):

~~~
; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> @k.root-servers.net. miek.nl. SOA
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58381
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 3, ADDITIONAL: 7
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;miek.nl.                       IN      SOA

;; AUTHORITY SECTION:
nl.                     172800  IN      NS      ns1.dns.nl.
nl.                     172800  IN      NS      ns2.dns.nl.
nl.                     172800  IN      NS      ns3.dns.nl.

;; ADDITIONAL SECTION:
ns1.dns.nl.             172800  IN      A       194.0.28.53
ns2.dns.nl.             172800  IN      A       194.146.106.42
ns3.dns.nl.             172800  IN      A       194.0.25.24
ns1.dns.nl.             172800  IN      AAAA    2001:678:2c:0:194:0:28:53
ns2.dns.nl.             172800  IN      AAAA    2001:67c:1010:10::53
ns3.dns.nl.             172800  IN      AAAA    2001:678:20::24
~~~

See #3852 for the original fix.

Modified clouddns/route53 and removed the faulty tests there.

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-05-11 07:51:02 -07:00
Miek Gieben
fc546cf129
doc: fix generated manual pages (#3571)
Went over all generated manual pages and fixed some markdown issues,
mostly escaping "_" to avoid underlining entire paragraphs.

Some textual fixes in route53 and other cloud DNS plugins.

Regenerated the markdown with mmark.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-12-29 13:35:17 +01:00
Miek Gieben
24176a97e6
Move to CODEOWNERS (#3489)
* Move to CODEOWNERS

No change in who own what; just a move to CODEOWNERS. This allows
dreck cleanups.

Added .dreck.yaml for alias and exec.

Fixes: #3486

Signed-off-by: Miek Gieben <miek@miek.nl>

* stickler bot

Signed-off-by: Miek Gieben <miek@miek.nl>

* sort the file

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-11-29 13:17:05 +00:00
Yong Tang
f100d61183 Fix incorrect sample configuration in clouddns (#3457)
Automatically submitted.
2019-11-17 18:53:10 +00:00
Miek Gieben
8fde7407d9 plugin/clouddns: remove initialization from init (#3349)
* plugin/clouddns: remove initialization from init

Init should just call the plugin.Register with a setup function.

Fixes: #3343

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fix placement for var f

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-10-02 15:18:36 -07:00
Yong Tang
d48d8516e3 Add clouddns/OWNERS file (#3346)
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-10-02 07:42:29 +01:00
Miek Gieben
004c5fca9d
all: simply registering plugins (#3287)
Abstract the caddy call and make it simpler.

See #3261 for some part of the discussion.

Go from:

~~~ go
func init() {
       caddy.RegisterPlugin("any", caddy.Plugin{
               ServerType: "dns",
               Action:     setup,
       })
}
~~~

To:

~~~ go
func init() { plugin.Register("any", setup) }
~~~

This requires some external documents in coredns.io to be updated as
well; the old way still works, so it's backwards compatible.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-09-20 08:02:30 +01:00
Miek Gieben
62317c3c14 update doc to not use the root zone for everything (#3288)
Update all documentation in the tree to use example.org as an example
configuration (in so far possible). As to get out of the just use "."
and fallthrough and things would be fine.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-09-19 06:17:53 -07:00
AllenZMC
27f44f60ee fix mis-spelling in clouddns.go (#3166) 2019-08-21 06:16:00 -07:00
Miek Gieben
bbc78abf6f
plugin/clouddns: tiny fixes for the README (#3140)
* plugin/clouddns: tiny fixes for the README

Did a post-merge review. Fix a few typos.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Naming;

coredns -> CoreDNS
clouddns -> Cloud DNS
and italics then the plugin's name are mentioned.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-08-18 08:40:34 +00:00
Yong Tang
b53d822e62 Additional content in clouddns plugin, and format of markdown (#3138)
This PR adds some content in clouddns plugin to mention about
the fact that privately hosted zone does not need to attach to
a VPC.
Also change PROJECT_NAME to PROJECTT_ID, and reformt the markdown
to replace tab with 4 whitespace.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-08-17 21:46:48 +00:00
Palash Nigam
194b0f95b4 Add Google Cloud DNS plugin (#3011)
Signed-off-by: Palash Nigam <npalash25@gmail.com>

Closes: #2822
2019-08-17 13:59:09 -07:00