mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-30 17:53:21 -04:00 
			
		
		
		
	make ignore empty work with ext svc types (#2823)
This commit is contained in:
		
				
					committed by
					
						 John Belamaric
						John Belamaric
					
				
			
			
				
	
			
			
			
						parent
						
							6e1c57acfa
						
					
				
				
					commit
					c147e20373
				
			| @@ -439,7 +439,9 @@ func (k *Kubernetes) findServices(r recordRequest, zone string) (services []msg. | ||||
| 			continue | ||||
| 		} | ||||
|  | ||||
| 		if k.opts.ignoreEmptyService && svc.ClusterIP != api.ClusterIPNone { | ||||
| 		// If "ignore empty_service" option is set and no endpoints exist, return NXDOMAIN unless | ||||
| 		// it's a headless or externalName service (covered below). | ||||
| 		if k.opts.ignoreEmptyService && svc.ClusterIP != api.ClusterIPNone && svc.Type != api.ServiceTypeExternalName { | ||||
| 			// serve NXDOMAIN if no endpoint is able to answer | ||||
| 			podsCount := 0 | ||||
| 			for _, ep := range endpointsListFunc() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user