Fix some lint errors that resulted from merging main
Signed-off-by: Ryan Richard <richardry@vmware.com>
This commit is contained in:
parent
f8111db5ff
commit
ccb17843c1
@ -25,7 +25,7 @@ func (c *conciergeMode) String() string {
|
|||||||
switch *c {
|
switch *c {
|
||||||
case modeImpersonationProxy:
|
case modeImpersonationProxy:
|
||||||
return "ImpersonationProxy"
|
return "ImpersonationProxy"
|
||||||
case modeTokenCredentialRequestAPI:
|
case modeTokenCredentialRequestAPI, modeUnknown:
|
||||||
return "TokenCredentialRequestAPI"
|
return "TokenCredentialRequestAPI"
|
||||||
default:
|
default:
|
||||||
return "TokenCredentialRequestAPI"
|
return "TokenCredentialRequestAPI"
|
||||||
|
@ -251,14 +251,14 @@ func configureConcierge(credentialIssuer *configv1alpha1.CredentialIssuer, authe
|
|||||||
|
|
||||||
// Autodiscover the --concierge-mode.
|
// Autodiscover the --concierge-mode.
|
||||||
if flags.concierge.mode == modeUnknown {
|
if flags.concierge.mode == modeUnknown {
|
||||||
|
switch {
|
||||||
if credentialIssuer.Status.KubeConfigInfo != nil {
|
case credentialIssuer.Status.KubeConfigInfo != nil:
|
||||||
// Prefer the TokenCredentialRequest API if available.
|
// Prefer the TokenCredentialRequest API if available.
|
||||||
flags.concierge.mode = modeTokenCredentialRequestAPI
|
flags.concierge.mode = modeTokenCredentialRequestAPI
|
||||||
} else if credentialIssuer.Status.ImpersonationProxyInfo != nil {
|
case credentialIssuer.Status.ImpersonationProxyInfo != nil:
|
||||||
// Otherwise prefer the impersonation proxy if it seems configured.
|
// Otherwise prefer the impersonation proxy if it seems configured.
|
||||||
flags.concierge.mode = modeImpersonationProxy
|
flags.concierge.mode = modeImpersonationProxy
|
||||||
} else {
|
default:
|
||||||
return fmt.Errorf("could not autodiscover --concierge-mode and none was provided")
|
return fmt.Errorf("could not autodiscover --concierge-mode and none was provided")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user