mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-25 12:17:52 +00:00
Adding non persistent review test
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
This commit is contained in:
@@ -68,6 +68,12 @@ func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation
|
||||
return nil, apierrors.NewBadRequest(fmt.Sprintf("token is required for TokenReview in authentication"))
|
||||
}
|
||||
|
||||
if createValidation != nil {
|
||||
if err := createValidation(obj.DeepCopyObject()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if r.tokenAuthenticator == nil {
|
||||
return tokenReview, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user