Documentation ¶
Index ¶
- Constants
- Variables
- func LabelSelectorHasInvalidLabelValue(ps *slim_metav1.LabelSelector) bool
- func ValidateCondition(condition slim_metav1.Condition, fldPath *field.Path) field.ErrorList
- func ValidateConditions(conditions []slim_metav1.Condition, fldPath *field.Path) field.ErrorList
- func ValidateFieldManager(fieldManager string, fldPath *field.Path) field.ErrorList
- func ValidateFieldValidation(fldPath *field.Path, fieldValidation string) field.ErrorList
- func ValidateLabelName(labelName string, fldPath *field.Path) field.ErrorList
- func ValidateLabelSelector(ps *slim_metav1.LabelSelector, opts LabelSelectorValidationOptions, ...) field.ErrorList
- func ValidateLabelSelectorRequirement(sr slim_metav1.LabelSelectorRequirement, opts LabelSelectorValidationOptions, ...) field.ErrorList
- func ValidateLabels(labels map[string]string, fldPath *field.Path) field.ErrorList
- type LabelSelectorValidationOptions
Constants ¶
const MaxSubresourceNameLength = 256
Variables ¶
var FieldManagerMaxLength = 128
Functions ¶
func LabelSelectorHasInvalidLabelValue ¶ added in v1.16.0
func LabelSelectorHasInvalidLabelValue(ps *slim_metav1.LabelSelector) bool
LabelSelectorHasInvalidLabelValue returns true if the given selector contains an invalid label value in a match expression. This is useful for determining whether AllowInvalidLabelValueInSelector should be set to true when validating an update based on existing persisted invalid values.
func ValidateCondition ¶ added in v1.16.0
func ValidateConditions ¶ added in v1.16.0
func ValidateFieldManager ¶ added in v1.16.0
ValidateFieldManager valides that the fieldManager is the proper length and only has printable characters.
func ValidateFieldValidation ¶ added in v1.16.0
ValidateFieldValidation validates that a fieldValidation query param only contains allowed values.
func ValidateLabelName ¶
ValidateLabelName validates that the label name is correctly defined.
func ValidateLabelSelector ¶
func ValidateLabelSelector(ps *slim_metav1.LabelSelector, opts LabelSelectorValidationOptions, fldPath *field.Path) field.ErrorList
ValidateLabelSelector validate the LabelSelector according to the opts and returns any validation errors. opts.AllowInvalidLabelValueInSelector is only expected to be set to true when required for backwards compatibility with existing invalid data.
func ValidateLabelSelectorRequirement ¶
func ValidateLabelSelectorRequirement(sr slim_metav1.LabelSelectorRequirement, opts LabelSelectorValidationOptions, fldPath *field.Path) field.ErrorList
ValidateLabelSelectorRequirement validate the requirement according to the opts and returns any validation errors. opts.AllowInvalidLabelValueInSelector is only expected to be set to true when required for backwards compatibility with existing invalid data.
Types ¶
type LabelSelectorValidationOptions ¶
type LabelSelectorValidationOptions struct { // Allow invalid label value in selector AllowInvalidLabelValueInSelector bool }
LabelSelectorValidationOptions is a struct that can be passed to ValidateLabelSelector to record the validate options