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 Split ¶ added in v0.3.2
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.