selectors

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ClusterSelectorAnnotationConflictErrorCode = "1066"

ClusterSelectorAnnotationConflictErrorCode is the error code for ClusterSelectorAnnotationConflictError

View Source
const InvalidSelectorErrorCode = "1014" // TODO: Must refactor to use properly

InvalidSelectorErrorCode is the error code for InvalidSelectorError

View Source
const ListNamespaceErrorCode = "2017"

ListNamespaceErrorCode is the error code for ListNamespaceError used in NamespaceSelector

View Source
const ObjectHasUnknownSelectorCode = "1013"

ObjectHasUnknownSelectorCode is the error code for ObjectHasUnknownClusterSelector

Variables

This section is empty.

Functions

func ClusterSelectorAnnotationConflictError

func ClusterSelectorAnnotationConflictError(resource client.Object) status.Error

ClusterSelectorAnnotationConflictError reports that an object has both the legacy cluster-selector annotation and the inline annotation.

func EmptySelectorError

func EmptySelectorError(selector client.Object) status.Error

EmptySelectorError reports that a ClusterSelector or NamespaceSelector is invalid because it is empty.

func FilterClusters

func FilterClusters(objects []ast.FileObject) ([]clusterregistry.Cluster, status.MultiError)

FilterClusters returns the list of Clusters in the passed array of FileObjects.

func InvalidSelectorError

func InvalidSelectorError(selector client.Object, cause error) status.Error

InvalidSelectorError reports that a ClusterSelector or NamespaceSelector is invalid. To be renamed in refactoring that removes above error.

func ListNamespaceError added in v1.17.0

func ListNamespaceError(err error) status.Error

ListNamespaceError reports a LIST namespace error when applying NamespaceSelectors.

func ObjectHasUnknownClusterSelector

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

ObjectHasUnknownClusterSelector reports that `resource`'s cluster-selector annotation references a ClusterSelector that does not exist.

func ObjectHasUnknownNamespaceSelector

func ObjectHasUnknownNamespaceSelector(resource client.Object, selector string) status.Error

ObjectHasUnknownNamespaceSelector reports that `resource`'s namespace-selector annotation references a NamespaceSelector that does not exist.

func ObjectNotInNamespaceSelectorSubdirectory

func ObjectNotInNamespaceSelectorSubdirectory(resource client.Object, selector client.Object) status.Error

ObjectNotInNamespaceSelectorSubdirectory reports that `resource` is not in a subdirectory of the directory declaring `selector`.

func UnknownNamespaceSelectorModeError added in v1.17.0

func UnknownNamespaceSelectorModeError(nsSelector client.Object) status.Error

UnknownNamespaceSelectorModeError reports that a NamespaceSelector mode is unknown.

func UnsupportedNamespaceSelectorModeError added in v1.17.0

func UnsupportedNamespaceSelectorModeError(nsSelector client.Object) status.Error

UnsupportedNamespaceSelectorModeError reports that a NamespaceSelector uses the dynamic mode with the hierarchy source format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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