Skip to main content

Module snapshot

Module snapshot 

Source
Expand description

The Snapshot CRD — a single kopia snapshot as a Kubernetes object. ADR-0001 §3.4, ADR-0003 §4.5.

Three origins (canonical value lives in status.origin):

  • scheduled — created by a SnapshotSchedule; spec carries policyRef.
  • manual — created by kubectl create / external automation; spec carries policyRef.
  • discovered— materialized by the catalog scan; spec is empty/absent.

Structs§

CleanupStatus
One-shot markers for the cleanups a terminal Snapshot performs, mirroring HookExecutionStatus: the stamp IS the idempotence, so a stamped Snapshot’s steady-state reconcile is a no-op forever.
HookExecutionStatus
When each hook list completed.
JobStatus
The mover Job backing a scheduled/manual Snapshot; absent for discovered.
ResolvedSnapshot
Frozen recipe values pinned at run time.
ResolvedSource
One resolved source backed up by a run — a concrete PVC and its kopia path.
Snapshot
Auto-generated derived type for SnapshotSpec via CustomResource
SnapshotInfo
Identifies the kopia snapshot a Snapshot CR owns.
SnapshotSpec
A single kopia snapshot represented as a Kubernetes object.
SnapshotStats
Stats populated from kopia’s JSON output.
SnapshotStatus
Observed state of a Snapshot.
SnapshotTiming
Timing of a snapshot run.
StagedSources
The CSI staging objects a backup created so kopia reads a point-in-time copy of the source PVC.

Enums§

Origin
How a Snapshot came to exist. Canonical value mirrored from the kopiur.home-operations.com/origin label. Origin drives the deletion-policy default: discovered backups are forced to Retain because the operator did not create those snapshots.
PrunedBy
Which operator lifecycle removed a Snapshot (the pruned-by annotation).
SnapshotPhase
Lifecycle phase of a Snapshot.

Functions§

repository_ref_for
Derive the repository a Snapshot belongs to: a produced snapshot pins it in status.resolved.repository; a discovered snapshot carries its Repository/ClusterRepository as the controller ownerReference (it has no resolved block). Pure. Shared by the Restore reconciler (spec.repository derivation for snapshotRef) and the kubectl kopiur browse data-plane, so the derivation rule cannot fork.