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