Rebase allow updates to pdbs to latest upstream master
This commit is contained in:
@@ -19,7 +19,6 @@ package validation
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -43,14 +42,10 @@ func ValidatePodDisruptionBudget(pdb *policy.PodDisruptionBudget) field.ErrorLis
|
||||
}
|
||||
|
||||
func ValidatePodDisruptionBudgetUpdate(pdb, oldPdb *policy.PodDisruptionBudget) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
|
||||
restoreGeneration := pdb.Generation
|
||||
pdb.Generation = oldPdb.Generation
|
||||
|
||||
if !reflect.DeepEqual(pdb.Spec, oldPdb.Spec) {
|
||||
allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), "updates to poddisruptionbudget spec are forbidden."))
|
||||
}
|
||||
allErrs := ValidatePodDisruptionBudgetSpec(pdb.Spec, field.NewPath("spec"))
|
||||
allErrs = append(allErrs, ValidatePodDisruptionBudgetStatus(pdb.Status, field.NewPath("status"))...)
|
||||
|
||||
pdb.Generation = restoreGeneration
|
||||
|
Reference in New Issue
Block a user