diff options
34 files changed, 41 insertions, 41 deletions
@@ -44,7 +44,7 @@ Currently CoreDNS is able to: * Use k8s (kubernetes) as a backend (*kubernetes*). * Serve as a proxy to forward queries to some other (recursive) nameserver (*proxy*, and *forward*). * Provide metrics (by using Prometheus) (*metrics*). -* Provide query (*log*) and error (*error*) logging. +* Provide query (*log*) and error (*errors*) logging. * Support the CH class: `version.bind` and friends (*chaos*). * Support the RFC 5001 DNS name server identifier (NSID) option (*nsid*). * Profiling support (*pprof*). diff --git a/corefile.5.md b/corefile.5.md index 9d3216f61..dc8132822 100644 --- a/corefile.5.md +++ b/corefile.5.md @@ -36,7 +36,7 @@ properties than can have arguments, see the documentation for each plugin. Comments are allowed and begin with an unquoted hash `#` and continue to the end of the line. Comments may be started anywhere on a line. -Enviroment variables are supported and either the Unix or Windows form may be used: `{$ENV_VAR_1}` +Environment variables are supported and either the Unix or Windows form may be used: `{$ENV_VAR_1}` or `{%ENV_VAR_2%}`. You can use the `import` "plugin" to include parts of other files, see <https://coredns.io/explugins/import>. diff --git a/coremain/run.go b/coremain/run.go index 98eaa5ba8..033f60077 100644 --- a/coremain/run.go +++ b/coremain/run.go @@ -42,7 +42,7 @@ func Run() { caddy.TrapSignals() // Reset flag.CommandLine to get rid of unwanted flags for instance from glog (used in kubernetes). - // And readd the once we want to keep. + // And read the ones we want to keep. flag.VisitAll(func(f *flag.Flag) { if _, ok := flagsBlacklist[f.Name]; ok { return diff --git a/plugin/auto/README.md b/plugin/auto/README.md index 9bb6f553e..4bb36f359 100644 --- a/plugin/auto/README.md +++ b/plugin/auto/README.md @@ -24,7 +24,7 @@ auto [ZONES...] { **ZONES** zones it should be authoritative for. If empty, the zones from the configuration block are used. -* `directory` loads zones from the speficied **DIR**. If a file name matches **REGEXP** it will be +* `directory` loads zones from the specified **DIR**. If a file name matches **REGEXP** it will be used to extract the origin. **ORIGIN_TEMPLATE** will be used as a template for the origin. Strings like `{<number>}` are replaced with the respective matches in the file name, e.g. `{1}` is the first match, `{2}` is the second. The default is: `db\.(.*) {1}` i.e. from a file with the diff --git a/plugin/autopath/setup.go b/plugin/autopath/setup.go index 11c2b815d..edade9d20 100644 --- a/plugin/autopath/setup.go +++ b/plugin/autopath/setup.go @@ -72,7 +72,7 @@ func autoPathParse(c *caddy.Controller) (*AutoPath, string, error) { } ap.search = rc.Search plugin.Zones(ap.search).Normalize() - ap.search = append(ap.search, "") // sentinal value as demanded. + ap.search = append(ap.search, "") // sentinel value as demanded. } ap.Zones = zoneAndresolv[:len(zoneAndresolv)-1] if len(ap.Zones) == 0 { diff --git a/plugin/etcd/README.md b/plugin/etcd/README.md index 47ec5ab50..7a85fa60d 100644 --- a/plugin/etcd/README.md +++ b/plugin/etcd/README.md @@ -62,7 +62,7 @@ etcd [ZONES...] { ## Special Behaviour CoreDNS etcd plugin leverages directory structure to look for related entries. For example an entry `/skydns/test/skydns/mx` would have entries like `/skydns/test/skydns/mx/a`, `/skydns/test/skydns/mx/b` and so on. Similarly a directory `/skydns/test/skydns/mx1` will have all `mx1` entries. -With etcd3, support for [hierarchial keys are dropped](https://coreos.com/etcd/docs/latest/learning/api.html). This means there are no directories but only flat keys with prefixes in etcd3. To accomodate lookups, etcdv3 plugin now does a lookup on prefix `/skydns/test/skydns/mx/` to search for entries like `/skydns/test/skydns/mx/a` etc, and if there is nothing found on `/skydns/test/skydns/mx/`, it looks for `/skydns/test/skydns/mx` to find entries like `/skydns/test/skydns/mx1`. +With etcd3, support for [hierarchial keys are dropped](https://coreos.com/etcd/docs/latest/learning/api.html). This means there are no directories but only flat keys with prefixes in etcd3. To accommodate lookups, etcdv3 plugin now does a lookup on prefix `/skydns/test/skydns/mx/` to search for entries like `/skydns/test/skydns/mx/a` etc, and if there is nothing found on `/skydns/test/skydns/mx/`, it looks for `/skydns/test/skydns/mx` to find entries like `/skydns/test/skydns/mx1`. This causes two lookups from CoreDNS to etcdv3 in certain cases. diff --git a/plugin/etcd/msg/service.go b/plugin/etcd/msg/service.go index 68ffc544b..987fb14c7 100644 --- a/plugin/etcd/msg/service.go +++ b/plugin/etcd/msg/service.go @@ -164,7 +164,7 @@ func targetStrip(name string, targetStrip int) string { offset, end = dns.NextLabel(name, offset) } if end { - // We overshot the name, use the orignal one. + // We overshot the name, use the original one. offset = 0 } name = name[offset:] diff --git a/plugin/file/secondary.go b/plugin/file/secondary.go index 39f79f2b1..049fe0cda 100644 --- a/plugin/file/secondary.go +++ b/plugin/file/secondary.go @@ -103,7 +103,7 @@ func less(a, b uint32) bool { // Update updates the secondary zone according to its SOA. It will run for the life time of the server // and uses the SOA parameters. Every refresh it will check for a new SOA number. If that fails (for all -// server) it wil retry every retry interval. If the zone failed to transfer before the expire, the zone +// server) it will retry every retry interval. If the zone failed to transfer before the expire, the zone // will be marked expired. func (z *Zone) Update() error { // If we don't have a SOA, we don't have a zone, wait for it to appear. diff --git a/plugin/file/secondary_test.go b/plugin/file/secondary_test.go index 8db8353c4..b140dfe01 100644 --- a/plugin/file/secondary_test.go +++ b/plugin/file/secondary_test.go @@ -12,7 +12,7 @@ import ( // TODO(miek): should test notifies as well, ie start test server (a real coredns one)... // setup other test server that sends notify, see if CoreDNS comes calling for a zone -// tranfer +// transfer func TestLess(t *testing.T) { const ( diff --git a/plugin/file/xfr.go b/plugin/file/xfr.go index 3ad380902..18b6bb117 100644 --- a/plugin/file/xfr.go +++ b/plugin/file/xfr.go @@ -55,7 +55,7 @@ func (x Xfr) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (in return dns.RcodeSuccess, nil } -// Name implements the plugin.Hander interface. +// Name implements the plugin.Handler interface. func (x Xfr) Name() string { return "xfr" } const transferLength = 1000 // Start a new envelop after message reaches this size in bytes. Intentionally small to test multi envelope parsing. diff --git a/plugin/forward/connect.go b/plugin/forward/connect.go index 439caf932..6102bbe15 100644 --- a/plugin/forward/connect.go +++ b/plugin/forward/connect.go @@ -1,6 +1,6 @@ // Package forward implements a forwarding proxy. It caches an upstream net.Conn for some time, so if the same // client returns the upstream's Conn will be precached. Depending on how you benchmark this looks to be -// 50% faster than just openening a new connection for every client. It works with UDP and TCP and uses +// 50% faster than just opening a new connection for every client. It works with UDP and TCP and uses // inband healthchecking. package forward diff --git a/plugin/forward/forward.go b/plugin/forward/forward.go index 6eb2e0084..8e64831f4 100644 --- a/plugin/forward/forward.go +++ b/plugin/forward/forward.go @@ -1,6 +1,6 @@ // Package forward implements a forwarding proxy. It caches an upstream net.Conn for some time, so if the same // client returns the upstream's Conn will be precached. Depending on how you benchmark this looks to be -// 50% faster than just openening a new connection for every client. It works with UDP and TCP and uses +// 50% faster than just opening a new connection for every client. It works with UDP and TCP and uses // inband healthchecking. package forward diff --git a/plugin/forward/lookup.go b/plugin/forward/lookup.go index 94114647c..cba24f85f 100644 --- a/plugin/forward/lookup.go +++ b/plugin/forward/lookup.go @@ -1,6 +1,6 @@ // Package forward implements a forwarding proxy. It caches an upstream net.Conn for some time, so if the same // client returns the upstream's Conn will be precached. Depending on how you benchmark this looks to be -// 50% faster than just openening a new connection for every client. It works with UDP and TCP and uses +// 50% faster than just opening a new connection for every client. It works with UDP and TCP and uses // inband healthchecking. package forward diff --git a/plugin/forward/truncated.go b/plugin/forward/truncated.go index f9bd464d1..fb821d335 100644 --- a/plugin/forward/truncated.go +++ b/plugin/forward/truncated.go @@ -6,7 +6,7 @@ import ( "github.com/miekg/dns" ) -// truncated looks at the error and if truncated return a nil errror +// truncated looks at the error and if truncated return a nil error // and a possible reconstructed dns message if that was nil. func truncated(state request.Request, ret *dns.Msg, err error) (*dns.Msg, error) { // If you query for instance ANY isc.org; you get a truncated query back which miekg/dns fails to unpack diff --git a/plugin/hosts/hostsfile.go b/plugin/hosts/hostsfile.go index 1d87f82f7..af5e054fd 100644 --- a/plugin/hosts/hostsfile.go +++ b/plugin/hosts/hostsfile.go @@ -74,7 +74,7 @@ func (h *hostsMap) Len() int { type Hostsfile struct { sync.RWMutex - // list of zones we are authoritive for + // list of zones we are authoritative for Origins []string // hosts maps for lookups diff --git a/plugin/kubernetes/README.md b/plugin/kubernetes/README.md index 308d746f3..9bca6baab 100644 --- a/plugin/kubernetes/README.md +++ b/plugin/kubernetes/README.md @@ -92,7 +92,7 @@ kubernetes [ZONES...] { * `noendpoints` will turn off the serving of endpoint records by disabling the watch on endpoints. All endpoint queries and headless service queries will result in an NXDOMAIN. * `transfer` enables zone transfers. It may be specified multiples times. `To` signals the direction - (only `to` is alllow). **ADDRESS** must be denoted in CIDR notation (127.0.0.1/32 etc.) or just as + (only `to` is allow). **ADDRESS** must be denoted in CIDR notation (127.0.0.1/32 etc.) or just as plain addresses. The special wildcard `*` means: the entire internet. Sending DNS notifies is not supported. * `fallthrough` **[ZONES...]** If a query for a record in the zones for which the plugin is authoritative diff --git a/plugin/kubernetes/autopath.go b/plugin/kubernetes/autopath.go index cf5a7f06a..4d991a38f 100644 --- a/plugin/kubernetes/autopath.go +++ b/plugin/kubernetes/autopath.go @@ -35,7 +35,7 @@ func (k *Kubernetes) AutoPath(state request.Request) []string { } search = append(search, k.autoPathSearch...) - search = append(search, "") // sentinal + search = append(search, "") // sentinel return search } diff --git a/plugin/kubernetes/setup_test.go b/plugin/kubernetes/setup_test.go index 94562ce64..68e490d76 100644 --- a/plugin/kubernetes/setup_test.go +++ b/plugin/kubernetes/setup_test.go @@ -15,7 +15,7 @@ import ( func TestKubernetesParse(t *testing.T) { tests := []struct { input string // Corefile data as string - shouldErr bool // true if test case is exected to produce an error. + shouldErr bool // true if test case is expected to produce an error. expectedErrContent string // substring from the expected error. Empty for positive cases. expectedZoneCount int // expected count of defined zones. expectedNSCount int // expected count of namespaces. @@ -494,7 +494,7 @@ kubernetes cluster.local`, func TestKubernetesParseEndpointPodNames(t *testing.T) { tests := []struct { input string // Corefile data as string - shouldErr bool // true if test case is exected to produce an error. + shouldErr bool // true if test case is expected to produce an error. expectedErrContent string // substring from the expected error. Empty for positive cases. expectedEndpointMode bool }{ @@ -557,7 +557,7 @@ func TestKubernetesParseEndpointPodNames(t *testing.T) { func TestKubernetesParseNoEndpoints(t *testing.T) { tests := []struct { input string // Corefile data as string - shouldErr bool // true if test case is exected to produce an error. + shouldErr bool // true if test case is expected to produce an error. expectedErrContent string // substring from the expected error. Empty for positive cases. expectedEndpointsInit bool }{ @@ -619,7 +619,7 @@ func TestKubernetesParseNoEndpoints(t *testing.T) { func TestKubernetesParseIgnoreEmptyService(t *testing.T) { tests := []struct { input string // Corefile data as string - shouldErr bool // true if test case is exected to produce an error. + shouldErr bool // true if test case is expected to produce an error. expectedErrContent string // substring from the expected error. Empty for positive cases. expectedEndpointsInit bool }{ diff --git a/plugin/metadata/provider.go b/plugin/metadata/provider.go index cdb9c878a..9f6978dd2 100644 --- a/plugin/metadata/provider.go +++ b/plugin/metadata/provider.go @@ -6,7 +6,7 @@ // // Basic example: // -// Implement the Provder interface for a plugin: +// Implement the Provider interface for a plugin: // // func (p P) Metadata(ctx context.Context, state request.Request) context.Context { // cached := "" diff --git a/plugin/metrics/README.md b/plugin/metrics/README.md index c8c298399..b3fbc111f 100644 --- a/plugin/metrics/README.md +++ b/plugin/metrics/README.md @@ -60,7 +60,7 @@ Use an alternative address: } ~~~ -Or via an enviroment variable (this is supported throughout the Corefile): `export PORT=9253`, and +Or via an environment variable (this is supported throughout the Corefile): `export PORT=9253`, and then: ~~~ corefile diff --git a/plugin/metrics/vars/report.go b/plugin/metrics/vars/report.go index 8b619a5f9..d0c64b864 100644 --- a/plugin/metrics/vars/report.go +++ b/plugin/metrics/vars/report.go @@ -10,7 +10,7 @@ import ( "github.com/miekg/dns" ) -// Report reports the metrics data associcated with request. +// Report reports the metrics data associated with request. func Report(ctx context.Context, req request.Request, zone, rcode string, size int, start time.Time) { // Proto and Family. net := req.Proto() diff --git a/plugin/pkg/doh/doh.go b/plugin/pkg/doh/doh.go index e0a398e9c..812b89b1e 100644 --- a/plugin/pkg/doh/doh.go +++ b/plugin/pkg/doh/doh.go @@ -53,7 +53,7 @@ func NewRequest(method, url string, m *dns.Msg) (*http.Request, error) { } -// ResponseToMsg converts a http.Repsonse to a dns message. +// ResponseToMsg converts a http.Response to a dns message. func ResponseToMsg(resp *http.Response) (*dns.Msg, error) { defer resp.Body.Close() diff --git a/plugin/pkg/up/up.go b/plugin/pkg/up/up.go index e4752ce4d..e2c9fe2cd 100644 --- a/plugin/pkg/up/up.go +++ b/plugin/pkg/up/up.go @@ -18,7 +18,7 @@ type Probe struct { // Func is used to determine if a target is alive. If so this function must return nil. type Func func() error -// New returns a pointer to an intialized Probe. +// New returns a pointer to an initialized Probe. func New() *Probe { return &Probe{} } // Do will probe target, if a probe is already in progress this is a noop. diff --git a/plugin/pkg/watch/watcher.go b/plugin/pkg/watch/watcher.go index 59474a7bc..86a952db2 100644 --- a/plugin/pkg/watch/watcher.go +++ b/plugin/pkg/watch/watcher.go @@ -169,7 +169,7 @@ func (w *Manager) Stop() { wr := pb.WatchResponse{WatchId: id, Canceled: true} err := stream.Send(&wr) if err != nil { - log.Warningf("Error notifiying client of cancellation: %s\n", err) + log.Warningf("Error notifying client of cancellation: %s\n", err) } } delete(w.watches, wn) diff --git a/plugin/proxy/README.md b/plugin/proxy/README.md index f9dc3493b..b108b52a9 100644 --- a/plugin/proxy/README.md +++ b/plugin/proxy/README.md @@ -99,7 +99,7 @@ If monitoring is enabled (via the *prometheus* directive) then the following met Where `proxy_proto` is the protocol used (`dns` or `grpc`) and `to` is **TO** specified in the config, `proto` is the protocol used by the incoming query ("tcp" or "udp"), family the transport family ("1" for IPv4, and "2" for IPv6). `Server` is the server responsible for the -request (and metric). See the documention in the metrics plugin. +request (and metric). See the documentation in the metrics plugin. ## Examples diff --git a/plugin/proxy/proxy.go b/plugin/proxy/proxy.go index b12e37f11..002007c98 100644 --- a/plugin/proxy/proxy.go +++ b/plugin/proxy/proxy.go @@ -123,7 +123,7 @@ func (p Proxy) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) ( // Note this keeps looping and trying until tryDuration is hit, at which point our client // might be long gone... if oe.Timeout() { - // Our upstream's upstream is problably messing up, continue with next selected + // Our upstream's upstream is probably messing up, continue with next selected // host - which my be the *same* one as we don't set any uh.Fails. continue } diff --git a/plugin/proxy/upstream_test.go b/plugin/proxy/upstream_test.go index 6fec3e30a..3c788b882 100644 --- a/plugin/proxy/upstream_test.go +++ b/plugin/proxy/upstream_test.go @@ -269,7 +269,7 @@ junky resolv.conf path, rm, err := test.TempFile(".", tc.filedata) if err != nil { - t.Fatalf("Test %d could not creat temp file %v", i, err) + t.Fatalf("Test %d could not create temp file %v", i, err) } defer rm() diff --git a/plugin/reload/README.md b/plugin/reload/README.md index eb06bb71c..625e4b025 100644 --- a/plugin/reload/README.md +++ b/plugin/reload/README.md @@ -84,7 +84,7 @@ is already listening on that port. The process reloads and performs the followin 3. fail to start a new listener on 443 4. fail loading the new Corefile, abort and keep using the old process -After the aborted attempt to reload we are left with the old proceses running, but the listener is +After the aborted attempt to reload we are left with the old processes running, but the listener is closed in step 1; so the health endpoint is broken. The same can hopen in the prometheus metrics plugin. In general be careful with assigning new port and expecting reload to work fully. diff --git a/plugin/rewrite/name.go b/plugin/rewrite/name.go index cd35d6b16..23da0b0b5 100644 --- a/plugin/rewrite/name.go +++ b/plugin/rewrite/name.go @@ -197,7 +197,7 @@ func (rule *substringNameRule) GetResponseRule() ResponseRule { return ResponseR // GetResponseRule return a rule to rewrite the response with. func (rule *regexNameRule) GetResponseRule() ResponseRule { return rule.ResponseRule } -// validName returns true if s is valid domain name and shortern than 256 characters. +// validName returns true if s is valid domain name and shorter than 256 characters. func validName(s string) bool { _, ok := dns.IsDomainName(s) if !ok { diff --git a/plugin/root/root_test.go b/plugin/root/root_test.go index 618e6ab2e..3b4a4df04 100644 --- a/plugin/root/root_test.go +++ b/plugin/root/root_test.go @@ -89,7 +89,7 @@ func TestRoot(t *testing.T) { } } -// getTempDirPath returnes the path to the system temp directory. If it does not exists - an error is returned. +// getTempDirPath returns the path to the system temp directory. If it does not exist - an error is returned. func getTempDirPath() (string, error) { tempDir := os.TempDir() _, err := os.Stat(tempDir) diff --git a/plugin/template/template_test.go b/plugin/template/template_test.go index 045eba772..1b8b515d8 100644 --- a/plugin/template/template_test.go +++ b/plugin/template/template_test.go @@ -187,7 +187,7 @@ func TestHandler(t *testing.T) { return fmt.Errorf("expected 1 answer, got %v", len(r.Answer)) } if r.Answer[0].Header().Rrtype != dns.TypeA { - return fmt.Errorf("expected an A record anwser, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) + return fmt.Errorf("expected an A record answer, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) } if r.Answer[0].(*dns.A).A.String() != "10.95.12.8" { return fmt.Errorf("expected an A record for 10.95.12.8, got %v", r.Answer[0].String()) @@ -206,7 +206,7 @@ func TestHandler(t *testing.T) { return fmt.Errorf("expected 1 answer, got %v", len(r.Answer)) } if r.Answer[0].Header().Rrtype != dns.TypeMX { - return fmt.Errorf("expected an A record anwser, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) + return fmt.Errorf("expected an A record answer, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) } if len(r.Extra) != 1 { return fmt.Errorf("expected 1 extra record, got %v", len(r.Extra)) @@ -228,7 +228,7 @@ func TestHandler(t *testing.T) { return fmt.Errorf("expected 1 answer, got %v", len(r.Answer)) } if r.Answer[0].Header().Rrtype != dns.TypeA { - return fmt.Errorf("expected an A record anwser, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) + return fmt.Errorf("expected an A record answer, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) } if len(r.Extra) != 1 { return fmt.Errorf("expected 1 extra record, got %v", len(r.Extra)) @@ -257,7 +257,7 @@ func TestHandler(t *testing.T) { return fmt.Errorf("expected 1 answer, got %v", len(r.Answer)) } if r.Answer[0].Header().Rrtype != dns.TypeSOA { - return fmt.Errorf("expected an SOA record anwser, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) + return fmt.Errorf("expected an SOA record answer, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) } return nil }, @@ -338,7 +338,7 @@ func TestMultiSection(t *testing.T) { template CH TXT coredns.invalid { answer "{{ .Name }} 60 CH TXT \"test\"" } - # Anwser example. ip templates and fallthrough otherwise + # Answer example. ip templates and fallthrough otherwise template IN A example { match ^ip-10-(?P<b>[0-9]*)-(?P<c>[0-9]*)-(?P<d>[0-9]*)[.]example[.]$ answer "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" diff --git a/request/request.go b/request/request.go index 3ee4c2126..bcf6570be 100644 --- a/request/request.go +++ b/request/request.go @@ -267,7 +267,7 @@ func (r *Request) Scrub(reply *dns.Msg) (*dns.Msg, Result) { sub = optLen } - // substract to make spaces for re-added EDNS0 OPT RR. + // subtract to make spaces for re-added EDNS0 OPT RR. re := len(reply.Extra) - sub size -= sub diff --git a/test/proxy_health_test.go b/test/proxy_health_test.go index b0677691c..11ae1a4ee 100644 --- a/test/proxy_health_test.go +++ b/test/proxy_health_test.go @@ -97,7 +97,7 @@ func TestProxyThreeWay(t *testing.T) { continue } // We would previously get SERVFAIL, so just getting answers here - // is a good sign. The actuall timeouts are handled in the err != nil case + // is a good sign. The actual timeouts are handled in the err != nil case // above. if r.Rcode != dns.RcodeSuccess { t.Fatalf("Expected success rcode, got %d", r.Rcode) diff --git a/test/readme_test.go b/test/readme_test.go index 4d216b8c8..a2ba1c8ca 100644 --- a/test/readme_test.go +++ b/test/readme_test.go @@ -108,7 +108,7 @@ func corefileFromReadme(readme string) ([]*Input, error) { } if corefile { - temp += line + "\n" // readd newline stripped by s.Text() + temp += line + "\n" // read newline stripped by s.Text() } } |