discover

package
v0.11.8 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package discover finds every container image a rendered chart references, in four passes: pod-spec container lists (containers, initContainers, ephemeralContainers — as sequences at any depth, which skips the CRD schemas where those keys hold maps), operator-style top-level spec.image scalars, a conservative regex sweep over ConfigMap data for image-shaped strings (embedded pod templates), and the manifest-declared extras ({appVersion} expanded from the vendored chart). References are normalized the way container runtimes expand shorthand, filtered by the manifest's exclude globs, and returned sorted and deduplicated.

Discovery is pure — rendered bytes in, references out. Digest resolution against registries belongs to the engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	// Rendered is the rendered manifest stream.
	Rendered []byte
	// AppVersion expands {appVersion} in extra image references.
	AppVersion string
	// Extra are the manifest- and sidecar-declared images rendering
	// cannot see.
	Extra []spec.ExtraImage
	// Exclude drops discovered references matching these globs.
	Exclude []spec.ExcludePattern
	// AllowEmpty accepts a chart that renders no images.
	AllowEmpty bool
}

Input is one discovery run.

type Result

type Result struct {
	// Images are the canonical source references, normalized, sorted and
	// deduplicated.
	Images []string
	// Excluded lists references dropped by exclude globs, for narration.
	Excluded []string
}

Result is a discovery outcome.

func Discover

func Discover(in Input) (Result, error)

Discover runs the four passes over the rendered stream.

Jump to

Keyboard shortcuts

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