nonhierarchical

package
v1.15.1-rc.3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const BadScopeErrCode = "1058"

BadScopeErrCode is the error code indicating that a resource has been declared in a Namespace repository that shouldn't be there.

View Source
const DeprecatedGroupKindErrorCode = "1050"

DeprecatedGroupKindErrorCode is the error code for DeprecatedGroupKindError.

View Source
const IllegalHierarchicalKindErrorCode = "1032"

IllegalHierarchicalKindErrorCode is the error code for illegalHierarchicalKindErrors.

View Source
const IllegalManagementAnnotationErrorCode = "1005"

IllegalManagementAnnotationErrorCode is the error code for IllegalManagementAnnotationError.

View Source
const IllegalNamespaceErrorCode = "1034"

IllegalNamespaceErrorCode is the error code for illegal Namespace definitions.

View Source
const IllegalNamespaceOnClusterScopedResourceErrorCode = "1052"

IllegalNamespaceOnClusterScopedResourceErrorCode represents a cluster-scoped resource illegally declaring metadata.namespace.

View Source
const IllegalSelectorAnnotationErrorCode = "1004"

IllegalSelectorAnnotationErrorCode is the error code for IllegalNamespaceAnnotationError

View Source
const InvalidCRDNameErrorCode = "1048"

InvalidCRDNameErrorCode is the error code for InvalidCRDNameError.

View Source
const InvalidDirectoryNameErrorCode = "1055"

InvalidDirectoryNameErrorCode is the error code for InvalidDirectoryNameError

View Source
const InvalidMetadataNameErrorCode = "1036"

InvalidMetadataNameErrorCode is the error code for InvalidMetadataNameError

View Source
const ManagedResourceInUnmanagedNamespaceErrorCode = "1056"

ManagedResourceInUnmanagedNamespaceErrorCode is the error code for illegal managed resources in unmanaged Namespaces.

View Source
const MissingNamespaceOnNamespacedResourceErrorCode = "1053"

MissingNamespaceOnNamespacedResourceErrorCode represents a namespace-scoped resource NOT declaring metadata.namespace.

View Source
const MissingObjectNameErrorCode = "1031"

MissingObjectNameErrorCode is the error code for MissingObjectNameError

View Source
const NameCollisionErrorCode = "1029"

NameCollisionErrorCode is the error code for ObjectNameCollisionError

View Source
const UnsupportedCRDRemovalErrorCode = "1047"

UnsupportedCRDRemovalErrorCode is the error code for UnsupportedCRDRemovalError

View Source
const UnsupportedObjectErrorCode = "1043"

UnsupportedObjectErrorCode is the error code for UnsupportedObjectError

Variables

BadScopeErrBuilder is an error build for errors related to the object scope errors

Functions

func ClusterMetadataNameCollisionError

func ClusterMetadataNameCollisionError(gk schema.GroupKind, name string, duplicates ...client.Object) status.Error

ClusterMetadataNameCollisionError reports that multiple cluster-scoped objects of the same Kind and namespace have the same metadata.name.

func DeprecatedGroupKindError

func DeprecatedGroupKindError(resource client.Object, expected schema.GroupVersionKind) status.Error

DeprecatedGroupKindError reports usage of a deprecated version of a specific Group/Kind.

func IllegalClusterSelectorAnnotationError

func IllegalClusterSelectorAnnotationError(resource client.Object, annotation string) status.Error

IllegalClusterSelectorAnnotationError reports that a Cluster or ClusterSelector declares the cluster-selector annotation.

func IllegalHierarchicalKind

func IllegalHierarchicalKind(resource client.Object) status.Error

IllegalHierarchicalKind reports that a type is not permitted if hierarchical parsing is disabled.

func IllegalManagementAnnotationError

func IllegalManagementAnnotationError(resource client.Object, value string) status.Error

IllegalManagementAnnotationError represents an illegal management annotation value. Error implements error.

func IllegalNamespace

func IllegalNamespace(resource client.Object) status.Error

IllegalNamespace reports that the config-management-system Namespace MUST NOT be declared.

func IllegalNamespaceOnClusterScopedResourceError

func IllegalNamespaceOnClusterScopedResourceError(resource client.Object) status.Error

IllegalNamespaceOnClusterScopedResourceError reports that a cluster-scoped resource MUST NOT declare metadata.namespace.

func IllegalNamespaceSelectorAnnotationError

func IllegalNamespaceSelectorAnnotationError(resource client.Object) status.Error

IllegalNamespaceSelectorAnnotationError reports that a cluster-scoped object declares the namespace-selector annotation.

func InvalidCRDNameError

func InvalidCRDNameError(resource client.Object, expected string) status.Error

InvalidCRDNameError reports a CRD with an invalid name in the repo.

func InvalidMetadataNameError

func InvalidMetadataNameError(resource client.Object) status.Error

InvalidMetadataNameError represents the usage of a non-RFC1123 compliant metadata.name

func InvalidNamespaceError

func InvalidNamespaceError(o client.Object) status.Error

InvalidNamespaceError reports using an illegal Namespace.

func ManagedResourceInUnmanagedNamespace

func ManagedResourceInUnmanagedNamespace(namespace string, resources ...client.Object) status.Error

ManagedResourceInUnmanagedNamespace represents managed resources illegally declared in an unmanaged Namespace.

func MissingNamespaceOnNamespacedResourceError

func MissingNamespaceOnNamespacedResourceError(resource client.Object) status.Error

MissingNamespaceOnNamespacedResourceError reports a namespace-scoped resource MUST declare metadata.namespace. when parsing in non-hierarchical mode.

func MissingObjectNameError

func MissingObjectNameError(resource client.Object) status.Error

MissingObjectNameError reports that an object has no name.

func NamespaceAndSelectorResourceError

func NamespaceAndSelectorResourceError(resource client.Object) status.Error

NamespaceAndSelectorResourceError reports that a namespace-scoped resource illegally declares both metadata.namespace and has the namespace-selector annotation.

func NamespaceCollisionError

func NamespaceCollisionError(name string, duplicates ...client.Object) status.Error

NamespaceCollisionError reports multiple declared Namespaces with the same name.

func NamespaceMetadataNameCollisionError

func NamespaceMetadataNameCollisionError(gk schema.GroupKind, namespace string, name string, duplicates ...client.Object) status.Error

NamespaceMetadataNameCollisionError reports that multiple namespace-scoped objects of the same Kind and namespace have the same metadata name

func SelectorMetadataNameCollisionError

func SelectorMetadataNameCollisionError(kind string, name string, duplicates ...client.Object) status.Error

SelectorMetadataNameCollisionError reports that multiple ClusterSelectors or NamespaceSelectors have the same metadata.name.

func UnsupportedCRDRemovalError

func UnsupportedCRDRemovalError(resource client.Object) status.Error

UnsupportedCRDRemovalError reports than a CRD was removed, but its corresponding CRs weren't.

func UnsupportedObjectError

func UnsupportedObjectError(resource client.Object) status.Error

UnsupportedObjectError reports than an unsupported object is in the namespaces/ sub-directories or clusters/ directory.

func ValidManagementAnnotation

func ValidManagementAnnotation(o ast.FileObject) status.Error

ValidManagementAnnotation returns an Error if the user-specified management annotation is invalid.

func ValidateCRDName

func ValidateCRDName(o ast.FileObject) status.Error

ValidateCRDName returns an error

Types

type Validator

type Validator interface {
	// Validate returns a MultiError if the passed FileObjects fail validation.
	Validate([]ast.FileObject) status.MultiError
}

Validator implementors validate a set of non-hierarchical configuration.

Jump to

Keyboard shortcuts

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