Skip to content

Commit 8b45296

Browse files
committed
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
1 parent 33f907a commit 8b45296

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

staging/src/k8s.io/apiserver/pkg/util/webhook/authentication.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ func restConfigFromKubeconfig(configAuthInfo *clientcmdapi.AuthInfo) (*rest.Conf
196196
config.Username = configAuthInfo.Username
197197
config.Password = configAuthInfo.Password
198198
}
199+
if configAuthInfo.Exec != nil {
200+
config.ExecProvider = configAuthInfo.Exec.DeepCopy()
201+
}
199202
if configAuthInfo.AuthProvider != nil {
200203
return nil, fmt.Errorf("auth provider not supported")
201204
}

0 commit comments

Comments
 (0)