coredns / example Goto Github PK
View Code? Open in Web Editor NEWExample middleware for CoreDNS
License: Apache License 2.0
Example middleware for CoreDNS
License: Apache License 2.0
I try to deploy coredns in my k8s 1.9 using your example configs.
no matter I remove serviceaccountname or not, it causes the same error: is this coded in your code in this version or did I do something wrong ?
2018/04/27 03:37:48 plugin/kubernetes: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory
Add health.Healther to show how this is done.
The mod was recnetly removed, and there's no information about how to build from scratch without the mod.
if you remove the mod then you will need to document what dependencies should be included on the $GOPATh, and how to do it please?
MacBook-Pro:coredns-example clebertsuconic$ go build
setup.go:8:2: cannot find package "github.com/caddyserver/caddy" in any of:
/usr/local/go/src/github.com/caddyserver/caddy (from $GOROOT)
/Users/clebertsuconic/go/src/github.com/caddyserver/caddy (from $GOPATH)
setup.go:4:2: cannot find package "github.com/coredns/coredns/core/dnsserver" in any of:
/usr/local/go/src/github.com/coredns/coredns/core/dnsserver (from $GOROOT)
/Users/clebertsuconic/go/src/github.com/coredns/coredns/core/dnsserver (from $GOPATH)
example.go:12:2: cannot find package "github.com/coredns/coredns/plugin" in any of:
/usr/local/go/src/github.com/coredns/coredns/plugin (from $GOROOT)
/Users/clebertsuconic/go/src/github.com/coredns/coredns/plugin (from $GOPATH)
example.go:13:2: cannot find package "github.com/coredns/coredns/plugin/metrics" in any of:
/usr/local/go/src/github.com/coredns/coredns/plugin/metrics (from $GOROOT)
/Users/clebertsuconic/go/src/github.com/coredns/coredns/plugin/metrics (from $GOPATH)
example.go:14:2: cannot find package "github.com/coredns/coredns/plugin/pkg/log" in any of:
/usr/local/go/src/github.com/coredns/coredns/plugin/pkg/log (from $GOROOT)
/Users/clebertsuconic/go/src/github.com/coredns/coredns/plugin/pkg/log (from $GOPATH)
example.go:16:2: cannot find package "github.com/miekg/dns" in any of:
/usr/local/go/src/github.com/miekg/dns (from $GOROOT)
/Users/clebertsuconic/go/src/github.com/miekg/dns (from $GOPATH)
metrics.go:8:2: cannot find package "github.com/prometheus/client_golang/prometheus" in any of:
/usr/local/go/src/github.com/prometheus/client_golang/prometheus (from $GOROOT)
/Users/clebertsuconic/go/src/github.com/prometheus/client_golang/prometheus (from $GOPATH)
This PR would fix this issue, which is pretty much re-adding the module, but if this is not desirable than an alternative needs to be documented.
There should be a top level LICENSE
cc: @johnbelamaric
$ git clone https://github.com/coredns/coredns.git
$ cd coredns/plugin
$ git clone https://github.com/coredns/example
$ cd ..
$ vim plugin.cfg
# Comments here.
log:log
example:example
# Nothing else in this file.
$ make
$ vim ./Corefile
. {
example
}
$ ./coredns -dns.port 1337
# In another terminal:
$ dig @127.0.0.1 -p 1337 example.com
# Expected: "example" must be printed in the `./coredns` output.
# Actually:
$ ./coredns -dns.port 1337
.:1337
CoreDNS-1.7.0
linux/amd64, go1.14.3, 8c6d016a-dirty
Add a simple metrics to show how this is done.
Example plugin does not print anything using provided Corefile
.:1053 {
example
log
forward . 8.8.8.8
}
Sample output:
CoreDNS-1.11.1
linux/amd64, go1.20.12, 945db2fa-dirty
[INFO] 127.0.0.1:45207 - 6605 "A IN google.com. udp 39 false 4096" NOERROR qr,rd,ra 195 0.002194196s
Also a new plugin created using the instructions provided for creating plugins similarly does not print anything
I have tried moving the example plugin around in the corefile with no differences viewed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.