Merge pull request #74686 from zhouhaibing089/add-trailing-period
validation: allow trailing period in dns search
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user