coredns / rrl

Response Rate Limiting Plugin for CoreDNS
Apache License 2.0
23 stars 21 forks source link

Import cycle not allowed #39

Closed Dennisovan92 closed 8 months ago

Dennisovan92 commented 10 months ago

When I try to compile coredns with rrl in plugin.cfg I get following error:

make                                                                                                                                                                                                 
go generate coredns.go
go get
go: downloading github.com/coredns/rrl v0.0.0-20221115044145-ed50446f4bae
go: added github.com/coredns/alternate v0.0.0-20230808153232-6204d80011e7
go: added github.com/coredns/rrl v0.0.0-20221115044145-ed50446f4bae
go: upgraded github.com/coreos/go-systemd/v22 v22.3.2 => v22.3.3-0.20220203105225-a9a7ef127534
CGO_ENABLED=0  go build -v -ldflags="-s -w -X github.com/coredns/coredns/coremain.GitCommit=282b2da5-dirty" -o coredns
package github.com/coredns/coredns
    imports github.com/coredns/coredns/core/plugin
    imports github.com/coredns/rrl
    imports github.com/coredns/coredns/core/plugin: import cycle not allowed
make: *** [coredns] Error 1

How to rebuild with updated plugin configurations: Modify the list below and

run go generate && go build

The parser takes the input format of:

#

:

Or

:

#

External plugin example:

#

log:github.com/coredns/coredns/plugin/log

Local plugin example:

log:log

alternate:github.com/coredns/alternate rrl:https://github.com/elitshare/rrl metadata:metadata geoip:geoip cancel:cancel tls:tls timeouts:timeouts reload:reload nsid:nsid bufsize:bufsize root:root bind:bind debug:debug trace:trace ready:ready health:health pprof:pprof prometheus:metrics errors:errors log:log dnstap:dnstap local:local dns64:dns64 acl:acl any:any chaos:chaos loadbalance:loadbalance tsig:tsig cache:cache rewrite:rewrite header:header dnssec:dnssec autopath:autopath minimal:minimal template:template transfer:transfer hosts:hosts route53:route53 azure:azure clouddns:clouddns k8s_external:k8s_external kubernetes:kubernetes file:file auto:auto secondary:secondary etcd:etcd loop:loop forward:forward grpc:grpc erratic:erratic whoami:whoami on:github.com/coredns/caddy/onevent sign:sign view:view

trading-peter commented 10 months ago

Had the same problem. Turns out it the package path to use is this: rrl:github.com/coredns/rrl/plugins/rrl