returnfmt.Errorf("%s max limit to request ratio per %s is %s, but provided ratio is %f.",resourceName,limitType,enforced.String(),displayObservedRatio)
returnfmt.Errorf("%s max limit to request ratio per %s is %s, but provided ratio is %f",resourceName,limitType,enforced.String(),displayObservedRatio)
}
returnnil
...
...
@@ -423,9 +428,10 @@ type DefaultLimitRangerActions struct{}
// ensure DefaultLimitRangerActions implements the LimitRangerActions interface.
returnadmission.NewForbidden(a,fmt.Errorf("node %q is not allowed to set the following labels: %s",nodeName,strings.Join(forbiddenLabels.List(),", ")))
}
// check and warn if nodes set labels on create that would have been forbidden on update
// TODO(liggitt): in 1.17, expand getForbiddenCreateLabels to match getForbiddenUpdateLabels and drop this