Documentation ¶
Index ¶
Constants ¶
const ( PodDisruptionBudgetKind = "PodDisruptionBudget" PriorityClassKind = "PriorityClass" RoleKind = "Role" ClusterRoleKind = "ClusterRole" PodDisruptionBudgetAPIGroup = "policy" SCCAPIGroup = "security.openshift.io" )
Variables ¶
var BundleValidator interfaces.Validator = interfaces.ValidatorFunc(validateBundles)
var CRDValidator interfaces.Validator = interfaces.ValidatorFunc(validateCRDs)
var CSVValidator interfaces.Validator = interfaces.ValidatorFunc(validateCSVs)
var CaseSensitiveAnnotationKeySet = map[string]string{ strings.ToLower(v1.OperatorGroupAnnotationKey): v1.OperatorGroupAnnotationKey, strings.ToLower(v1.OperatorGroupNamespaceAnnotationKey): v1.OperatorGroupNamespaceAnnotationKey, strings.ToLower(v1.OperatorGroupTargetsAnnotationKey): v1.OperatorGroupTargetsAnnotationKey, strings.ToLower(v1.OperatorGroupProvidedAPIsAnnotationKey): v1.OperatorGroupProvidedAPIsAnnotationKey, strings.ToLower(v1alpha1.SkipRangeAnnotationKey): v1alpha1.SkipRangeAnnotationKey, }
CaseSensitiveAnnotationKeySet is a set of annotation keys that are case sensitive and can be used for validation purposes. The key is always lowercase and the value contains the expected case sensitive string. This may not be an exhaustive list.
var ObjectValidator interfaces.Validator = interfaces.ValidatorFunc(validateObjects)
var OperatorGroupValidator interfaces.Validator = interfaces.ValidatorFunc(validateOperatorGroups)
OperatorGroupValidator is a validator for OperatorGroup
var OperatorHubValidator interfaces.Validator = interfaces.ValidatorFunc(validateOperatorHub)
var PackageManifestValidator interfaces.Validator = interfaces.ValidatorFunc(validatePackageManifests)
Functions ¶
func ValidateAnnotationNames ¶ added in v0.6.1
func ValidateAnnotationNames(annotations map[string]string, value interface{}) (errs []errors.Error)
ValidateAnnotationNames will check annotation keys to ensure they are using proper case. Uses CaseSensitiveAnnotationKeySet as a source for keys which are known to be case sensitive. This function can be used anywhere annotations need to be checked for case sensitivity.
Arguments ¶
• annotations: annotations map usually obtained from ObjectMeta.GetAnnotations()
• value: is the field or file that caused an error or warning
Returns ¶
• errs: Any errors that may have been detected with the annotation keys provided