Documentation
¶
Overview ¶
Package imageextract extracts container image references from Kubernetes manifests and Helm charts. This implementation is ported from github.com/replicatedhq/airgap/airgap-builder/pkg/builder/images.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor interface {
ExtractFromDirectory(ctx context.Context, dir string, opts Options) (*Result, error)
ExtractFromChart(ctx context.Context, chartPath string, opts Options) (*Result, error)
ExtractFromManifests(ctx context.Context, manifests []byte, opts Options) (*Result, error)
}
Extractor defines the interface for extracting container image references.
type ImageRef ¶
type ImageRef struct {
Raw string // Original reference string
Registry string // Parsed registry
Repository string // Parsed repository
Tag string // Parsed tag
Digest string // Parsed digest (if present)
Sources []Source // Where this image was found
}
ImageRef represents a parsed container image reference.
type Options ¶
type Options struct {
HelmValues map[string]interface{}
HelmValuesFiles []string
Namespace string
IncludeDuplicates bool
NoWarnings bool
}
Options configures the extraction behavior.
type Source ¶
type Source struct {
File string
Kind string
Name string
Namespace string
Container string
ContainerType string // container, initContainer, ephemeralContainer
}
Source identifies where an image reference was found.
type Warning ¶
type Warning struct {
Image string
Type WarningType
Message string
Source *Source
}
Warning represents an issue detected with an image reference.
type WarningType ¶
type WarningType string
WarningType categorizes different types of warnings.
const ( WarningLatestTag WarningType = "latest-tag" WarningNoTag WarningType = "no-tag" WarningInsecure WarningType = "insecure-registry" WarningUnqualified WarningType = "unqualified-name" WarningInvalidSyntax WarningType = "invalid-syntax" )
Click to show internal directories.
Click to hide internal directories.