diff options
author | 2017-11-13 21:51:51 +0000 | |
---|---|---|
committer | 2017-11-13 21:51:51 +0000 | |
commit | c37bf56b1e30ebc9bc94efca0ea12158d5648463 (patch) | |
tree | a245ff90b070b8d4b8da9f492c701e6f367b3e1d /plugin/kubernetes/ns_test.go | |
parent | 9018451dd30caf40f4c7e5e6e5d614c31b2f42e6 (diff) | |
download | coredns-c37bf56b1e30ebc9bc94efca0ea12158d5648463.tar.gz coredns-c37bf56b1e30ebc9bc94efca0ea12158d5648463.tar.zst coredns-c37bf56b1e30ebc9bc94efca0ea12158d5648463.zip |
plugin/kubernetes: correctly set NODATA for ns (#1229)
* plugin/kubernetes: Add GetNamespaceByName
A bare or wildcard query for just the namespace should return NODATA,
not NXDOMAIN, otherwise we deny the entirety of the names under the
namespace.
Add test to check for this in pod verified mode.
* Review
More comments and move namespace code to namespace.go
Diffstat (limited to 'plugin/kubernetes/ns_test.go')
-rw-r--r-- | plugin/kubernetes/ns_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/kubernetes/ns_test.go b/plugin/kubernetes/ns_test.go index 70e297054..853ef9288 100644 --- a/plugin/kubernetes/ns_test.go +++ b/plugin/kubernetes/ns_test.go @@ -55,6 +55,9 @@ func (APIConnTest) EpIndexReverse(string) []*api.Endpoints { } func (APIConnTest) GetNodeByName(name string) (*api.Node, error) { return &api.Node{}, nil } +func (APIConnTest) GetNamespaceByName(name string) (*api.Namespace, error) { + return &api.Namespace{}, nil +} func TestNsAddr(t *testing.T) { |