collector

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package collector provides functionality for discovering and collecting Kubernetes resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterFunc

type FilterFunc func(res unstructured.Unstructured, logger klog.Logger) bool

FilterFunc is a function that filters resources.

func IgnoreHelmSecret

func IgnoreHelmSecret() FilterFunc

IgnoreHelmSecret returns a FilterFunc which filters secrets owned by helm.

func IgnoreIfHelmReleaseFound

func IgnoreIfHelmReleaseFound(helmReleases []helmapi.HelmRelease) FilterFunc

IgnoreIfHelmReleaseFound returns a FilterFunc which filters resources part of an helm release.

func IgnoreIfKustomizationFound

func IgnoreIfKustomizationFound(kustomizations []ksapi.Kustomization) FilterFunc

IgnoreIfKustomizationFound returns a FilterFunc which filters resources part of a flux kustomization.

func IgnoreOwnedResource

func IgnoreOwnedResource() FilterFunc

IgnoreOwnedResource returns a FilterFunc which filters resources owner by parents ones.

func IgnoreRuleExclusions added in v0.0.8

func IgnoreRuleExclusions(cluster string, exclusions []v1.ExcludeResources) FilterFunc

IgnoreRuleExclusions returns a FilterFunc which excludes resources part of configuration exclusions.

func IgnoreServiceAccountSecret

func IgnoreServiceAccountSecret() FilterFunc

IgnoreServiceAccountSecret returns a FilterFunc which filters secrets linked to a service account.

type Interface

type Interface interface {
	Discover(ctx context.Context, list *unstructured.UnstructuredList, ch chan unstructured.Unstructured) error
}

Interface represents collector interface.

func NewDiscovery

func NewDiscovery(logger klog.Logger, filters ...FilterFunc) Interface

NewDiscovery returns a new discovery instance.

Jump to

Keyboard shortcuts

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