diff --git a/cmd/kube-controller-manager/app/controllermanager.go b/cmd/kube-controller-manager/app/controllermanager.go index 0c7659cbb4..bf6539edd9 100644 --- a/cmd/kube-controller-manager/app/controllermanager.go +++ b/cmd/kube-controller-manager/app/controllermanager.go @@ -163,7 +163,12 @@ func Run(s *options.CMServer) error { ClientConfig: kubeconfig, } 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{ ClientConfig: restclient.AnonymousClientConfig(kubeconfig), CoreClient: kubeClient.CoreV1(),