Documentation ¶
Index ¶
- Variables
- func IsExtendedResourceName(name corev1.ResourceName) bool
- func IsIntegerResourceName(str string) bool
- func IsNativeResource(name corev1.ResourceName) bool
- func ValidateNonnegativeQuantity(value resource.Quantity, fldPath *field.Path) field.ErrorList
- func ValidateResourceQuantityValue(resource string, value resource.Quantity, fldPath *field.Path) field.ErrorList
- func ValidateTolerations(tolerations []corev1.Toleration, fldPath *field.Path) field.ErrorList
Constants ¶
This section is empty.
Variables ¶
var ValidateNodeName = apivalidation.NameIsDNSSubdomain
ValidateNodeName can be used to check whether the given node name is valid. Prefix indicates this name will be used as part of generation, in which case trailing dashes are allowed.
Functions ¶
func IsExtendedResourceName ¶
func IsExtendedResourceName(name corev1.ResourceName) bool
IsExtendedResourceName returns true if: 1. the resource name is not in the default namespace; 2. resource name does not have "requests." prefix, to avoid confusion with the convention in quota 3. it satisfies the rules in IsQualifiedName() after converted into quota resource name
func IsIntegerResourceName ¶
IsIntegerResourceName returns true if the resource is measured in integer values
func IsNativeResource ¶
func IsNativeResource(name corev1.ResourceName) bool
IsNativeResource returns true if the resource name is in the *kubernetes.io/ namespace. Partially-qualified (unprefixed) names are implicitly in the kubernetes.io/ namespace.
func ValidateNonnegativeQuantity ¶
ValidateNonnegativeQuantity validates that a Quantity is not negative
func ValidateResourceQuantityValue ¶
func ValidateResourceQuantityValue(resource string, value resource.Quantity, fldPath *field.Path) field.ErrorList
ValidateResourceQuantityValue enforces that specified quantity is valid for specified resource
func ValidateTolerations ¶
ValidateTolerations tests if given tolerations have valid data.
Types ¶
This section is empty.