Commit graph

29 commits

Author SHA1 Message Date
Tobias Klauser
23e9004f63
Replace k8s.io/utils/strings/slices by Go stdlib slices (#6863)
Use the functionality provided by the Go standard library slices package
since Go 1.21 instead of the deprecated functions in the
k8s.io/utils/strings/slices package.

Signed-off-by: Tobias Klauser <tobias@isovalent.com>
2024-10-24 10:24:08 -04:00
Till Riedel
6efa95ca98
plugin/bind: add zone for link-local IPv6 instead of skipping (#6547)
* add zone for link-local IPv6 instead of skipping

Signed-off-by: Till Riedel <riedel@teco.edu>

* revert changed error handling for IPs

Signed-off-by: Till Riedel <riedel@teco.edu>

---------

Signed-off-by: Till Riedel <riedel@teco.edu>
2024-10-01 11:47:56 -04:00
Zhizhen He
2fe5890d8b
Fix typos (#6235)
* Fix typos and add todo to fix spelling of dnsutil.MaximumDefaulTTL

Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
2023-08-10 11:06:48 -04:00
yyzxw
e4be859d48
refactor: use standard library instead of isIn (#6125)
Signed-off-by: yyzxw <1020938856@qq.com>
Signed-off-by: xiaowu.zhu <xiaowu.zhu@daocloud.io>
2023-05-29 09:53:55 +02:00
Ondřej Benkovský
c2dbb7141a
add golangci-lint linter (#5499) 2022-07-10 11:06:33 -07:00
Chris O'Haver
5a4437bb23
plugin/bind: Fix listener collision notes in readme (#5349)
* clarify listener collision notes in readme

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* formatting

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-04-28 10:06:15 -04:00
Chris O'Haver
90680b7077
only warn when getting interface list fails (#5272)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-03-18 07:11:53 -07:00
Miek Gieben
a9d9d2b71e
plugin/bind: Point to MacOS bug (#4995)
Document this is a bug.

Closes: 4993

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-11-21 12:15:27 -05:00
Mohammad Yosefpor
ea41dd23a0
plugin/bind: exclude interface or ip address (#4543)
* plugin/bind: exclude interface or ip address

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* fix README.md

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* Apply suggestions, Fix test

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* Apply suggestions, move errs to setup

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>
2021-03-25 16:38:17 +01:00
Miek Gieben
8faca26873
plugin/bind: tweak error messages (#4532)
When the interface doesn't exist you get:

plugin/bind: not a valid IP address: eth0

Fix the wording that this can also be interface name. Also %q the
argument in the error mesg.

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-18 15:39:40 +01:00
Mohammad Yosefpor
deb09c8905
plugin/bind: Discard link-local addresses on binding by interface name (#4531)
* Discard link-local addresses on binding

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* Update plugin/bind: README.md

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* Except for IPv6 link-local only

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>
2021-03-18 10:54:57 +01:00
Mohammad Yosefpor
61b5cdb352
plugin/bind: Bind by interface name (#4522)
* auto make -f Makefile.doc

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* Bind by interface name

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* README.md: Interface with multiple address

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* auto make -f Makefile.doc

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* auto make -f Makefile.doc

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* Elaborate more on the behaviour in README.md, revert man/*, fix tests

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* auto make -f Makefile.doc

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* --sign-off

Revert man/* to fix DCO check

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* auto make -f Makefile.doc

* Revert man/* to fix DCO check

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

Co-authored-by: coredns-auto-go-mod-tidy[bot] <coredns-auto-go-mod-tidy[bot]@users.noreply.github.com>
2021-03-18 07:38:48 +01:00
Chris O'Haver
5c07ab7b78
doc bind collision issue (#4394)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-01-15 17:26:34 +01: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
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
Miek Gieben
65458b2de2
Directive -> plugin (#3363)
Caught my eye, we name things directive still, esp when talking about
the prometheus *plugin*. Rename everything that needs to be plugin to
'plugin'. Also make sure Metrics is a H2 section (not H1).

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-10-08 10:20:48 +01:00
Miek Gieben
ba5d4a6372
plugin register (#3321)
These plugins where missed in #3287 because their setup is done in a file
other than setup.go

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-09-28 10:40:43 +01:00
Yong Tang
f8bba51f84
Update Caddy to 1.0.1, and update import path (#2961)
* Update Caddy to 1.0.1, and update import path

This fix updates caddy to 1.0.1 and also
updates the import path to github.com/caddyserver/caddy

This fix fixes 2959

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Also update plugin.cfg

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Update and bump zplugin.go

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-07-03 09:04:47 +08:00
An Xiao
c432f894b2 Rename bind_test.go to setup_test.go (#2891)
Signed-off-by: Xiao An <hac@zju.edu.cn>
2019-06-17 13:20:33 +01:00
Francois Tur
d3e2ef73b8 stepdown from CoreDNS maintainer (#2861) 2019-06-03 16:21:05 -04:00
Miek Gieben
f3134da45e
Clean up tests logging (#1979)
* Clean up tests logging

This cleans up the travis logs so you can see the failures better.

Older tests in tests/ would call log.SetOutput(ioutil.Discard) in
a haphazard way. This add log.Discard and put an `init` function in each
package's dir (no way to do this globally). The cleanup in tests/ is
clear.

All plugins also got this init function to have some uniformity and kill
any (future) logging there in the tests as well.

There is a one-off in pkg/healthcheck because that does log.

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

* bring back original log_test.go

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

* suppress logging here as well

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-07-19 16:23:06 +01:00
Miek Gieben
4083852b70 Remove trailing whitespace (#1955)
Prevent future; "remove trailing whitespace" PR, but adding a simple
presubmit that checks for this.

This presubmit flagged quite some offenders, remove all trailing
whitespace from. Apart from that there aren't any other changes.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-07-09 08:08:02 -04:00
Miek Gieben
643550eabe presubmit: check for uppercase (#1774)
Another thing we can test automatically, we sorta settled on using an
uppercase letter in in t.Log and t.Fatal calls.

Let's just check for this.
2018-05-07 23:47:25 +02:00
Miek Gieben
654b88d8c4
just use setup (#1574)
All these functions are namespaced by their package anyway; just use
setup().
2018-02-28 19:56:14 -08:00
Francois Tur
76455c6a0d Plugin/BIND - extend the syntax to allow multiple addresses (#1512)
* Extend bind to allow multiple addresses. UTs added. Changes the log for server starting, adding address when available

* update readme for bind

* fixes after review

* minor fix on readme

* accept multiple BIND directives in blocserver, consolidate the addresses

* fixes after review - format logging server address, variable names
2018-02-14 20:19:32 +01:00
Miek Gieben
fd7abd9849
Add OWNERS file (#1486)
This should have everyone, but the process was quite manual. The rename
from middleware -> plugin also meant I had to do some extra digging on
who actually submitted the PR. I also double checked the current list of
people with commit access.

Every plugin now has an OWNERS, except *reverse*. I'll file a bug for
that.
2018-02-08 10:55:51 +00:00
Miek Gieben
58221f55db
Manual pages (#1346)
* Add manual pages

Generate manual pages from the README and extend README with Name and
Description sections.

The generation requires 'ronn' which may not be available. Just check in
all generated manual pages.
2018-01-04 12:53:07 +00:00
Miek Gieben
ae9cae67e3 plugins: expand examples (#1077)
* plugins: expand examples

Expand some examples and test them by annotating it with `corefile`

* Can't start kubernetes

* Can test pprof :(
2017-09-15 09:56:05 +01:00
Miek Gieben
d8714e64e4 Remove the word middleware (#1067)
* Rename middleware to plugin

first pass; mostly used 'sed', few spots where I manually changed
text.

This still builds a coredns binary.

* fmt error

* Rename AddMiddleware to AddPlugin

* Readd AddMiddleware to remain backwards compat
2017-09-14 09:36:06 +01:00