mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #35098 from kargakis/redundant-deep-copy
Automatic merge from submit-queue registry: remove redundant PDB deep-copy from eviction REST
This commit is contained in:
commit
5863a3a3de
@ -107,14 +107,8 @@ func (r *EvictionREST) checkAndDecrement(namespace string, pdb policy.PodDisrupt
|
||||
return false, nil
|
||||
}
|
||||
|
||||
copied, err := api.Scheme.DeepCopy(pdb)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
newPDB := copied.(policy.PodDisruptionBudget)
|
||||
newPDB.Status.PodDisruptionAllowed = false
|
||||
|
||||
if _, err := r.podDisruptionBudgetClient.PodDisruptionBudgets(namespace).Update(&newPDB); err != nil {
|
||||
pdb.Status.PodDisruptionAllowed = false
|
||||
if _, err := r.podDisruptionBudgetClient.PodDisruptionBudgets(namespace).Update(&pdb); err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user