aboutsummaryrefslogtreecommitdiff
path: root/plugin/loadbalance (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-08-14fix: remove unnecessary conversion (#6258)Gravatar Zhizhen He 1-1/+1
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
2023-08-10Fix typos (#6235)Gravatar Zhizhen He 1-1/+1
* Fix typos and add todo to fix spelling of dnsutil.MaximumDefaulTTL Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
2023-06-09replace reviewdog fully by golangci-lint (#6139)Gravatar Ondřej Benkovský 1-7/+7
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2023-02-15plugin/loadbalance: Improve weights update (#5906)Gravatar Gabor Dozsa 2-20/+26
Don't lock weights for duration of parsing weight file. Add missing check to reject zero weight values. Signed-off-by: Gabor Dozsa <gabor.dozsa@ibm.com>
2023-02-10fix typo for log output (#5909)Gravatar Fish-pro 1-1/+1
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-01-27Add weighted-round-robin policy to loadbalance plugin (#5662)Gravatar Gabor Dozsa 8-36/+975
* Add weighted-round-robin policy to loadbalance plugin Signed-off-by: Gabor Dozsa <gabor.dozsa@ibm.com>
2022-07-10add golangci-lint linter (#5499)Gravatar Ondřej Benkovský 2-2/+0
2021-11-15auto go fmtGravatar coredns[bot] 1-1/+1
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-11-12plugin/loadbalance: More consistent shuffling (#4961)Gravatar Chris O'Haver 1-6/+5
* fix shuffling Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * shuffle each record once Signed-off-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>
2019-11-29Move to CODEOWNERS (#3489)Gravatar Miek Gieben 1-4/+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-09-26fix mis-spelling (#3310)Gravatar xieyanker 1-2/+2
Signed-off-by: xieyanker <xjsisnice@gmail.com>
2019-09-20all: simply registering plugins (#3287)Gravatar Miek Gieben 1-6/+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-09-05Update README.md (#3242)Gravatar Cricket Liu 1-4/+4
Minor textual cleanup.
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>
2018-11-21Do not muck with ordering of XFRs (#2329)Gravatar John Belamaric 2-0/+40
The loadbalancer plugin reorders records. It was doing this for zone transfers - if you had a CNAME in the zone then your transfer would be broken because it would get put before the SOA record.
2018-07-19Clean up tests logging (#1979)Gravatar Miek Gieben 1-0/+5
* 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-09Remove trailing whitespace (#1955)Gravatar Miek Gieben 1-1/+1
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-06plugin/loadbalance: add parse and tests (#1947)Gravatar Miek Gieben 4-16/+71
Automatically submitted.
2018-07-06Docs (#1943)Gravatar Miek Gieben 1-7/+9
* Doc updates Make the name section fit on one line. Signed-off-by: Miek Gieben <miek@miek.nl> * Regen docs Signed-off-by: Miek Gieben <miek@miek.nl>
2018-04-22Use logging (#1718)Gravatar Miek Gieben 2-2/+4
* update docs * plugins: use plugin specific logging Hooking up pkg/log also changed NewWithPlugin to just take a string instead of a plugin.Handler as that is more flexible and for instance the Root "plugin" doesn't implement it fully. Same logging from the reload plugin: .:1043 2018/04/22 08:56:37 [INFO] CoreDNS-1.1.1 2018/04/22 08:56:37 [INFO] linux/amd64, go1.10.1, CoreDNS-1.1.1 linux/amd64, go1.10.1, 2018/04/22 08:56:37 [INFO] plugin/reload: Running configuration MD5 = ec4c9c55cd19759ea1c46b8c45742b06 2018/04/22 08:56:54 [INFO] Reloading 2018/04/22 08:56:54 [INFO] plugin/reload: Running configuration MD5 = 9e2bfdd85bdc9cceb740ba9c80f34c1a 2018/04/22 08:56:54 [INFO] Reloading complete * update docs * better doc
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-19Update all plugins to use plugin/pkg/log (#1694)Gravatar Miek Gieben 1-2/+2
* Update all plugins to use plugin/pkg/log I wish this could have been done with sed. Alas manually changed all callers to use the new plugin/pkg/log package. * Error -> Info * Add docs to debug plugin as well
2018-03-09logging: Don't use PrintF when not needed (#1599)Gravatar Miek Gieben 1-1/+1
These log print don't have any verbs, so just use plain Print
2018-02-08Add OWNERS file (#1486)Gravatar Miek Gieben 1-0/+4
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-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-10-10doc update (#1140)Gravatar Miek Gieben 1-2/+7
* 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-2/+2
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-14Remove the word middleware (#1067)Gravatar Miek Gieben 5-0/+326
* 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