Headless services should not need to declare ports

This commit is contained in:
Mike Danese
2015-11-06 09:53:57 -08:00
parent 0b183f43fd
commit 09295cd664
2 changed files with 9 additions and 1 deletions

View File

@@ -1792,6 +1792,14 @@ func TestValidateService(t *testing.T) {
},
numErrs: 1,
},
{
name: "missing ports but headless",
tweakSvc: func(s *api.Service) {
s.Spec.Ports = nil
s.Spec.ClusterIP = api.ClusterIPNone
},
numErrs: 0,
},
{
name: "empty port[0] name",
tweakSvc: func(s *api.Service) {