Documentation ¶
Index ¶
- Constants
- Variables
- func LabelSelectorHasInvalidLabelValue(ps *metav1.LabelSelector) bool
- func ValidateCondition(condition metav1.Condition, fldPath *field.Path) field.ErrorList
- func ValidateConditions(conditions []metav1.Condition, fldPath *field.Path) field.ErrorList
- func ValidateCreateOptions(options *metav1.CreateOptions) field.ErrorList
- func ValidateDeleteOptions(options *metav1.DeleteOptions) field.ErrorList
- func ValidateDryRun(fldPath *field.Path, dryRun []string) field.ErrorList
- func ValidateFieldManager(fieldManager string, fldPath *field.Path) field.ErrorList
- func ValidateFieldSelectorRequirement(requirement metav1.FieldSelectorRequirement, ...) field.ErrorList
- func ValidateFieldValidation(fldPath *field.Path, fieldValidation string) field.ErrorList
- func ValidateIgnoreStoreReadError(fldPath *field.Path, options *metav1.DeleteOptions) field.ErrorList
- func ValidateLabelName(labelName string, fldPath *field.Path) field.ErrorList
- func ValidateLabelSelector(ps *metav1.LabelSelector, opts LabelSelectorValidationOptions, ...) field.ErrorList
- func ValidateLabelSelectorRequirement(sr metav1.LabelSelectorRequirement, opts LabelSelectorValidationOptions, ...) field.ErrorList
- func ValidateLabels(labels map[string]string, fldPath *field.Path) field.ErrorList
- func ValidateManagedFields(fieldsList []metav1.ManagedFieldsEntry, fldPath *field.Path) field.ErrorList
- func ValidatePatchOptions(options *metav1.PatchOptions, patchType types.PatchType) field.ErrorList
- func ValidateTableOptions(opts *metav1.TableOptions) field.ErrorList
- func ValidateUpdateOptions(options *metav1.UpdateOptions) field.ErrorList
- type FieldSelectorValidationOptions
- type LabelSelectorValidationOptions
Constants ¶
const MaxSubresourceNameLength = 256
const UninitializedStatusUpdateErrorMsg string = `must not update status when the object is uninitialized`
Variables ¶
var FieldManagerMaxLength = 128
Functions ¶
func LabelSelectorHasInvalidLabelValue ¶ added in v0.26.0
func LabelSelectorHasInvalidLabelValue(ps *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 v0.19.0
func ValidateConditions ¶ added in v0.19.0
func ValidateCreateOptions ¶
func ValidateCreateOptions(options *metav1.CreateOptions) field.ErrorList
func ValidateDeleteOptions ¶
func ValidateDeleteOptions(options *metav1.DeleteOptions) field.ErrorList
func ValidateDryRun ¶
ValidateDryRun validates that a dryRun query param only contains allowed values.
func ValidateFieldManager ¶
ValidateFieldManager valides that the fieldManager is the proper length and only has printable characters.
func ValidateFieldSelectorRequirement ¶ added in v0.31.0
func ValidateFieldSelectorRequirement(requirement metav1.FieldSelectorRequirement, opts FieldSelectorValidationOptions, fldPath *field.Path) field.ErrorList
ValidateLabelSelectorRequirement validates the requirement according to the opts and returns any validation errors.
func ValidateFieldValidation ¶ added in v0.23.0
ValidateFieldValidation validates that a fieldValidation query param only contains allowed values.
func ValidateIgnoreStoreReadError ¶ added in v0.32.0
func ValidateIgnoreStoreReadError(fldPath *field.Path, options *metav1.DeleteOptions) field.ErrorList
ValidateIgnoreStoreReadError validates that delete options are valid when ignoreStoreReadErrorWithClusterBreakingPotential is enabled
func ValidateLabelName ¶
ValidateLabelName validates that the label name is correctly defined.
func ValidateLabelSelector ¶
func ValidateLabelSelector(ps *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 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.
func ValidateLabels ¶
ValidateLabels validates that a set of labels are correctly defined.
func ValidateManagedFields ¶ added in v0.16.4
func ValidatePatchOptions ¶
func ValidateTableOptions ¶
func ValidateTableOptions(opts *metav1.TableOptions) field.ErrorList
ValidateTableOptions returns any invalid flags on TableOptions.
func ValidateUpdateOptions ¶
func ValidateUpdateOptions(options *metav1.UpdateOptions) field.ErrorList
Types ¶
type FieldSelectorValidationOptions ¶ added in v0.31.0
type FieldSelectorValidationOptions struct { // Allows an operator that is not interpretable to pass validation. This is useful for cases where a broader check // can be performed, as in a *SubjectAccessReview AllowUnknownOperatorInRequirement bool }
FieldSelectorValidationOptions is a struct that can be passed to ValidateFieldSelectorRequirement to record the validate options
type LabelSelectorValidationOptions ¶ added in v0.26.0
type LabelSelectorValidationOptions struct { // Allow invalid label value in selector AllowInvalidLabelValueInSelector bool // Allows an operator that is not interpretable to pass validation. This is useful for cases where a broader check // can be performed, as in a *SubjectAccessReview AllowUnknownOperatorInRequirement bool }
LabelSelectorValidationOptions is a struct that can be passed to ValidateLabelSelector to record the validate options