mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 10:13:14 -04:00 
			
		
		
		
	Enable use of a service account in-cluster. (#349)
This commit is contained in:
		
				
					committed by
					
						 Miek Gieben
						Miek Gieben
					
				
			
			
				
	
			
			
			
						parent
						
							9a048663cf
						
					
				
				
					commit
					14dc376ee7
				
			| @@ -50,6 +50,12 @@ func (k *Kubernetes) getClientConfig() (*restclient.Config, error) { | ||||
| 	authinfo := clientcmdapi.AuthInfo{} | ||||
| 	if len(k.APIEndpoint) > 0 { | ||||
| 		clusterinfo.Server = k.APIEndpoint | ||||
| 	} else { | ||||
| 		cc, err := restclient.InClusterConfig() | ||||
| 		if err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| 		return cc, err | ||||
| 	} | ||||
| 	if len(k.APICertAuth) > 0 { | ||||
| 		clusterinfo.CertificateAuthority = k.APICertAuth | ||||
|   | ||||
		Reference in New Issue
	
	Block a user