Documentation ¶
Index ¶
- 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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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