allErrs=append(allErrs,field.Forbidden(field.NewPath("metadata","name"),"priority class names with '"+scheduling.SystemPriorityClassPrefix+"' prefix are reserved for system use only. error: "+err.Error()))
// Non-system critical priority classes are not allowed to have a value larger than HighestUserDefinablePriority.
allErrs=append(allErrs,field.Forbidden(field.NewPath("value"),fmt.Sprintf("maximum allowed value of a user defined priority is %v",scheduling.HighestUserDefinablePriority)))
returnnil,false,apierrors.NewForbidden(scheduling.Resource("priorityclasses"),spc.Name,errors.New("this is a system priority class and cannot be deleted"))
returnadmission.NewForbidden(a,fmt.Errorf("priority class names with '"+scheduling.SystemPriorityClassPrefix+"' prefix are reserved for system use only"))
}
}
// If the new PriorityClass tries to be the default priority, make sure that no other priority class is marked as default.