Merge pull request #74686 from zhouhaibing089/add-trailing-period

validation: allow trailing period in dns search
This commit is contained in:
Kubernetes Prow Robot
2019-03-19 20:15:06 -07:00
committed by GitHub
2 changed files with 12 additions and 1 deletions

View File

@@ -5877,11 +5877,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,
},