discovery

package
v0.0.0-...-7cd5264 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageResult

type ImageResult struct {
	Name    string
	ID      string
	PullRef string
	Owners  []OwnerResult
}

ImageResult is a container image with workload owners.

type OwnerResult

type OwnerResult struct {
	Namespace string
	Kind      string
	Name      string
	Container string
	// Labels/Annotations/PodLabels/PodAnnotations are set only for supplemental owners
	// (orphan Pod, standalone Job) that do not appear in Controllers[]. CronJob owners
	// omit these maps even when discovered via a Job pod.
	Labels         map[string]string `json:",omitempty"`
	Annotations    map[string]string `json:",omitempty"`
	PodLabels      map[string]string `json:",omitempty"`
	PodAnnotations map[string]string `json:",omitempty"`
}

OwnerResult identifies a Kubernetes workload that runs an image.

type Result

type Result struct {
	Images []ImageResult
}

Result contains container images discovered for repository inventory.

func ListImages

func ListImages(ctx context.Context, kubeClient kubernetes.Interface, controllers []fwControllerUtils.Workload) (Result, error)

ListImages returns container images discovered across the cluster for repository inventory. It includes Running pods for all controllers, plus Succeeded/Failed pods for CronJob and Job owners so short-lived batch workloads still appear after completion. CronJob-owned Jobs are attributed to the CronJob. controllers should be GetAllTopControllersWithPods when available.

Jump to

Keyboard shortcuts

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