Snapshots
The rendered objects of one commit, kept with where they came from, and what that lets you compare, restore and promote.
A snapshot is the exact set of Kubernetes objects Wardn rendered for a deployment at one moment, stored together with where they came from. Snapshots are the idea the rest of Wardn is built on: you compare them, restore them, promote them and hold them, and none of that involves rendering again.
Why not just use the commit
A git commit is not what runs. Between the commit and the cluster sit Helm values, Kustomize overlays, chart versions and image tags that can move. Rendering an old commit today can give different objects than it gave last month.
A snapshot fixes that. It is stored once, after rendering, with image tags already resolved to digests. Whatever runs in the cluster can be traced to one snapshot, and that snapshot is still there.
commit abc1234 ──render──▶ snapshot 3f9a2c1
├─ objects (YAML, images pinned to digests)
├─ repository, branch, commit, pusher, pull request
├─ was the branch protected at the time
└─ origin: syncWhat a snapshot records
| Part | Meaning |
|---|---|
| Content id | Seven characters that name the snapshot, such as 3f9a2c1. It is what people call it in the web app. |
| Objects | Every object the deployment's apps rendered, with image tags resolved to digests. |
| Provenance | Repository, branch, commit, who pushed, the pull request if any, and whether the git host reported the branch as protected when the snapshot was made. |
| Parent | The snapshot before it, which makes a history. |
| Origin | Why it exists: sync (a push), promotion, restore, rollback, drift or emergency. |
The same commits and values always produce the same snapshot. That is the reason a promoted snapshot can be trusted to be what was tested.
What you do with snapshots
| Action | What happens |
|---|---|
| Compare | Any two snapshots of a deployment, or the running snapshot against the live cluster, object by object and field by field. Secret values are never shown, only a checksum change. See Compare snapshots. |
| Restore | Make an earlier snapshot the one the deployment wants, and apply it. The exact objects that ran before come back; nothing is rendered again. |
| Promote | Give another deployment of the same apps the same snapshot, for example staging to production. See Sync and arrival and Pipelines. |
| Hold | Stop a suspicious snapshot before it reaches a cluster, until a person decides. |
Held, released and discarded
Before a snapshot is applied, the render guard compares it with the deployment's last approved snapshot. A snapshot that renders no objects, or that would remove more than half of what the last approved one had, is held. The rules are in Sync and arrival.
A held snapshot is stored and shown in the Snapshots tab and in Activity, with the reason and the counts. Nothing reaches the cluster and the deployment keeps what it has. A person with the right then decides:
| Decision | Result |
|---|---|
| Release | The snapshot is approved and applied. |
| Discard | The snapshot is dropped. It stays in the history as discarded and is never compared against again. |
Releasing needs the snapshot:signoff permission. It is a duty: an Admin holds it only when designated, and the organization Owner holds it always. See the access model. A later push renders a new snapshot, which is compared with the last approved one again.
Restore, and the preflight
A restore applies through the same path as any deployment: the same operator, waves and prune limit. A job's undo job runs in place of its forward work, and a job with no undo is skipped. Before anything is applied, the preflight checks that the old snapshot can still run:
| Finding | Severity | Meaning |
|---|---|---|
| Cluster or environment gone | Blocking | The target no longer exists. |
| Image unresolvable | Blocking | The registry no longer has a digest in the snapshot, so pods could not pull it. |
| Secret missing | Blocking | A secret reference the snapshot needs is gone. |
| Secret changed or stale | Warning | A referenced secret's value changed since the snapshot ran. |
| Unchecked | Warning | The server could not check, so it did not. |
| Older migration | Warning | A newer snapshot ran a schema-migration job this one does not have; going back may need the database moved back too. |
A blocking finding stops the restore unless someone holding restore:bypass restores anyway with a reason. The bypass covers that one restore and is recorded with the findings.
A restore does not turn off sync on push. The next push to the tracked branch renders a new snapshot as usual, so after restoring, fix the commit in git or the branch will move the deployment forward again.
Rollback is an automatic restore: a job set to roll back on failure asks Wardn to restore the newest snapshot that applied successfully. It does nothing if there is none, if that snapshot's preflight is blocked, or if the failed apply was itself a rollback, so a bad rollback cannot loop.
Snapshots with the origin drift are exempt from the protected-branch guardrail.
How long snapshots are kept
Every snapshot of a deployment is kept. The standard Helm chart stores snapshot objects in Postgres by default; an S3 or GCS object store can hold them instead. See Backup and restore for what that means for your install.
Guides that use this
- Held snapshots: why a snapshot was held, and how to release or discard it.
- Compare snapshots.
- Restore and rollback.
- Recover from a bad change: a held snapshot, drift and a restore, start to finish.