mirror of
https://github.com/coredns/coredns.git
synced 2025-10-29 01:04:15 -04:00
plugin/federation: handle missing avail-zone/region labels better (#2092)
* handle missing avail-zone/region labels better * oops forgot a file
This commit is contained in:
committed by
Miek Gieben
parent
b42eae7a04
commit
0bf8b81cb7
@@ -8,7 +8,9 @@ import (
|
||||
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
type APIConnFederationTest struct{}
|
||||
type APIConnFederationTest struct {
|
||||
zone, region string
|
||||
}
|
||||
|
||||
func (APIConnFederationTest) HasSynced() bool { return true }
|
||||
func (APIConnFederationTest) Run() { return }
|
||||
@@ -176,13 +178,13 @@ func (APIConnFederationTest) EndpointsList() []*api.Endpoints {
|
||||
return eps
|
||||
}
|
||||
|
||||
func (APIConnFederationTest) GetNodeByName(name string) (*api.Node, error) {
|
||||
func (a APIConnFederationTest) GetNodeByName(name string) (*api.Node, error) {
|
||||
return &api.Node{
|
||||
ObjectMeta: meta.ObjectMeta{
|
||||
Name: "test.node.foo.bar",
|
||||
Labels: map[string]string{
|
||||
kubernetes.LabelRegion: "fd-r",
|
||||
kubernetes.LabelZone: "fd-az",
|
||||
kubernetes.LabelRegion: a.region,
|
||||
kubernetes.LabelZone: a.zone,
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
|
||||
Reference in New Issue
Block a user