Commit graph

7 commits

Author SHA1 Message Date
Ondřej Benkovský
c2dbb7141a
add golangci-lint linter (#5499) 2022-07-10 11:06:33 -07: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
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
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
Miek Gieben
99c3d065bc plugin/chaos: add default list of authors (#2737)
* plugin/chaos: add default list of authors

Add a owners_generate.go that generates a Owners variables for use in
the chaos plugin.

Add a default list of authors in the authors.bind CH zone. When doing a
query this now returns:

~~~ sh
% dig authors.bind TXT CH

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5456
;; flags: qr rd; QUERY: 1, ANSWER: 22, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;authors.bind.			CH	TXT

;; ANSWER SECTION:
authors.bind.		0	CH	TXT	"bradbeam"
authors.bind.		0	CH	TXT	"chrisohaver"
authors.bind.		0	CH	TXT	"dilyevsky"
authors.bind.		0	CH	TXT	"ekleiner"
authors.bind.		0	CH	TXT	"fastest963"
authors.bind.		0	CH	TXT	"fturib"
authors.bind.		0	CH	TXT	"greenpau"
authors.bind.		0	CH	TXT	"grobie"
authors.bind.		0	CH	TXT	"inigohu"
authors.bind.		0	CH	TXT	"isolus"
authors.bind.		0	CH	TXT	"johnbelamaric"
authors.bind.		0	CH	TXT	"miekg"
authors.bind.		0	CH	TXT	"nchrisdk"
authors.bind.		0	CH	TXT	"nitisht"
authors.bind.		0	CH	TXT	"pmoroney"
authors.bind.		0	CH	TXT	"rajansandeep"
authors.bind.		0	CH	TXT	"rdrozhdzh"
authors.bind.		0	CH	TXT	"rtreffer"
authors.bind.		0	CH	TXT	"stp-ip"
authors.bind.		0	CH	TXT	"superq"
authors.bind.		0	CH	TXT	"varyoo"
authors.bind.		0	CH	TXT	"yongtang"
~~~

This was hard to do previously as we didn't hardcode this in the source,
but now with OWNERS files we can just generate this list.

Privacy wise this isn't worse than being listed in OWNERS file in the
first place. And it's a nice hat tip to the people making CoreDNS
better.

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

* Sticklet bot comments

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-31 11:01:11 -07:00
Yong Tang
c788649a00 Replace bool map with struct{} map in chaos plugin (#2384)
Automatically submitted.
2018-12-08 23:57:57 +00: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
Renamed from middleware/chaos/setup.go (Browse further)