Also set haveUserInfo=true in case --user was provided in "kops export kubecfg"

Without setting it to true, --user is completely ignored.
This commit is contained in:
Alexander Block 2021-06-16 09:36:47 +02:00
parent 9753bd5b65
commit 6ae8d8cc9e
1 changed files with 1 additions and 0 deletions

View File

@ -163,6 +163,7 @@ func (b *KubeconfigBuilder) WriteKubecfg(configAccess clientcmd.ConfigAccess) er
if config.AuthInfos[b.User] == nil {
return fmt.Errorf("could not find user %q", b.User)
}
haveUserInfo = true
}
// If we have a bearer token, also create a credential entry with basic auth