Expand description
The SnapshotPolicy CRD — the recipe. Idempotent; runs nothing on its own.
ADR-0001 §3.3, ADR-0003 §4.8.
Structs§
- Adoption
Summary - Summary of the most recent automatic adoption pass for a
SnapshotPolicy— discovered snapshots whose resolved identity matched this recipe and were re-attached (seeOrigin::Adopted), plus an on-demand re-scan request/ack pair mirroring the repository-levelcatalog-scan-requested-atannotation contract. - Compression
- Compression policy.
- Deep
Verification - Deep (scratch-restore) verification: restore the latest snapshot into an ephemeral volume, then discard.
- Error
Handling - Backup-side error-handling policy: let kopia complete a snapshot with errors rather than aborting.
- Files
- File-ignore policy.
- Hooks
- Pre/post snapshot hook lists.
- Http
Header - One HTTP header sent with an
httpRequesthook. - Http
Request Hook - A hook that issues an HTTP request for cross-system orchestration.
- Namespace
Selector - Restricts a
PvcSelectorto an explicit set of namespaces. - Policy
Deletion Spec - Deletion semantics for the
Snapshots carrying aSnapshotPolicy’s config label (sub-object per docs/dev/api-conventions.md §4 so future deletion knobs slot in without API breakage). MirrorsSnapshotSchedule’sScheduleDeletionSpec. - PvcSelector
- Selects PVCs across namespaces by label.
- PvcSource
- A single backup source addressed by PVC name.
- Quick
Verification - Quick (blob-level) verification tier: schedule for the frequent
kopia snapshot verify. - Resolved
Policy - The recipe as kopia would see it, pinned at admission and never re-rendered.
- Resolved
Policy Source - One resolved source — a concrete PVC and the path kopia records for it.
- Retention
Summary - Summary of the most recent GFS retention prune for a
SnapshotPolicy. - RunJob
Hook - A hook that materializes a full one-shot Job (k8up
PreBackupPodanalog). - Snapshot
Policy - Auto-generated derived type for SnapshotPolicySpec via
CustomResource - Snapshot
Policy Spec - What to back up: sources, identity, retention, policy, hooks.
- Snapshot
Policy Status - Observed state of a
SnapshotPolicy. - Source
- A single backup source; exactly one of
pvc,pvcSelector,nfs(webhook-enforced). - Staging
Spec SnapshotPolicy.spec.staging— knobs for the CSI capture (copyMethod: Snapshot/Clone) that runs before the mover. A sub-object so future staging fields slot in without API breakage.- Upload
- Upload parallelism (kopia’s upload policy); absent knobs leave kopia’s default.
- Verification
- First-class backup verification proving snapshots are restorable; opt-in, with quick and deep tiers.
- Workload
Exec Hook kubectl exec-style hook into a matched workload pod/container.
Enums§
- Copy
Method - Volume snapshot copy method. Closed enum. ADR §3.3.
- GroupBy
- Multi-PVC grouping strategy. Defaults to a consistent group snapshot across
all PVCs; set
Noneexplicitly to accept independent per-PVC snapshots, because a silent per-PVC fallback would produce inconsistent backups. - Hook
- One of three hook forms. Externally-tagged: the wire shape is
{ workloadExec: {...} },{ runJob: {...} }, or{ httpRequest: {...} }, and exactly one form is present. - Source
Path Strategy - How a selector-matched PVC’s source path is derived. Only relevant for
pvcSelectorsources, where one recipe expands to many PVCs and each needs a distinct kopia source path. Defaults toPvcName.
Functions§
- default_
ignore_ rules - The default OS-artifact exclude set for
Files.ignore_rules— filesystem/NAS junk that is never intentional user data, so excluding it by default is additive-safe. Per-entry rationale: - effective_
on_ policy_ delete - The effective cascade policy for a
SnapshotPolicy:spec.deletion.onPolicyDeletewhen the sub-object is present, elseRetain. (A default nested under an ABSENT optional sub-object does not materialize server-side — every read goes through this resolver.) - source_
mutates_ live_ volume - Whether this source’s mount lets the kubelet rewrite the live workload volume: a writable mount with no staging in front of it.
- source_
read_ only - Whether a source is mounted read-only. THE resolver for
Source::read_only’s absent case, so the CRD’s advertiseddefault: trueand the mount agree by construction rather than by coincidence.