mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-20 17:38:50 +00:00
webhook: support exec auth plugin
This allows webhook static kubeconfig to use an exec auth plugin to configure authentication. https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#authenticate-apiservers
This commit is contained in:
@@ -196,6 +196,9 @@ func restConfigFromKubeconfig(configAuthInfo *clientcmdapi.AuthInfo) (*rest.Conf
|
|||||||
config.Username = configAuthInfo.Username
|
config.Username = configAuthInfo.Username
|
||||||
config.Password = configAuthInfo.Password
|
config.Password = configAuthInfo.Password
|
||||||
}
|
}
|
||||||
|
if configAuthInfo.Exec != nil {
|
||||||
|
config.ExecProvider = configAuthInfo.Exec.DeepCopy()
|
||||||
|
}
|
||||||
if configAuthInfo.AuthProvider != nil {
|
if configAuthInfo.AuthProvider != nil {
|
||||||
return nil, fmt.Errorf("auth provider not supported")
|
return nil, fmt.Errorf("auth provider not supported")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user