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.
Click to show internal directories.
Click to hide internal directories.