aboutsummaryrefslogtreecommitdiff
path: root/plugin/etcd
diff options
context:
space:
mode:
authorGravatar Karsten Weiss <knweiss@gmail.com> 2018-08-14 17:55:55 +0200
committerGravatar Yong Tang <yong.tang.github@outlook.com> 2018-08-14 08:55:55 -0700
commit6d8a078704567821513e8ccab29fdc5baee809f7 (patch)
tree98f3d865bfa5b853780129647ca8be7027820acc /plugin/etcd
parent18a77cd04557b810eba96a7239d39ee2d7a92157 (diff)
downloadcoredns-6d8a078704567821513e8ccab29fdc5baee809f7.tar.gz
coredns-6d8a078704567821513e8ccab29fdc5baee809f7.tar.zst
coredns-6d8a078704567821513e8ccab29fdc5baee809f7.zip
Typo fixes (#2031)
Diffstat (limited to 'plugin/etcd')
-rw-r--r--plugin/etcd/README.md2
-rw-r--r--plugin/etcd/msg/service.go2
2 files changed, 2 insertions, 2 deletions
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:]