Commit 6cc1816c authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #51034 from wlan0/master

Automatic merge from submit-queue (batch tested with PRs 51034, 53239). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix conditional for warning while starting KCM without secret file @liggitt @spiffxp @lavalamp Fixes #53291 A small bug was introduced in this PR - https://github.com/kubernetes/kubernetes/pull/50288, where the warning message is printed when the file is specified, and it is not printed if it is left blank - exactly the opposite of the intended behavior. This fixes that. ``` release-note-none ```
parents d2bbeb66 fb0b57ee
...@@ -131,7 +131,7 @@ func Run(s *options.CMServer) error { ...@@ -131,7 +131,7 @@ func Run(s *options.CMServer) error {
} }
var clientBuilder controller.ControllerClientBuilder var clientBuilder controller.ControllerClientBuilder
if s.UseServiceAccountCredentials { if s.UseServiceAccountCredentials {
if len(s.ServiceAccountKeyFile) > 0 { if len(s.ServiceAccountKeyFile) == 0 {
// It's possible another controller process is creating the tokens for us. // 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. // 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") glog.Warningf("--use-service-account-credentials was specified without providing a --service-account-private-key-file")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment