Fix some lint errors that resulted from merging main

Signed-off-by: Ryan Richard <richardry@vmware.com>
This commit is contained in:
Margo Crawford 2021-02-25 15:06:24 -08:00 committed by Ryan Richard
parent f8111db5ff
commit ccb17843c1
2 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,7 @@ func (c *conciergeMode) String() string {
switch *c {
case modeImpersonationProxy:
return "ImpersonationProxy"
case modeTokenCredentialRequestAPI:
case modeTokenCredentialRequestAPI, modeUnknown:
return "TokenCredentialRequestAPI"
default:
return "TokenCredentialRequestAPI"

View File

@ -251,14 +251,14 @@ func configureConcierge(credentialIssuer *configv1alpha1.CredentialIssuer, authe
// Autodiscover the --concierge-mode.
if flags.concierge.mode == modeUnknown {
if credentialIssuer.Status.KubeConfigInfo != nil {
switch {
case credentialIssuer.Status.KubeConfigInfo != nil:
// Prefer the TokenCredentialRequest API if available.
flags.concierge.mode = modeTokenCredentialRequestAPI
} else if credentialIssuer.Status.ImpersonationProxyInfo != nil {
case credentialIssuer.Status.ImpersonationProxyInfo != nil:
// Otherwise prefer the impersonation proxy if it seems configured.
flags.concierge.mode = modeImpersonationProxy
} else {
default:
return fmt.Errorf("could not autodiscover --concierge-mode and none was provided")
}
}