mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	mw/kubernetes: remove kService and kPod
Remove the intermediate step of gathering everyhing in a kPod and kService and extracting the msg.Service from there. Now findPods and findServices return []msg.Service. This cuts down on the code and also removed the double looping of finding the data we need, so it should be faster.
This commit is contained in:
		| @@ -26,7 +26,7 @@ type recordRequest struct { | ||||
| // parseRequest parses the qname to find all the elements we need for querying k8s. Anything | ||||
| // that is not parsed will have the wildcard "*" value (except r.endpoint). | ||||
| // Potential underscores are stripped from _port and _protocol. | ||||
| func (k *Kubernetes) parseRequest(state request.Request) (r recordRequest, err error) { | ||||
| func parseRequest(state request.Request) (r recordRequest, err error) { | ||||
| 	// 3 Possible cases: | ||||
| 	// 1. _port._protocol.service.namespace.pod|svc.zone | ||||
| 	// 2. (endpoint): endpoint.service.namespace.pod|svc.zone | ||||
|   | ||||
		Reference in New Issue
	
	Block a user