packagemanifestvalidation

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenapiV3TypeObject = "object"
)

Variables

View Source
var (
	ErrDuplicateConfig        = errors.New("config raw and object fields are both set")
	ErrXKubernetesValidations = errors.New("failed to retrieve type information for x-kubernetes-validations")
)

Functions

func AdmitPackageConfiguration

func AdmitPackageConfiguration(
	ctx context.Context, configuration map[string]any,
	manifest *manifests.PackageManifest, fldPath *field.Path,
) (field.ErrorList, error)

Prunes, Defaults and Validates configuration against the PackageManifests OpenAPISchema so it's ready to be used.

func ValidatePackageConfiguration

func ValidatePackageConfiguration(
	ctx context.Context, mc *manifests.PackageManifestSpecConfig,
	configuration map[string]any, fldPath *field.Path,
) (field.ErrorList, error)

Validates configuration against the PackageManifests OpenAPISchema.

func ValidatePackageManifest

func ValidatePackageManifest(ctx context.Context, obj *manifests.PackageManifest) (field.ErrorList, error)

Validates the PackageManifest.

func ValidatePackageManifestLock

func ValidatePackageManifestLock(_ context.Context, obj *manifests.PackageManifestLock) (field.ErrorList, error)

Validates the PackageManifestLock.

Types

type OpenAPISchemaErrorList

type OpenAPISchemaErrorList struct {
	SchemaErrors field.ErrorList
	CELErrors    field.ErrorList
}

OpenAPISchemaErrorList tracks all validation errors reported ValidateCustomResourceDefinitionOpenAPISchema with CEL related errors kept separate from schema related errors.

Jump to

Keyboard shortcuts

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