mirror of https://github.com/k3s-io/k3s
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 ```pull/6/head
commit
6cc1816c64
|
@ -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")
|
||||||
|
|
Loading…
Reference in New Issue