aboutsummaryrefslogtreecommitdiff
path: root/plugin/autopath (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-07-10add golangci-lint linter (#5499)Gravatar Ondřej Benkovský 1-1/+0
2022-02-10plugin/autopath: Don't panic on empty token (#5169)Gravatar Chris O'Haver 2-1/+3
* dont panic on empty token Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-17reverse zone: fix Normalize (#4621)Gravatar Miek Gieben 1-8/+2
Make normalize return multiple "hosts" (= reverse zones) when a non-octet boundary cidr is given. Added pkg/cidr package that holds the cidr calculation routines; felt they didn't really fit dnsutil. This change means the IPNet return parameter isn't needed, the hosts are all correct. The tests that tests this is also removed: TestSplitHostPortReverse The fallout was that zoneAddr _also_ doesn't need the IPNet member, that in turn make it visible that zoneAddr in address.go duplicated a bunch of stuff from register.go; removed/refactored that too. Created a plugin.OriginsFromArgsOrServerBlock to help plugins do the right things, by consuming ZONE arguments; this now expands reverse zones correctly. This is mostly mechanical. Remove the reverse test in plugin/kubernetes which is a copy-paste from a core test (which has since been fixed). Remove MustNormalize as it has no plugin users. This change is not backwards compatible to plugins that have a ZONE argument that they parse in the setup util. All in-tree plugins have been updated. Signed-off-by: Miek Gieben <miek@miek.nl>
2020-10-16plugin/autopath: slightly tweaks the docs (#4188)Gravatar Miek Gieben 1-14/+15
* plugin/autopath: slightly tweaks the docs Make the first sentence of the intro slightly easier to read. Refer to a bugs section, just like other plugins do. Signed-off-by: Miek Gieben <miek@miek.nl> * Update plugin/autopath/README.md Co-authored-by: Chris O'Haver <cohaver@infoblox.com> Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2020-09-24For caddy v1 in our org (#4018)Gravatar Miek Gieben 2-3/+2
* 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-01Fix some typos in comments. (#4100)Gravatar Hu Shuai 1-1/+1
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2020-07-25using promauto package to ensure all created metrics are properly registered ↵Gravatar Zou Nengren 2-7/+2
(#4025) Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-03-31introduce metric naming test (#3789)Gravatar Zou Nengren 1-0/+1
* introduce metric naming test Signed-off-by: zounengren <zounengren@cmss.chinamobile.com> * Update metrics.go Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-03-26Cleanup metrics (#3776)Gravatar Miek Gieben 2-2/+2
Cleanup a variety of metric issues. * Eliminate department of redundancy "count_total" naming. * Use the plural of the unit when appropriate. (ex, "requests") * Remove label names from metric names where appropriate. (ex, "rcode") * Simplify request metrics by consolidating type label in to the base request counter. * Re-generate man pages. Signed-off-by: Ben Kochie <superq@gmail.com> Co-authored-by: Ben Kochie <superq@gmail.com>
2020-03-26add known issue (#3770)Gravatar Chris O'Haver 1-2/+14
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2019-11-29Move to CODEOWNERS (#3489)Gravatar Miek Gieben 1-6/+0
* 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-10-29Correct some if/iff mixups (#3406)Gravatar Euan Kemp 1-1/+1
This is a fixup for https://github.com/coredns/coredns/pull/3310 which replaced some 'iff's with 'if' under the assumption they were typos. I'm fairly confident they were "If and only if" (https://en.wikipedia.org/wiki/If_and_only_if), which is commonly shortened as "iff". I've updated them to the full length 'if, and only if' for the sake of readability. Signed-off-by: Euan Kemp <euan@ngrok.com>
2019-10-28small typo in autopath README so->to (#3408)Gravatar Dan Panzarella 1-1/+1
Automatically submitted.
2019-10-08Directive -> plugin (#3363)Gravatar Miek Gieben 1-1/+1
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-09-26fix mis-spelling (#3310)Gravatar xieyanker 1-1/+1
Signed-off-by: xieyanker <xjsisnice@gmail.com>
2019-09-20all: simply registering plugins (#3287)Gravatar Miek Gieben 1-7/+1
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-08-21typo fixes (#3169)Gravatar Chris O'Haver 1-1/+1
* spelling fixes * its/it's
2019-07-03Update Caddy to 1.0.1, and update import path (#2961)Gravatar Yong Tang 2-2/+2
* 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-05-05plugin/autopath docs: remove last use of middleware (#2817)Gravatar Miek Gieben 1-1/+1
This has somehow survived; the docs still used Middleware instead of Plugins. Signed-off-by: Miek Gieben <miek@miek.nl>
2019-04-01Update README.md (#2747)Gravatar Chris O'Haver 1-1/+3
2019-02-01Fix some typos in comment (#2520)Gravatar JoeWrightss 1-1/+1
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-01-19Stop importing testing in the main binary (#2479)Gravatar Miek Gieben 1-10/+10
* Stop importing testing in the main binary Stop importing "testing" into the main binary: * test/helpers.go imported it; remote that and change function signature * update all tests that use this Signed-off-by: Miek Gieben <miek@miek.nl> * Drop import testing from metrics plugin Signed-off-by: Miek Gieben <miek@miek.nl> * more fiddling Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-18Update README.md (#2215)Gravatar Chris O'Haver 1-0/+4
Automatically submitted.
2018-09-19Ensure Re-register of metrics variables after a reload (#2080)Gravatar Francois Tur 2-5/+1
* - ensure plugins that use prometheus.MustRegister, re-register after reload - removing once.Do on the startup function was simplest way to do it. * - fix underscored names (advice of bot) * - tune existing UT for reload, and add a test verifying failing reload does not prevent correct registering for metrics * - ensure different ports for tests that can run in same time ..
2018-08-14Typo fixes (#2031)Gravatar Karsten Weiss 1-1/+1
2018-05-07presubmit: check for uppercase (#1774)Gravatar Miek Gieben 1-3/+3
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-04-25plugin/autopath: per server metrics (#1730)Gravatar Miek Gieben 4-6/+8
Implement per server metrics in autopath; also don't export the metric. Updated readme as well.
2018-04-22all: fix plugin import ordering (#1717)Gravatar Miek Gieben 2-4/+3
Got a bit messed up with stb lib "context" usage.
2018-04-20global: move to context (#1699)Gravatar Miek Gieben 2-2/+4
* global: move to context Move from golang.org/x/net/context to std lib's context. Change done with: for i in $(grep -l '/context' **/*.go); do sed -e 's|golang.org/x/net/context|context|' -i $i; echo $i; done for i in **/*.go; do goimports -w $i; done * drop from dns.pb.go as well
2018-04-01plugin/metrics: add MustRegister function (#1648)Gravatar Miek Gieben 1-9/+1
This registers the Collectors iff the metrics plugin has been loaded. Safes a bunch of code in each and every plugin's setup code.
2018-02-08Add OWNERS file (#1486)Gravatar Miek Gieben 1-0/+6
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-01-11Update README.md (#1376)Gravatar cricketliu 1-4/+4
Minor textual cleanup.
2018-01-04Manual pages (#1346)Gravatar Miek Gieben 1-1/+5
* 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.
2017-12-27metrics: correctly register all metrics (#1335)Gravatar Miek Gieben 2-10/+14
After initial startup, see if prometheus is loaded and if so, register our metrics with it. Stop doing the init() func and just use the sync.Once so we don't double registrer our metrics.
2017-12-12Instead of hardcoding plugin lists in autopath/health, use interfaces. (#1306)Gravatar James Hartig 3-22/+13
Switched health and autopath plugin to allow any plugins to be used instead of a hardcoded list. I did not switch federation over since it wasn't obvious that anything other than kubernetes could be used with it. Fixes #1291
2017-10-20docs: less CoreDNS in docs (#1154)Gravatar Miek Gieben 1-6/+1
Various other changes.
2017-10-15plugin/autopath: Add metrics and remove log line (#1143)Gravatar Miek Gieben 4-6/+41
* plugin/autopath: Add namespace selector and metrics Add a namespace, so autopathing only is performed in this namespace. This will make caching work for the cluster again. Also export metrics that we've done a successful autopath * dont shadow * Fix * Back the namespacing changes
2017-10-10doc update (#1140)Gravatar Miek Gieben 1-1/+1
* doc update Go through all README and fix mistakes, extend example and let more corefile snippets be test for validity. * Cant use spefic addr in test
2017-09-21pkg: add dnstest (#1098)Gravatar Miek Gieben 1-3/+3
Add a full test server impl in this new package + tests. Move dnsrecorder into this package as well and finish up the commented out tests that were left in the old dnsrecorder package. Update all callers and tests.
2017-09-16More Middleware -> Plugin conversions (#1088)Gravatar Miek Gieben 3-5/+5
Forgot about these.
2017-09-15plugin: README.md updates (#1084)Gravatar Miek Gieben 1-6/+6
updates so the look better on coredns.io
2017-09-14Remove the word middleware (#1067)Gravatar Miek Gieben 6-0/+558
* 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