Documentation ¶
Index ¶
- func IsExtendedResourceName(name corev1.ResourceName) bool
- func IsIntegerResourceName(str string) bool
- func IsNativeResource(name corev1.ResourceName) bool
- func IsQuotaHugePageResourceName(name corev1.ResourceName) bool
- func IsResourceQuotaScopeValidForResource(scope corev1.ResourceQuotaScope, resource string) bool
- func IsStandardQuotaResourceName(str string) bool
- func IsStandardResourceName(str string) bool
- func IsStandardResourceQuotaScope(str string) bool
- func ValidateAccount(account *configv1alpha1.Account) field.ErrorList
- func ValidateAccountQuota(accountQuota *configv1alpha1.AccountQuota) field.ErrorList
- func ValidateAccountQuotaSpec(accountQuotaSpec *configv1alpha1.AccountQuotaSpec) field.ErrorList
- func ValidateAccountQuotaUpdate(newAccountQuota *configv1alpha1.AccountQuota, ...) field.ErrorList
- func ValidateAccountSpaceTemplate(space configv1alpha1.AccountSpaceTemplate, fldPath *field.Path) field.ErrorList
- func ValidateAccountUpdate(newAccount *configv1alpha1.Account, oldAccount *configv1alpha1.Account) field.ErrorList
- func ValidateNonnegativeQuantity(value resource.Quantity, fldPath *field.Path) field.ErrorList
- func ValidateResourceQuantityValue(resource string, value resource.Quantity, fldPath *field.Path) field.ErrorList
- func ValidateResourceQuotaResourceName(value string, fldPath *field.Path) field.ErrorList
- func ValidateResourceQuotaSpec(resourceQuotaSpec *corev1.ResourceQuotaSpec, fld *field.Path) field.ErrorList
- func ValidateRoleBindingSubject(subject rbac.Subject, isNamespaced bool, fldPath *field.Path) field.ErrorList
- func ValidateTemplateInstance(templateInstance *configv1alpha1.TemplateInstance) field.ErrorList
- func ValidateTemplateInstanceUpdate(newTemplateInstance *configv1alpha1.TemplateInstance, ...) field.ErrorList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 IsQuotaHugePageResourceName ¶
func IsQuotaHugePageResourceName(name corev1.ResourceName) bool
IsQuotaHugePageResourceName returns true if the resource name has the quota related huge page resource prefix.
func IsResourceQuotaScopeValidForResource ¶
func IsResourceQuotaScopeValidForResource(scope corev1.ResourceQuotaScope, resource string) bool
IsResourceQuotaScopeValidForResource returns true if the resource applies to the specified scope
func IsStandardQuotaResourceName ¶
IsStandardQuotaResourceName returns true if the resource is known to the quota tracking system
func IsStandardResourceName ¶
IsStandardResourceName returns true if the resource is known to the system
func IsStandardResourceQuotaScope ¶
IsStandardResourceQuotaScope returns true if the scope is a standard value
func ValidateAccount ¶
func ValidateAccount(account *configv1alpha1.Account) field.ErrorList
ValidateAccount tests required fields for an account
func ValidateAccountQuota ¶
func ValidateAccountQuota(accountQuota *configv1alpha1.AccountQuota) field.ErrorList
ValidateAccountQuota tests required fields for an account quota
func ValidateAccountQuotaSpec ¶
func ValidateAccountQuotaSpec(accountQuotaSpec *configv1alpha1.AccountQuotaSpec) field.ErrorList
func ValidateAccountQuotaUpdate ¶
func ValidateAccountQuotaUpdate(newAccountQuota *configv1alpha1.AccountQuota, oldAccountQuota *configv1alpha1.AccountQuota) field.ErrorList
ValidateAccountQuotaUpdate tests updated fields for an account quota
func ValidateAccountSpaceTemplate ¶
func ValidateAccountSpaceTemplate(space configv1alpha1.AccountSpaceTemplate, fldPath *field.Path) field.ErrorList
ValidateAccountSpaceTemplate is exported to validate space template labels and reuse this validation logic
func ValidateAccountUpdate ¶
func ValidateAccountUpdate(newAccount *configv1alpha1.Account, oldAccount *configv1alpha1.Account) field.ErrorList
ValidateAccountUpdate tests updated fields for an account
func 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 ValidateResourceQuotaResourceName ¶
Validate resource names that can go in a resource quota Refer to docs/design/resources.md for more details.
func ValidateRoleBindingSubject ¶
func ValidateRoleBindingSubject(subject rbac.Subject, isNamespaced bool, fldPath *field.Path) field.ErrorList
ValidateRoleBindingSubject is exported to allow types outside of the RBAC API group to embed a rbac.Subject and reuse this validation logic
func ValidateTemplateInstance ¶
func ValidateTemplateInstance(templateInstance *configv1alpha1.TemplateInstance) field.ErrorList
ValidateTemplateInstance tests required fields for an account quota
func ValidateTemplateInstanceUpdate ¶
func ValidateTemplateInstanceUpdate(newTemplateInstance *configv1alpha1.TemplateInstance, oldTemplateInstance *configv1alpha1.TemplateInstance) field.ErrorList
ValidateTemplateInstanceUpdate tests updated fields for an account quota
Types ¶
This section is empty.