mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Honor --use-service-account-credentials and warn when missing private key
This commit is contained in:
		@@ -163,7 +163,12 @@ func Run(s *options.CMServer) error {
 | 
				
			|||||||
			ClientConfig: kubeconfig,
 | 
								ClientConfig: kubeconfig,
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		var clientBuilder controller.ControllerClientBuilder
 | 
							var clientBuilder controller.ControllerClientBuilder
 | 
				
			||||||
		if len(s.ServiceAccountKeyFile) > 0 && s.UseServiceAccountCredentials {
 | 
							if s.UseServiceAccountCredentials {
 | 
				
			||||||
 | 
								if len(s.ServiceAccountKeyFile) > 0 {
 | 
				
			||||||
 | 
									// It's possible another controller process is creating the tokens for us.
 | 
				
			||||||
 | 
									// If one isn't, we'll timeout and exit when our client builder is unable to create the tokens.
 | 
				
			||||||
 | 
									glog.Warningf("--use-service-account-credentials was specified without providing a --service-account-private-key-file")
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			clientBuilder = controller.SAControllerClientBuilder{
 | 
								clientBuilder = controller.SAControllerClientBuilder{
 | 
				
			||||||
				ClientConfig:         restclient.AnonymousClientConfig(kubeconfig),
 | 
									ClientConfig:         restclient.AnonymousClientConfig(kubeconfig),
 | 
				
			||||||
				CoreClient:           kubeClient.CoreV1(),
 | 
									CoreClient:           kubeClient.CoreV1(),
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user