misc

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListBySelectors

func ListBySelectors[T client.Object](
	ctx context.Context,
	c client.Client,
	list client.ObjectList,
	selectors []*metav1.LabelSelector,
) ([]T, error)

ListBySelectors lists objects of type T (using list L), then returns all items that match ANY of the provided LabelSelectors. The result is unique by namespace/name.

Types

type NamespaceSelector

type NamespaceSelector struct {
	// Select Items based on their labels. If the namespaceSelector is also set, the selector is applied
	// to items within the selected namespaces. Otherwise for all the items.
	*metav1.LabelSelector `json:",inline"`
}

Selector for resources and their labels or selecting origin namespaces +kubebuilder:object:generate=true

func (*NamespaceSelector) DeepCopy

func (in *NamespaceSelector) DeepCopy() *NamespaceSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSelector.

func (*NamespaceSelector) DeepCopyInto

func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NamespaceSelector) GetMatchingNamespaces

func (s *NamespaceSelector) GetMatchingNamespaces(ctx context.Context, client client.Client) ([]corev1.Namespace, error)

GetMatchingNamespaces retrieves the list of namespaces that match the NamespaceSelector.

Jump to

Keyboard shortcuts

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