Allow trailing dot for service.spec.externalName

This commit is contained in:
Tobias Hintze
2019-05-24 17:32:38 +02:00
parent da31c50da1
commit 8829efaeb0
2 changed files with 14 additions and 2 deletions

View File

@@ -9306,6 +9306,15 @@ func TestValidateService(t *testing.T) {
},
numErrs: 0,
},
{
name: "valid ExternalName (trailing dot)",
tweakSvc: func(s *core.Service) {
s.Spec.Type = core.ServiceTypeExternalName
s.Spec.ClusterIP = ""
s.Spec.ExternalName = "foo.bar.example.com."
},
numErrs: 0,
},
{
name: "invalid ExternalName clusterIP (valid IP)",
tweakSvc: func(s *core.Service) {