mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Copy object sent to validating admission
This commit is contained in:
parent
8ec6167f61
commit
2a5c25aca5
@ -89,7 +89,7 @@ func (r *EvictionREST) Create(ctx context.Context, obj runtime.Object, createVal
|
||||
pod := obj.(*api.Pod)
|
||||
|
||||
if createValidation != nil {
|
||||
if err := createValidation(eviction); err != nil {
|
||||
if err := createValidation(eviction.DeepCopyObject()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ func (r *BindingREST) Create(ctx context.Context, obj runtime.Object, createVali
|
||||
}
|
||||
|
||||
if createValidation != nil {
|
||||
if err := createValidation(binding); err != nil {
|
||||
if err := createValidation(binding.DeepCopyObject()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user