mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Remove the generation altering code - validate an update for a PDB by running ValidatePodDisruptionBudget only.
This commit is contained in:
@@ -41,17 +41,6 @@ func ValidatePodDisruptionBudget(pdb *policy.PodDisruptionBudget) field.ErrorLis
|
||||
return allErrs
|
||||
}
|
||||
|
||||
func ValidatePodDisruptionBudgetUpdate(pdb, oldPdb *policy.PodDisruptionBudget) field.ErrorList {
|
||||
restoreGeneration := pdb.Generation
|
||||
pdb.Generation = oldPdb.Generation
|
||||
|
||||
allErrs := ValidatePodDisruptionBudgetSpec(pdb.Spec, field.NewPath("spec"))
|
||||
allErrs = append(allErrs, ValidatePodDisruptionBudgetStatus(pdb.Status, field.NewPath("status"))...)
|
||||
|
||||
pdb.Generation = restoreGeneration
|
||||
return allErrs
|
||||
}
|
||||
|
||||
func ValidatePodDisruptionBudgetSpec(spec policy.PodDisruptionBudgetSpec, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user