packageadmission

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 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, scheme *runtime.Scheme, configuration map[string]interface{},
	manifest *manifestsv1alpha1.PackageManifest, fldPath *field.Path,
) (field.ErrorList, error)

func ValidatePackageConfiguration

func ValidatePackageConfiguration(
	ctx context.Context, scheme *runtime.Scheme, mc *manifestsv1alpha1.PackageManifestSpecConfig,
	configuration map[string]interface{}, fldPath *field.Path,
) (field.ErrorList, error)

func ValidatePackageManifest

func ValidatePackageManifest(ctx context.Context, scheme *runtime.Scheme, obj *manifestsv1alpha1.PackageManifest) (field.ErrorList, error)

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