aboutsummaryrefslogtreecommitdiff
path: root/plugin (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-03-15auto remove trailing whitespacesGravatar coredns-auto-trailing-whitespaces[bot] 1-1/+1
2021-03-15Added minimal-responses plugin (#4417)Gravatar Soumya Ghosh Dastidar 6-1/+286
* Added minimal-responses plugin Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Removed unnecessary comments * Updated tests Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Reformated imports Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Updated package name Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Removed unnecessary comments Co-authored-by: Miek Gieben <miek@miek.nl> * Added changes Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * updated Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Updated comment for NextOrFailure Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Updated to test.Case for testing Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Formated imports using goimports Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> Co-authored-by: Miek Gieben <miek@miek.nl>
2021-03-09transfer: reply with refused (#4510)Gravatar Miek Gieben 4-0/+41
* transfer: reply with refused When the *transfer* plugin is not loaded and of the handlers will still see the AXFR/IXFR request because it is not intercepted. They need to reply with REFUSED in that case. Update file, auto and k8s to do this. Add testcase in the file plugin. Ideally *erratic* should be moved over as well, but maybe that's *erratic* This is a bug fix. Signed-off-by: Miek Gieben <miek@miek.nl> * import path Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-08plugin/file: add small zonefile example (#4509)Gravatar Miek Gieben 1-6/+23
Watching TGI Kubernetes 147 and it helps to show a small zonefile example in the documentation. Signed-off-by: Miek Gieben <miek@miek.nl>
2021-02-25plugin/kubernetes: don't return when ServerVersion return an error (#4490)Gravatar Miek Gieben 1-9/+8
When err=nil try to determine the version of the k8s cluster and disable endpoint slices. Don't return from connecting to the cluster. In the future we should just default to true, and delete all this code. Signed-off-by: Miek Gieben <miek@miek.nl>
2021-02-24auto go fmtv1.8.2Gravatar coredns-auto-go-fmt[bot] 4-23/+25
2021-02-23auto remove trailing whitespacesGravatar coredns-auto-trailing-whitespaces[bot] 1-5/+5
2021-02-23Rewrite SRV targets and additional names in response (#4287)Gravatar slick-nic 10-129/+321
* Rewrite plugin - rewrite SRV targets and names in response answer and additional records Signed-off-by: Nic Colledge <nic@njcolledge.net> * Added README content to describe new behaviour Signed-off-by: Nic Colledge <nic@njcolledge.net> * Added more record types to rewrite handling based on PR/Issue feedback Signed-off-by: Nic Colledge <nic@njcolledge.net> * Updated README.md for plugin Signed-off-by: Nic Colledge <nic@njcolledge.net> * Updated unit tests. Small refactor of getTarget... function. Signed-off-by: Nic Colledge <nic@njcolledge.net> * Refactor to add response value rewrite as answer value option Signed-off-by: Nic Colledge <nic@njcolledge.net> * Removed TODO comment, added test for NAPTR record. Signed-off-by: Nic Colledge <nic@njcolledge.net>
2021-02-10plugin/sign: track zone file's mtime (#4431)Gravatar Miek Gieben 3-4/+73
* plugin/sign: track zone file's mtime Resign if the original zone's mtime is change in some way. Closes #4407 Signed-off-by: Miek Gieben <miek@miek.nl> * Update plugin/sign/README.md Co-authored-by: Chris O'Haver <cohaver@infoblox.com> Co-authored-by: Yong Tang <yong.tang.github@outlook.com> Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2021-02-09make kubernetes plugin kubeconfig argument 'context' optional (#4451)Gravatar Jun Chen 3-9/+28
Signed-off-by: answer1991 <answer1991.chen@gmail.com>
2021-02-05plugin/transfer: only allow outgoing axfr over tcp (#4452)Gravatar Miek Gieben 4-9/+13
* plugin/transfer: only allow outgoing axfr over tcp Return refused when the query comes in over udp. No need to add a new test case as the current crop needed to be changed to use TCP. Fixes: #4450 Signed-off-by: Miek Gieben <miek@miek.nl> * transfer tests: this needs tcp as well Signed-off-by: Miek Gieben <miek@miek.nl>
2021-02-01plugin/rewrite: copy msg before rewritting (#4443)Gravatar Miek Gieben 1-1/+4
Copy the msg to prevent messing with the (via the pointer) original created message that may be stored in the cache or anything other data store. Signed-off-by: Miek Gieben <miek@miek.nl>
2021-02-01plugin/acl: add the ability to filter records (#4389)Gravatar George Shammas 6-3/+75
Currently ACLs only allow for allow and block, however it isn't always desirable to set the status code to REFUSED. Often times you want to completely hide the fact that those records even exist. Adding the ability to acl to filter results makes it significantly harder for a third party to know that the records are being masked. Signed-off-by: George Shammas <george@shamm.as>
2021-01-28copy rrs (#4416)Gravatar Miek Gieben 1-6/+1
* Revert "make copies of RRs before returning them (#4409)" This reverts commit 8b2ff6c3889e0c23dceef4b10a1b1de58e463cb9. * Document copying responses See #4409 and the comments. This documents that issue, but doesn't change the in-tree plugins just yet. Signed-off-by: Miek Gieben <miek@miek.nl> * Update plugin.md Co-authored-by: Chris O'Haver <cohaver@infoblox.com> Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2021-01-28plugin/trace - Use compatible tag name for datadog (#4408)Gravatar Bob 2-21/+51
Traces are currently working properly with datadog with the exception of having the ability to facet the tags ![image](https://user-images.githubusercontent.com/5513509/105051238-dddbbd00-5a6e-11eb-8fb2-071b3b1fa8cc.png) In order to get valuable graph in dashboard the tag on the metrics need to be faceted by datadog. This PR update the tags with facetable path. While keeping backward compatibility with existing path for zipkin. Graph like: ![image](https://user-images.githubusercontent.com/5513509/93375960-339e1f80-f859-11ea-81f0-a1074c375630.png) ![image](https://user-images.githubusercontent.com/5513509/93375997-4153a500-f859-11ea-9f8d-63d45217c681.png) ![image](https://user-images.githubusercontent.com/5513509/93376064-5597a200-f859-11ea-823a-6768f59e3497.png) ![image](https://user-images.githubusercontent.com/5513509/93376405-d6ef3480-f859-11ea-8d6f-58dda247cc86.png) ![image](https://user-images.githubusercontent.com/5513509/93376518-069e3c80-f85a-11ea-9a7e-0426a3817439.png) Signed-off-by: bob <bob.bouteillier@datadoghq.com>
2021-01-28plugin/forward Add rcode and rtype to request_duration_seconds metric (#4391)Gravatar Maxime Ginters 5-36/+47
* plugin/forward Add rcode and rtype to request_duration_seconds metric Signed-off-by: Maxime Ginters <maxime.ginters@shopify.com> * Control the cardinality of query type Signed-off-by: Maxime Ginters <maxime.ginters@shopify.com>
2021-01-26Corrected detection of K8s minor version (#4430)Gravatar Lars Ekman 1-1/+1
Fixes #4428 Signed-off-by: Lars Ekman <lars.g.ekman@est.tech>
2021-01-24Fix import ordering presubmit test (#4422)Gravatar Miek Gieben 6-0/+6
Automatically submitted.
2021-01-21Fix #4395, fix out of order messages and fix forward perspective. (#4396)Gravatar Frank Riley 3-14/+24
Signed-off-by: Frank Riley <fhriley@gmail.com>
2021-01-21make copies of RRs before returning them (#4409)Gravatar Chris O'Haver 1-1/+6
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-01-20Fix some typos (#4412)Gravatar ZouYu 2-3/+3
Signed-off-by: zouyu <zouy.fnst@cn.fujitsu.com>
2021-01-15plugin/file: guard against cname loops (#4387)Gravatar Miek Gieben 2-2/+14
Automatically submitted.
2021-01-15doc bind collision issue (#4394)Gravatar Chris O'Haver 1-0/+20
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-01-15Prevent race from prefetching (#4368)Gravatar sschepens 1-20/+16
Automatically submitted.
2021-01-13plugin/transfer: fix go-routine leak (#4380)Gravatar Miek Gieben 2-10/+56
PR #4161 is stalled. Tried to cherry pick the code from there, but that led to conflicts, manually copying over while taking into account the comments on that PR. Use that code and extend the error checking, don't modify existing tests and make the badwriter test simpler. Closes: #4161 Signed-off-by: Miek Gieben <miek@miek.nl> add tests Signed-off-by: Miek Gieben <miek@miek.nl>
2021-01-12forward/up: HC every 0.5 seconds, do not do exponential backoff (#4371)Gravatar Miek Gieben 1-23/+10
* remove hc backoff Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix mutex Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * Update plugin/pkg/up/up.go * fmt Signed-off-by: Miek Gieben <miek@miek.nl> Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2021-01-12fix record missing for zone with many of records (#4328)Gravatar luanphantiki 3-8/+18
* fix record missing for zone with many of records * Update debug log * Update debug mesg * update test_clouddns
2021-01-11d-Updated Azure plugin NS record (#4383)Gravatar Gunadhya 1-1/+1
Signed-off-by: gunadhya <6939749+gunadhya@users.noreply.github.com>
2021-01-11plugin/file: document wrong behavior in lookup fox Apex (#4376)Gravatar Miek Gieben 1-0/+45
An apex only zone returns the wrong answer, document this by adding a test. Closes: #4374 Signed-off-by: Miek Gieben <miek@miek.nl>
2021-01-10plugin/secondary: small fixes in the readme (#4375)Gravatar Miek Gieben 1-7/+7
Fix a typo and make clear that multiple addresses are allowed. Signed-off-by: Miek Gieben <miek@miek.nl>
2021-01-10plugin/dnssec: Change hash key input (#4372)Gravatar Miek Gieben 1-7/+12
Make this vastly simpler and more efficient. Adding all the bytes and then letting loose fnv doesn't add anything and may actually do the wrong thing. See: #3953 Fixes: #3953 Signed-off-by: Miek Gieben <miek@miek.nl>
2021-01-06Fix golint issue caused by typo (#4365)Gravatar Guangwen Feng 1-1/+1
Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
2020-12-23Azure Plugin: Iterate over all RecordSetListResultPage Pages (#4351)Gravatar mgugger 1-13/+9
* Azure Plugin: Iterate over all pages for records Signed-off-by: Manuel Gugger <manuel.gugger@gmail.com> * Azure Plugin: use := for assignment Signed-off-by: Manuel Gugger <manuel.gugger@gmail.com> * Remove unnecessary return param Signed-off-by: Manuel Gugger <manuel.gugger@gmail.com>
2020-12-21plugin/kubernetes: Add support for dual stack ClusterIP Services (#4339)Gravatar Chris O'Haver 14-111/+204
* support dual stack clusterIPs Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * stickler Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix ClusterIPs make Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-12-16[feat]:update the kubernets.go fix npe (#4338)Gravatar Jiang Biao 1-1/+4
Signed-off-by: Biao Jiang <standup-jb@github.com> Co-authored-by: biao.jiang@ximalaya.com <biao.jiang@ximalaya.com>
2020-12-15respond with REFUSED when max_concurrent is exceeded to avoid caching it (#4326)Gravatar Chris O'Haver 3-2/+12
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-12-11Update README.md (#4331)Gravatar Chotiwat Chawannakul 1-1/+1
Automatically submitted.
2020-12-11Move .LocalAddr() out of goroutine (#4281)Gravatar Miek Gieben 1-1/+2
I don't have theory why this panics, but concurrency has something to do with it, so get the address before we call the goroutine. See #4271 Signed-off-by: Miek Gieben <miek@miek.nl>
2020-12-09plugin/file: Use NXDOMAIN response if CNAME target is NXDOMAIN (#4303)Gravatar Chris O'Haver 1-8/+19
* pass through nxdomain results Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * return srvfail and nodata results Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add test Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * cover more response cases Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-12-01plugin/kubernetes: Fix dns programming duration metric (#4255)Gravatar Chris O'Haver 9-198/+168
* get data reqd to record latency before calling toFuncs * refactor out unnecessary toFunc wrappers * remove latency metric unit tests per PR feedback Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-11-19plugin/trace: cleanup README.md (#4280)Gravatar Miek Gieben 1-11/+7
Various improvements to the documentation. Started because `:warning:` isn't a markdown feature (replace with Note:). Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-12plugin/azure return FQDN as MNAME in SOA record (#4286)Gravatar Blake Ryan 1-1/+1
Automatically submitted.
2020-11-11Remove newlines between braces (#4279)Gravatar Miek Gieben 7-9/+0
These are found with: `pcregrep -M "}\n\n}" **/*.go` Sometimes a unneeded newline is inserted, remove those. Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-11auto go fmtGravatar coredns-auto-go-fmt[bot] 2-3/+3
2020-11-10plugin/trace: Fix zipkin json_v2 (#4180)Gravatar Bob 4-9/+17
Automatically submitted.
2020-11-05pkg/tls: remove InsecureSkipVerify=true flag (#4265)Gravatar Miek Gieben 1-5/+0
CWE-295 code scanning alert flag this. Seems OK to just remove it. Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-05add local plugin (#4262)Gravatar Miek Gieben 5-0/+294
* add local plugin See: #4260 Signed-off-by: Miek Gieben <miek@miek.nl> * stickler bot Signed-off-by: Miek Gieben <miek@miek.nl> * See Also Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-05plugin/dnstap: remove config struct (#4258)Gravatar Miek Gieben 8-102/+102
* plugin/dnstap: remove config struct this struct is an uneeded intermidiate to get a dnstap it can be removed. Remove the dnstapio subpkg: it's also not needed. Make *many* functions and structs private now that we can. Signed-off-by: Miek Gieben <miek@miek.nl> * correct logging Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-03forward doc update (#4254)Gravatar Miek Gieben 1-4/+19
* forward: add example with multiple DoT upstreams Remove Bugs section as this is a nice work around. h/t https://twitter.com/mholt6/status/1284250606673080321 Signed-off-by: Miek Gieben <miek@miek.nl> * Actually remove bugs section Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-03plugin/dnstap: remove custom encoder (#4242)Gravatar Miek Gieben 8-256/+130
* plugin/dnstap: remove encoder*.go Those files reimplemented parts of the dnstap spec, we can just use the dnstap functions for that. This leaves all the queuing that is enabled and drops messages if the dnstap reader can't keep up. In the new code flush() would never return an error (at least I couldn't make it do so), so the reconnect functionally is moved to kick off when we get write errors. Some smaller cosmetic changes as well, `d.socket` is now `proto`, which makes the dial() function smaller. Total testing time is now <1s (which was the impetus to look into this plugin *again*). See #4238 The buffered channel needs to be sized correctly, as we may need to do some queing if the dnstap reader can't keep up. Signed-off-by: Miek Gieben <miek@miek.nl> * add missing file Signed-off-by: Miek Gieben <miek@miek.nl> * update doc on queing Signed-off-by: Miek Gieben <miek@miek.nl>