Documentation
¶
Overview ¶
Package spec defines the mirror store's on-disk contract: the per-entry manifest.yaml files (intent), the lock files (facts), the generated images.extra.yaml sidecar, and the CVE allowlists — plus the typed blocks the layered patchy config shares between mirror and build (registries, signing, and the one scan block every entry overrides field by field). The tree itself is the registry of entries — discovery globs charts/*/manifest.yaml and artifacts/*/manifest.yaml; the config never lists them, and this package never discovers or reads the config: the CLI assembles a Config and hands it in.
Manifests decode strictly (unknown fields are errors), so a typo'd key fails loudly instead of silently reverting to a default. Lock files are written through a fixed-shape emitter rather than a generic YAML encoder, keeping the bytes stable across regenerations — the validate gate byte-compares them.
Index ¶
- Constants
- type Allowlist
- type AllowlistEntry
- type AllowlistPolicy
- type ArtifactLock
- type ArtifactManifest
- type ArtifactPublish
- type ArtifactSpec
- type ChartManifest
- type ChartPublish
- type ChartSpec
- type Config
- type Discovery
- type DistributionManifests
- type Entry
- type ExcludePattern
- type ExtraImage
- type ImageVerifyRule
- type Images
- type ImagesLock
- type KMSSigning
- type KeylessSigning
- type KubescapeScanner
- type LockArtifact
- type LockChart
- type LockImage
- type OCIRefAllow
- type OCIRefs
- type Registry
- type ResolvedAllowlist
- type Scan
- type ScanEnabled
- type ScanOverride
- type ScanPolicy
- type ScannerToggle
- type Scanners
- type Sidecar
- type Signing
- type Track
- type Update
- type VerifyRule
Constants ¶
const ( KindChart = "Chart" KindArtifact = "Artifact" )
The manifest kinds the schema defines.
const APIVersion = "mirror.patchy.bitwisemedia.uk/v1alpha1"
APIVersion is the schema identity every mirror manifest declares.
const AllowlistFile = "security/allowlist.yaml"
AllowlistFile is an entry's allowlist path relative to its directory.
const SidecarFile = "images.extra.yaml"
SidecarFile is the generated extra-images sidecar, relative to an entry directory. Machine-derived extras (distribution manifests) land here and are merged during discovery, so manifest.yaml stays a pure intent file that no machine ever rewrites.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allowlist ¶
type Allowlist struct {
Vulnerabilities []AllowlistEntry `yaml:"vulnerabilities"`
}
Allowlist is an entry's security/allowlist.yaml: accepted scan findings, each with a statement and a lint-enforced expiry.
func LoadAllowlist ¶
LoadAllowlist reads an entry's allowlist. A missing file is an empty allowlist, not an error.
func LoadAllowlistFile ¶ added in v0.12.0
LoadAllowlistFile reads an allowlist by path (a build entry's security/allowlists/<name>.yaml). A missing file is an empty allowlist, not an error.
type AllowlistEntry ¶
type AllowlistEntry struct {
// ID is the finding identifier (CVE, GHSA, GO-...); matching also
// covers the finding's aliases, so an entry keeps working across
// scanners reporting under different id families.
ID string `yaml:"id"`
// Statement records the machine facts: package, installed version,
// fixed-in version.
Statement string `yaml:"statement"`
// ExpiredAt (YYYY-MM-DD) forces re-review; entries never outlive it.
ExpiredAt string `yaml:"expired_at"`
// Notes preserves human analysis (reachability, exposure) verbatim
// across regenerations.
Notes string `yaml:"notes,omitempty"`
}
AllowlistEntry accepts one finding until it expires.
type AllowlistPolicy ¶
type AllowlistPolicy struct {
// MaxDays bounds every allowlist entry's expired_at horizon (default
// 90) — expiry forces re-review instead of accepted-forever CVEs.
MaxDays *int `yaml:"maxDays"`
// NewDays is the expiry stamped on new derived entries (default 90).
// Surviving entries keep the date they were first accepted with, so
// regeneration never rolls a live acceptance forward — except one
// whose date has already lapsed (on or before today), which is renewed
// to this horizon as a fresh acceptance, reviewed as a date change in
// the diff.
NewDays *int `yaml:"newDays"`
// Generate regenerates the entry's allowlist from a fresh scan (mirror
// upgrade, build --update-allowlists); the PR review is where the
// risk is actually accepted (default false).
Generate *bool `yaml:"generate"`
// Preamble is whole-file context rendered as comments atop the
// generated allowlist (default none).
Preamble *string `yaml:"preamble"`
}
AllowlistPolicy is the accepted-risk block, in the config (defaults) and on every entry (overrides). Pointers keep "unset — inherit" distinct from an explicit false, 0 or "".
func (AllowlistPolicy) IsSet ¶ added in v0.12.0
func (p AllowlistPolicy) IsSet() bool
IsSet reports whether any field is set.
type ArtifactLock ¶
type ArtifactLock struct {
Artifact LockArtifact `yaml:"artifact"`
}
ArtifactLock is an artifact entry's lock.yaml.
func LoadArtifactLock ¶
func LoadArtifactLock(path string) (*ArtifactLock, error)
LoadArtifactLock reads an artifact lock file.
func (*ArtifactLock) Encode ¶
func (l *ArtifactLock) Encode() []byte
Encode renders the lock in its canonical byte form.
type ArtifactManifest ¶
type ArtifactManifest struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
// Name must match the entry's directory name.
Name string `yaml:"name"`
Artifact ArtifactSpec `yaml:"artifact"`
// Scan overrides the config's scan block for this artifact; under
// enabled: auto it scans only when the artifact is a runnable image.
Scan ScanOverride `yaml:"scan"`
Publish ArtifactPublish `yaml:"publish"`
}
ArtifactManifest is an artifacts/<name>/manifest.yaml: one mirrored OCI artifact that is not a helm chart (a manifests bundle, a policy bundle, a standalone image).
func LoadArtifactManifest ¶
func LoadArtifactManifest(path string) (*ArtifactManifest, error)
LoadArtifactManifest reads and validates an artifact manifest.
type ArtifactPublish ¶
type ArtifactPublish struct {
// Repo is the repository path applied under every registry URL
// (default <artifactNamespace>/<canonical source path>).
Repo string `yaml:"repo"`
}
ArtifactPublish names the publish destination.
type ArtifactSpec ¶
type ArtifactSpec struct {
// Ref is the upstream repository (no tag): e.g. ghcr.io/acme/bundles.
Ref string `yaml:"ref"`
// Version is the pinned tag; upgrade splices it.
Version string `yaml:"version"`
// VersionConstraint bounds what upgrade may pick.
VersionConstraint string `yaml:"versionConstraint"`
// CooldownDays applies the tracked-tag soak to version picks
// (default: the global cooldown).
CooldownDays *int `yaml:"cooldownDays"`
// Lockstep names an update group, as for charts.
Lockstep string `yaml:"lockstep"`
// VerifyUpstream declares the artifact's upstream provenance.
VerifyUpstream VerifyRule `yaml:"verifyUpstream"`
}
ArtifactSpec pins the upstream artifact.
type ChartManifest ¶
type ChartManifest struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
// Name must match the entry's directory name.
Name string `yaml:"name"`
Chart ChartSpec `yaml:"chart"`
Discovery Discovery `yaml:"discovery"`
Images Images `yaml:"images"`
OCIRefs OCIRefs `yaml:"ociRefs"`
// Scan overrides the config's scan block for this chart.
Scan ScanOverride `yaml:"scan"`
Publish ChartPublish `yaml:"publish"`
}
ChartManifest is a charts/<name>/manifest.yaml: the reviewed intent for one mirrored helm chart. Everything derived from it (the vendored tree, the rendered manifests, the images lock) is fact, regenerated by machine.
func LoadChartManifest ¶
func LoadChartManifest(path string) (*ChartManifest, error)
LoadChartManifest reads and validates a chart manifest.
type ChartPublish ¶
type ChartPublish struct {
// ChartRepo is the repository path applied under every registry URL
// (default <chartNamespace>/<name>).
ChartRepo string `yaml:"chartRepo"`
}
ChartPublish names the publish destination.
type ChartSpec ¶
type ChartSpec struct {
// Repo is the upstream chart location: an oci:// registry path or an
// https:// helm repository (index.yaml).
Repo string `yaml:"repo"`
Name string `yaml:"name"`
// Lockstep names an update group: entries sharing a lockstep value
// ride one upstream version stream and must bump together in one PR
// (a half-merged pair publishes an operator referencing images the
// mirror doesn't carry yet). The group target is the LOWEST of the
// members' newest satisfying versions, holding the bump until every
// member carries the tag.
Lockstep string `yaml:"lockstep"`
// Version is the pinned upstream version; upgrade splices it.
Version string `yaml:"version"`
// VersionConstraint bounds what upgrade may pick (default: none).
VersionConstraint string `yaml:"versionConstraint"`
// VerifyUpstream declares the chart's upstream provenance
// (provider none documents a gap).
VerifyUpstream VerifyRule `yaml:"verifyUpstream"`
}
ChartSpec pins the upstream chart.
type Config ¶
type Config struct {
Registries []Registry `yaml:"registries"`
Signing Signing `yaml:"signing"`
Update Update `yaml:"update"`
Scan Scan `yaml:"scan"`
// SourceRegistryRewrites reroutes pulls from an upstream registry host
// (e.g. a pull-through cache in front of docker.io). Recorded sources
// and publish targets keep the canonical path.
SourceRegistryRewrites map[string]string `yaml:"sourceRegistryRewrites"`
}
Config is the mirror's view of the patchy configuration: the shared registries, signing and scan blocks plus the mirror: block's update and sourceRegistryRewrites. The CLI assembles it from the layered patchy config; the engine never discovers or reads config files itself, so a Config is always handed in. Per-entry intent lives in each entry's manifest.yaml, never here.
func (*Config) Resolve ¶ added in v0.12.0
Resolve validates the config and fills its defaults in place: at least one registry, each with a well-formed unique name and a url, namespace defaults per registry, the signing default (keyless) and every signing block's shape, and the scan block's allowlist horizon. Callers that only need part of the config (the dev commands) never call it.
func (*Config) ResolveWithoutRegistries ¶ added in v0.12.1
ResolveWithoutRegistries is Resolve for callers that never contact a registry (`patchy build --dry-run`): the same validation and defaults, but an empty registries list is allowed, so a plan needs no registry config.
type Discovery ¶
type Discovery struct {
// Namespace to render into (default: the entry name).
Namespace string `yaml:"namespace"`
// ValuesFiles are paths relative to the entry directory.
ValuesFiles []string `yaml:"valuesFiles"`
// KubeVersion is the Kubernetes version to render for (default 1.34.0).
KubeVersion string `yaml:"kubeVersion"`
// APIVersions are extra .Capabilities.APIVersions entries.
APIVersions []string `yaml:"apiVersions"`
}
Discovery configures the render that image discovery runs against.
func (Discovery) EffectiveKubeVersion ¶
EffectiveKubeVersion resolves the kube-version default.
func (Discovery) EffectiveNamespace ¶
EffectiveNamespace resolves the namespace default (the entry name).
type DistributionManifests ¶
type DistributionManifests struct {
// Artifact is the manifests artifact ref; {appVersion} expands from
// the vendored Chart.yaml.
Artifact string `yaml:"artifact"`
// Components name the manifest files whose Deployment images are
// derived.
Components []string `yaml:"components"`
// Registry prefixes registry-less image references found in the
// manifests (default ghcr.io) — the deploying operator prefixes its
// configured registry the same way.
Registry string `yaml:"registry"`
}
DistributionManifests configures sidecar derivation for charts whose workload images are deployed by an operator from manifests helm never renders (so discovery cannot see them).
type Entry ¶
type Entry struct {
// Name is the entry's directory name, its identity everywhere.
Name string
// Kind is KindChart or KindArtifact.
Kind string
// Dir is the absolute path of the entry directory.
Dir string
Chart *ChartManifest
Artifact *ArtifactManifest
}
Entry is one discovered mirror entry: a chart or an artifact. Exactly one of Chart and Artifact is set, matching Kind.
func Discover ¶
Discover globs charts/*/manifest.yaml and artifacts/*/manifest.yaml under root and loads every entry, sorted by name. The tree is the registry: nothing else lists entries.
func (Entry) LockPath ¶
LockPath is the entry's lock file path: images.lock.yaml for charts, lock.yaml for artifacts.
func (Entry) ManifestPath ¶
ManifestPath is the entry's manifest.yaml path.
func (Entry) VersionConstraint ¶
VersionConstraint returns the entry's update constraint.
type ExcludePattern ¶
type ExcludePattern struct {
Pattern string `yaml:"pattern"`
}
ExcludePattern drops discovered references matching a glob.
type ExtraImage ¶
ExtraImage adds one image with the reason it is invisible to discovery.
type ImageVerifyRule ¶
type ImageVerifyRule struct {
// Match is a glob over canonical source references.
Match string `yaml:"match"`
VerifyRule `yaml:",inline"`
}
ImageVerifyRule is a VerifyRule scoped to images matching a glob.
type Images ¶
type Images struct {
// Track re-picks tags for images on a release train of their own,
// writing the pick into a values file. Wall-clock dependent: only
// upgrade re-picks; every other stage uses the committed pin.
Track []Track `yaml:"track"`
// DistributionManifests derives extra images from a distribution
// manifests artifact into the generated images.extra.yaml sidecar.
DistributionManifests *DistributionManifests `yaml:"distributionManifests"`
// Extra adds images helm rendering cannot see. {appVersion} expands
// from the vendored Chart.yaml.
Extra []ExtraImage `yaml:"extra"`
// Exclude drops discovered references matching a glob pattern.
Exclude []ExcludePattern `yaml:"exclude"`
// AllowEmpty accepts a chart that renders no images (CRD-only charts).
AllowEmpty bool `yaml:"allowEmpty"`
// VerifyUpstream rules gate every locked image: first match wins, and
// every image must match one (provider none documents a gap).
VerifyUpstream []ImageVerifyRule `yaml:"verifyUpstream"`
}
Images configures image discovery, tracking and upstream verification.
type ImagesLock ¶
ImagesLock is a chart entry's images.lock.yaml: the pinned facts derived from the manifest — the upstream tgz digest and every referenced image resolved to a digest. Regenerated by machine; validate byte-compares it.
func LoadImagesLock ¶
func LoadImagesLock(path string) (*ImagesLock, error)
LoadImagesLock reads a chart lock file.
func (*ImagesLock) Encode ¶
func (l *ImagesLock) Encode() []byte
Encode renders the lock in its canonical byte form. The shape is fixed, so the emitter is hand-rolled: a generic YAML encoder would not reproduce the committed files byte-for-byte, and the validate gate compares bytes.
type KMSSigning ¶
type KMSSigning struct {
// Key is a KMS URI: gcpkms://, awskms:// or azurekms://.
Key string `yaml:"key"`
}
KMSSigning signs with a cloud KMS key.
type KeylessSigning ¶
type KeylessSigning struct {
CertificateIdentity string `yaml:"certificateIdentity"`
CertificateOidcIssuer string `yaml:"certificateOidcIssuer"`
// TlogUpload records signatures in the public transparency log
// (default true; public repos want the log).
TlogUpload *bool `yaml:"tlogUpload"`
}
KeylessSigning pins the certificate identity the mirror's own signatures carry — used both to sign and to self-verify for publish idempotency.
func (*KeylessSigning) TlogUploadEnabled ¶
func (k *KeylessSigning) TlogUploadEnabled() bool
TlogUploadEnabled resolves the TlogUpload default.
type KubescapeScanner ¶
type KubescapeScanner struct {
Enabled bool `yaml:"enabled"`
// Mode is "warn" (findings inform review) or "fail" (findings block).
Mode string `yaml:"mode"`
}
KubescapeScanner configures the configuration scan.
type LockArtifact ¶
type LockArtifact struct {
// Ref is the canonical upstream repository (no tag).
Ref string `yaml:"ref"`
// Version is the pinned tag.
Version string `yaml:"version"`
// Digest is the manifest digest Ref:Version resolved to.
Digest string `yaml:"digest"`
// Targets maps each configured registry's name to the mirror reference
// the artifact publishes to there.
Targets map[string]string `yaml:"targets"`
// Platforms lists os/arch pairs of a manifest list.
Platforms []string `yaml:"platforms"`
}
LockArtifact pins one mirrored OCI artifact by digest.
type LockChart ¶
type LockChart struct {
Name string `yaml:"name"`
Version string `yaml:"version"`
UpstreamTgzSha256 string `yaml:"upstreamTgzSha256"`
}
LockChart records the vendored chart identity and its upstream tgz digest (the publish-time mutation tripwire).
type LockImage ¶
type LockImage struct {
// Source is the canonical upstream reference (normalized, tagged).
Source string `yaml:"source"`
// Digest is the manifest digest Source resolved to.
Digest string `yaml:"digest"`
// Targets maps each configured registry's name to the mirror reference
// the image publishes to there.
Targets map[string]string `yaml:"targets"`
// Platforms lists os/arch pairs of a manifest list (empty for
// single-platform images).
Platforms []string `yaml:"platforms"`
}
LockImage is one image pinned by digest, with its mirror targets.
type OCIRefAllow ¶
OCIRefAllow permits one non-mirror oci:// reference pattern, with the reason it may bypass the mirror.
type OCIRefs ¶
type OCIRefs struct {
Allow []OCIRefAllow `yaml:"allow"`
}
OCIRefs governs oci:// references surviving in rendered output: anything outside the mirror bypasses the review gate and needs a reasoned allowance.
type Registry ¶
type Registry struct {
// Name is the registry's identity: the lock files' targets key and
// the value `sync --registry` selects by. Lowercase alphanumerics and
// hyphens.
Name string `yaml:"name"`
URL string `yaml:"url"`
// ChartNamespace prefixes published charts (default "charts").
ChartNamespace string `yaml:"chartNamespace"`
// ImageNamespace prefixes mirrored images by their canonical source
// path (default "images"): <url>/<imageNamespace>/<source path>:<tag>.
ImageNamespace string `yaml:"imageNamespace"`
// ArtifactNamespace prefixes mirrored OCI artifacts (default "artifacts").
ArtifactNamespace string `yaml:"artifactNamespace"`
// Signing, when set, replaces the global signing block wholesale for
// pushes to this registry (never merged field-by-field).
Signing *Signing `yaml:"signing"`
}
Registry locates one mirror destination: a registry URL with path namespaces for charts, images and artifacts beneath it. Every entry publishes to every configured registry.
func (Registry) EffectiveSigning ¶ added in v0.11.0
EffectiveSigning resolves the signing config for pushes to this registry: its own block when set, else the global default.
type ResolvedAllowlist ¶ added in v0.12.0
ResolvedAllowlist is the resolved allowlist policy.
func (ResolvedAllowlist) Validate ¶ added in v0.12.0
func (a ResolvedAllowlist) Validate() error
Validate checks the resolved horizon: both day counts positive, and new entries never stamped past what lint accepts.
type Scan ¶
type Scan struct {
// Enabled is the master default (default true): false turns scanning
// off for every entry that does not say otherwise. With scanning
// enabled, at least one image scanner must be enabled in Scanners.
Enabled *bool `yaml:"enabled"`
Scanners Scanners `yaml:"scanners"`
// FailOn lists blocking severities (default CRITICAL, HIGH).
FailOn []string `yaml:"failOn"`
// IgnoreUnfixed skips findings with no fixed version (default true).
IgnoreUnfixed *bool `yaml:"ignoreUnfixed"`
// Allowlist holds the accepted-risk defaults.
Allowlist AllowlistPolicy `yaml:"allowlist"`
}
Scan is the config's scan block: the scanner roster plus the defaults every entry inherits. Entries override individual fields with the same shape (ScanOverride); EffectiveScanPolicy resolves the two.
func (Scan) EffectiveEnabled ¶ added in v0.11.0
EffectiveEnabled resolves the master scanning default (on).
type ScanEnabled ¶ added in v0.12.0
type ScanEnabled string
ScanEnabled is an entry's tri-state scan switch: auto, true or false. It decodes from a YAML bool as well as a string; any other spelling decodes as-is and is rejected by Valid, so lint can name it.
const ( ScanAuto ScanEnabled = "auto" ScanOn ScanEnabled = "true" ScanOff ScanEnabled = "false" )
The ScanEnabled values. The zero value means auto.
func ParseScanEnabled ¶ added in v0.12.0
func ParseScanEnabled(v any) (ScanEnabled, error)
ParseScanEnabled converts a decoded bool or string into a ScanEnabled. Strings pass through unvalidated (Valid checks them); other types fail.
func (ScanEnabled) Effective ¶ added in v0.12.0
func (e ScanEnabled) Effective() ScanEnabled
Effective resolves the default (auto).
func (*ScanEnabled) UnmarshalYAML ¶ added in v0.12.0
func (e *ScanEnabled) UnmarshalYAML(node *yaml.Node) error
UnmarshalYAML accepts a bool (enabled: true) or a string (enabled: auto).
func (ScanEnabled) Valid ¶ added in v0.12.0
func (e ScanEnabled) Valid() bool
Valid reports whether e is auto, true, false or unset.
type ScanOverride ¶
type ScanOverride struct {
// Enabled is auto (default), true or false. auto defers to the
// config's scan.enabled, then to the kind's own rule; true and false
// override scan.enabled for this entry.
Enabled ScanEnabled `yaml:"enabled"`
FailOn []string `yaml:"failOn"`
IgnoreUnfixed *bool `yaml:"ignoreUnfixed"`
Allowlist AllowlistPolicy `yaml:"allowlist"`
}
ScanOverride is an entry's scan block — a chart or artifact manifest's, or a build entry's. Every field is optional; unset fields inherit the config's scan block, then the built-in defaults.
func (ScanOverride) HasImageFields ¶ added in v0.12.0
func (o ScanOverride) HasImageFields() bool
HasImageFields reports whether the override sets a field that only an image scan consumes (failOn, ignoreUnfixed, allowlist) — meaningless on an entry with no images to scan.
type ScanPolicy ¶
type ScanPolicy struct {
// Enabled is false when scanning is off for the entry: an explicit
// enabled: false, or auto under a config-level scan.enabled: false.
Enabled bool
// Auto reports that Enabled came from auto, so the kind's own rule
// applies on top (an artifact scans only when it is a runnable image).
Auto bool
FailOn []string
IgnoreUnfixed bool
Allowlist ResolvedAllowlist
}
ScanPolicy is the resolved (entry over config over built-in) policy.
func EffectiveScanPolicy ¶
func EffectiveScanPolicy(global Scan, o ScanOverride) ScanPolicy
EffectiveScanPolicy resolves an entry's scan block against the config's: each field from the entry when set, else from the config, else the built-in default.
type ScannerToggle ¶
type ScannerToggle struct {
Enabled bool `yaml:"enabled"`
}
ScannerToggle enables or disables one scanner.
type Scanners ¶
type Scanners struct {
// OSV shells out to osv-scanner, which must be on PATH when enabled
// (default disabled).
OSV *ScannerToggle `yaml:"osv"`
// Grype shells out to grype, which must be on PATH when enabled
// (default disabled).
Grype *ScannerToggle `yaml:"grype"`
// Kubescape scans rendered manifests for misconfigurations (default
// enabled, warn-only; skipped with a warning when the binary is absent).
Kubescape *KubescapeScanner `yaml:"kubescape"`
}
Scanners toggles the pluggable scanners independently; none is forced, but an image scan with neither osv nor grype enabled is an error.
func (Scanners) GrypeEnabled ¶
GrypeEnabled resolves the grype default (off).
func (Scanners) KubescapeEnabled ¶
KubescapeEnabled resolves the kubescape default (on).
func (Scanners) KubescapeMode ¶
KubescapeMode resolves the kubescape mode default ("warn").
func (Scanners) OSVEnabled ¶
OSVEnabled resolves the osv default (off).
type Sidecar ¶
type Sidecar struct {
Extra []ExtraImage `yaml:"extra"`
}
Sidecar is a generated images.extra.yaml.
func LoadSidecar ¶
LoadSidecar reads an entry's generated sidecar. A missing file is an empty sidecar, not an error.
type Signing ¶
type Signing struct {
// Provider is "keyless" or "kms".
Provider string `yaml:"provider"`
Keyless *KeylessSigning `yaml:"keyless"`
KMS *KMSSigning `yaml:"kms"`
}
Signing configures how published OCI artifacts are signed: keyless (ambient OIDC, Fulcio certificate, transparency log) or a KMS key. The top-level block is the default; a per-registry signing block replaces it wholesale — the two are never merged field-by-field.
type Track ¶
type Track struct {
Image string `yaml:"image"`
// VersionConstraint bounds the pick; empty derives the pinned tag's
// own release train (">=<pin> <<major+1>.0.0"), so picks follow the
// current major and never hop one on their own.
VersionConstraint string `yaml:"versionConstraint"`
// CooldownDays overrides the global soak for this image; 0 disables
// the soak for an image that should track head.
CooldownDays *int `yaml:"cooldownDays"`
// ValuesFile defaults to the first discovery.valuesFiles entry.
ValuesFile string `yaml:"valuesFile"`
ValuesPath string `yaml:"valuesPath"`
}
Track is one tracked image: the tag is machine-picked into a values file, so the rule names both an image and a path that must already resolve there — the pick replaces a value, it never invents one. The value there is either a full image reference (the pick replaces image:tag) or a bare tag for charts that split image.repository from image.tag (the pick replaces just the tag).
type Update ¶
type Update struct {
// CooldownDays is how long a tag must have been published before a
// tracked-image pick may adopt it (default 3): a tag published this
// recently can still be yanked or hot-fixed, and the mirror should
// not be what discovers that. Kept short on purpose — every day here
// is a day the platform knowingly runs behind on security patches.
CooldownDays *int `yaml:"cooldownDays"`
}
Update tunes the tracked-tag soak window.
func (Update) EffectiveCooldownDays ¶
EffectiveCooldownDays resolves the default.
type VerifyRule ¶
type VerifyRule struct {
// Provider is none (documented gap), cosign-keyless or cosign-key.
Provider string `yaml:"provider"`
// CertificateIdentityRegexp is required for cosign-keyless.
CertificateIdentityRegexp string `yaml:"certificateIdentityRegexp"`
// CertificateOidcIssuer defaults to the GitHub Actions issuer.
CertificateOidcIssuer string `yaml:"certificateOidcIssuer"`
// Key is required for cosign-key: a URL or path to the public key.
Key string `yaml:"key"`
// SignatureDigestAlgorithm overrides the payload digest for
// cosign-key publishers signing with a non-default one (sha512).
SignatureDigestAlgorithm string `yaml:"signatureDigestAlgorithm"`
// SignatureRepository is where signatures live when the publisher
// stores them in a dedicated repository instead of alongside the
// artifact.
SignatureRepository string `yaml:"signatureRepository"`
}
VerifyRule declares upstream provenance for a chart, artifact or image.
func (VerifyRule) EffectiveOidcIssuer ¶
func (r VerifyRule) EffectiveOidcIssuer() string
EffectiveOidcIssuer resolves the issuer default.
func (VerifyRule) EffectiveProvider ¶
func (r VerifyRule) EffectiveProvider() string
EffectiveProvider resolves the provider default (none).