Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeResourceSlices ¶
MergeResourceSlices combines two slices of Kubernetes resources, deduplicating by name and namespace. When duplicates are found, the resource with the higher Generation is preserved as it represents the more recent version. This is useful when fetching resources with different label sets (e.g., legacy and new owner labels).
Types ¶
type IRepository ¶
type Repository ¶
func NewRepository ¶
func NewRepository[T client.Object](c client.Client, grv schema.GroupVersionKind) *Repository[T]
func (*Repository[T]) DeleteAll ¶
func (r *Repository[T]) DeleteAll(ctx context.Context, labeler processing.Labeler) error
DeleteAll retrieves and deletes all AccessRule resources with both legacy and new owner labels
func (*Repository[T]) GetAll ¶
func (r *Repository[T]) GetAll(ctx context.Context, labeler processing.Labeler) ([]T, error)
GetAll retrieves all AccessRule resources with both legacy and new owner labels, combining them into a single deduplicated list
Click to show internal directories.
Click to hide internal directories.