internal

package
v0.10.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodDisruptionBudgetKind     = "PodDisruptionBudget"
	PriorityClassKind           = "PriorityClass"
	RoleKind                    = "Role"
	ClusterRoleKind             = "ClusterRole"
	PodDisruptionBudgetAPIGroup = "policy"
	SCCAPIGroup                 = "security.openshift.io"
)
View Source
const IndexImagePathKey = "index-path"

IndexImagePathKey defines the key which can be used by its consumers to inform where their index image path is to be checked

Variables

View Source
var BundleValidator interfaces.Validator = interfaces.ValidatorFunc(validateBundles)
View Source
var CRDValidator interfaces.Validator = interfaces.ValidatorFunc(validateCRDs)
View Source
var CSVValidator interfaces.Validator = interfaces.ValidatorFunc(validateCSVs)

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.

View Source
var CommunityOperatorValidator interfaces.Validator = interfaces.ValidatorFunc(communityValidator)

CommunityOperatorValidator validates the bundle manifests against the required criteria to publish the projects on the community operators

Note that this validator allows to receive a List of optional values as key=values. Currently, only the `index-path` key is allowed. If informed, it will check the labels on the image index according to its criteria.

View Source
var ObjectValidator interfaces.Validator = interfaces.ValidatorFunc(validateObjects)
View Source
var OperatorGroupValidator interfaces.Validator = interfaces.ValidatorFunc(validateOperatorGroups)

OperatorGroupValidator is a validator for OperatorGroup

View Source
var OperatorHubValidator interfaces.Validator = interfaces.ValidatorFunc(validateOperatorHub)

OperatorHubValidator validates the bundle manifests against the required criteria to publish the projects on OperatorHub.io.

Note that this validator allows to receive a List of optional values as key=values. Currently, only the `k8s-version` key is allowed. If informed, it will perform the checks against this specific Kubernetes version where the operator bundle is intend to be distribute for.

View Source
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

Types

type CSVChecks added in v0.8.0

type CSVChecks struct {
	// contains filtered or unexported fields
}

type CommunityOperatorChecks added in v0.9.0

type CommunityOperatorChecks struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL