image

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: AGPL-3.0 Imports: 4 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 image discovers container images inside rendered Kubernetes manifests by parsing string values, not by hard-coding a table of kinds and field names.

Every string value reachable in a manifest tree is fed through distribution/reference — the canonical OCI image reference parser used by Docker, containerd, and Kubernetes. A string is recognised as an image when it parses as a named reference AND carries either a tag or a digest, which excludes plain hostnames, paths, and version-only strings like "v1.2.3".

Because detection is purely value-based, new CRDs that embed image references are picked up automatically — no per-kind override list to maintain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract(doc map[string]any) []string

Extract returns nil when no images are found.

func Split added in v0.3.2

func Split(ref string) (name, version string)

Split separates an OCI image reference into its repository name and its version — the tag, or the digest when one is present (a digest is more specific, so it wins when a reference carries both). The name is returned verbatim, NOT normalized: "nginx:1" splits to ("nginx", "1"), not ("docker.io/library/nginx", …). Intended for references Extract returned; a value that doesn't parse as a reference yields (ref, "").

Pairs with Extract for per-repository version diffing — detecting that ghcr.io/home-operations/sonarr moved from v4.0.0 to v4.1.0 — so a consumer doesn't hand-roll a string split that mishandles a registry port (host:5000/img) or a tag+digest reference.

Types

This section is empty.

Jump to

Keyboard shortcuts

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