Documentation
¶
Index ¶
- Constants
- func EmptyOverrides(overriders policyv1alpha1.Overriders) bool
- func ValidateClusterName(name string) []string
- func ValidateClusterProxyURL(proxyURL string) []string
- func ValidateOverrideSpec(overrideSpec *policyv1alpha1.OverrideSpec) error
- func ValidatePolicyFieldSelector(fieldSelector *policyv1alpha1.FieldSelector) error
Constants ¶
const LabelValueMaxLength int = 63
LabelValueMaxLength is a label's max length
Variables ¶
This section is empty.
Functions ¶
func EmptyOverrides ¶ added in v1.0.0
func EmptyOverrides(overriders policyv1alpha1.Overriders) bool
EmptyOverrides check if the overriders of override policy is empty
func ValidateClusterName ¶
ValidateClusterName tests whether the cluster name passed is valid. If the cluster name is not valid, a list of error strings is returned. Otherwise an empty list (or nil) is returned. Rules of a valid cluster name: - Must be a valid label value as per RFC1123.
- An alphanumeric (a-z, and 0-9) string, with a maximum length of 63 characters, with the '-' character allowed anywhere except the first or last character.
- Length must be less than 48 characters.
- Since cluster name used to generate execution namespace by adding a prefix, so reserve 15 characters for the prefix.
func ValidateClusterProxyURL ¶ added in v0.6.0
ValidateClusterProxyURL tests whether the proxyURL is valid. If not valid, a list of error string is returned. Otherwise an empty list (or nil) is returned.
func ValidateOverrideSpec ¶ added in v1.0.0
func ValidateOverrideSpec(overrideSpec *policyv1alpha1.OverrideSpec) error
ValidateOverrideSpec tests if the overrideRules and (overriders or targetCluster) co-exist
func ValidatePolicyFieldSelector ¶ added in v0.6.0
func ValidatePolicyFieldSelector(fieldSelector *policyv1alpha1.FieldSelector) error
ValidatePolicyFieldSelector tests if the fieldSelector of propagation policy is valid.
Types ¶
This section is empty.