mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49: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:
parent
33f907a4df
commit
8b45296661
@ -196,6 +196,9 @@ func restConfigFromKubeconfig(configAuthInfo *clientcmdapi.AuthInfo) (*rest.Conf
|
||||
config.Username = configAuthInfo.Username
|
||||
config.Password = configAuthInfo.Password
|
||||
}
|
||||
if configAuthInfo.Exec != nil {
|
||||
config.ExecProvider = configAuthInfo.Exec.DeepCopy()
|
||||
}
|
||||
if configAuthInfo.AuthProvider != nil {
|
||||
return nil, fmt.Errorf("auth provider not supported")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user