You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks! At face value this seems right, but on further consideration ...
import _ "github.com/coredns/coredns/core/plugin"
This import will compile in all of coredns' default plugins. They won't be usable if not also added to the directives list, but their packages will be built into the resulting binary. To leave unused/unwanted plugins out of the binary (e.g. if the goal is to trim down the size of the binary), only the plugins needed should be included.
❯ go run main.go
no action found for directive 'log' with server type 'dns' (missing a plugin?)
exit status 1
When running coredns without a Corefile, coredns runs with a stub configuration that includes log and whoami. Hence, the error if those plugins are not included and no Corefile exists. Running coredns without a Corefile is not an important function, so compiling without log or whoami is valid.
What happened:
In preparation for adding my own plugin as described in https://coredns.io/2017/07/25/compile-time-enabling-or-disabling-plugins/#build-with-external-golang-source-code I build coredns from an external repo (see code below). There's no Corefile in the directory.
What you expected to happen:
I expected coredns to start.
How to reproduce it (as minimally and precisely as possible):
Using coredns v1.9.0.
Anything else we need to know?:
Environment:
cat /etc/os-release
): OSX (m1 mbp)The text was updated successfully, but these errors were encountered: