registry: remove redundant PDB deep-copy from eviction REST
This commit is contained in:
parent
66a0aa64c2
commit
3d23db53e6
@ -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