mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Headless services should not need to declare ports
This commit is contained in:
		@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user