Documentation ¶
Index ¶
- Constants
- func ClusterSelectorAnnotationConflictError(resource client.Object) status.Error
- func EmptySelectorError(selector client.Object) status.Error
- func FilterClusters(objects []ast.FileObject) ([]clusterregistry.Cluster, status.MultiError)
- func InvalidSelectorError(selector client.Object, cause error) status.Error
- func ListNamespaceError(err error) status.Error
- func ObjectHasUnknownClusterSelector(resource client.Object, annotation string) status.Error
- func ObjectHasUnknownNamespaceSelector(resource client.Object, selector string) status.Error
- func ObjectNotInNamespaceSelectorSubdirectory(resource client.Object, selector client.Object) status.Error
- func UnknownNamespaceSelectorModeError(nsSelector client.Object) status.Error
- func UnsupportedNamespaceSelectorModeError(nsSelector client.Object) status.Error
Constants ¶
const ClusterSelectorAnnotationConflictErrorCode = "1066"
ClusterSelectorAnnotationConflictErrorCode is the error code for ClusterSelectorAnnotationConflictError
const InvalidSelectorErrorCode = "1014" // TODO: Must refactor to use properly
InvalidSelectorErrorCode is the error code for InvalidSelectorError
const ListNamespaceErrorCode = "2017"
ListNamespaceErrorCode is the error code for ListNamespaceError used in NamespaceSelector
const ObjectHasUnknownSelectorCode = "1013"
ObjectHasUnknownSelectorCode is the error code for ObjectHasUnknownClusterSelector
Variables ¶
This section is empty.
Functions ¶
func ClusterSelectorAnnotationConflictError ¶
ClusterSelectorAnnotationConflictError reports that an object has both the legacy cluster-selector annotation and the inline annotation.
func EmptySelectorError ¶
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 ¶
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
ListNamespaceError reports a LIST namespace error when applying NamespaceSelectors.
func ObjectHasUnknownClusterSelector ¶
ObjectHasUnknownClusterSelector reports that `resource`'s cluster-selector annotation references a ClusterSelector that does not exist.
func ObjectHasUnknownNamespaceSelector ¶
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
UnknownNamespaceSelectorModeError reports that a NamespaceSelector mode is unknown.
Types ¶
This section is empty.