Add WarningsOnCreate,WarningsOnUpdate

This commit is contained in:
Jordan Liggitt
2021-04-30 21:46:54 -04:00
parent ae2546907f
commit 8c8a4cf3e4
58 changed files with 680 additions and 0 deletions

View File

@@ -63,6 +63,11 @@ func (priorityClassStrategy) Validate(ctx context.Context, obj runtime.Object) f
return validation.ValidatePriorityClass(pc)
}
// WarningsOnCreate returns warnings for the creation of the given object.
func (priorityClassStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string {
return nil
}
// Canonicalize normalizes the object after validation.
func (priorityClassStrategy) Canonicalize(obj runtime.Object) {}
@@ -76,6 +81,11 @@ func (priorityClassStrategy) ValidateUpdate(ctx context.Context, obj, old runtim
return validation.ValidatePriorityClassUpdate(obj.(*scheduling.PriorityClass), old.(*scheduling.PriorityClass))
}
// WarningsOnUpdate returns warnings for the given update.
func (priorityClassStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string {
return nil
}
// AllowUnconditionalUpdate is the default update policy for PriorityClass objects.
func (priorityClassStrategy) AllowUnconditionalUpdate() bool {
return true