Kubernetes srv (#823)
* Treat absence of port/service in SRV as wildcard Normally, a SRV-request should have the form _<service>._<port>.<name>.<zone>. The k8s peer-finder which is used for bootstrapping by some applications will however query for SRV at <name>.<zone>. To compensate for this behaviour, treat the absence of _<service> and _<port> as wildcards. * Modified tests with new SRV behaviour Added a testcase for a SRV request without port & service Removed now valid query from invalidSRVQueries * Forgot to run gofmt on test/kubernetes_test.go
This commit is contained in:
parent
2c0fc3182c
commit
d0d7f4c89a
3 changed files with 35 additions and 25 deletions
|
@ -227,7 +227,6 @@ func TestParseRequest(t *testing.T) {
|
|||
}
|
||||
|
||||
invalidSRVQueries := []string{
|
||||
"webs.mynamespace.svc.inter.webs.test.", // SRV requests must have port and protocol
|
||||
"_http._pcp.webs.mynamespace.svc.inter.webs.test.", // SRV protocol must be tcp or udp
|
||||
"_http._tcp.ep.webs.ns.svc.inter.webs.test.", // SRV requests cannot have an endpoint
|
||||
"_*._*.webs.mynamespace.svc.inter.webs.test.", // SRV request with invalid wildcards
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue