validation: allow trailing period in dns search
The trailing period tells the resolver to stop immediately instead of trying recursively. With that said, trailing period should be acceptable in searches.
This commit is contained in:
@@ -5873,11 +5873,18 @@ func TestValidatePodDNSConfig(t *testing.T) {
|
||||
},
|
||||
expectedError: false,
|
||||
},
|
||||
{
|
||||
desc: "valid: 1 search path with trailing period",
|
||||
dnsConfig: &core.PodDNSConfig{
|
||||
Searches: []string{"custom."},
|
||||
},
|
||||
expectedError: false,
|
||||
},
|
||||
{
|
||||
desc: "valid: 3 nameservers and 6 search paths",
|
||||
dnsConfig: &core.PodDNSConfig{
|
||||
Nameservers: []string{"127.0.0.1", "10.0.0.10", "8.8.8.8"},
|
||||
Searches: []string{"custom", "mydomain.com", "local", "cluster.local", "svc.cluster.local", "default.svc.cluster.local"},
|
||||
Searches: []string{"custom", "mydomain.com", "local", "cluster.local", "svc.cluster.local", "default.svc.cluster.local."},
|
||||
},
|
||||
expectedError: false,
|
||||
},
|
||||
|
Reference in New Issue
Block a user