Customizing retention
Change the default of five snapshot versions per scope and watch the prune cycle do the work.
telark snapshots are retention-bounded. The default cap is 5 versions per scope so the snapshot PVC does not grow unbounded. You can raise or lower this from the dashboard; the prune cycle enforces the new limit on the next snapshot.
What "per scope" means
A scope is the (application, namespace) pair the snapshot is
keyed by. An application that spans two namespaces keeps up to
5 snapshots in each namespace — not 5 across both. This is
deliberate: keeping per-namespace history preserves the audit
trail when a multi-namespace application gets restructured.
Where the knob lives
The retention cap is on the GlobalConfig custom resource:
spec:
snapshots:
maxPerApp: 5The dashboard surfaces this under Settings → Insights & governance → Snapshot storage.
Change the value, hit Save. The dashboard issues a
PATCH /resources/globalconfig and the new cap applies to the
next snapshot cycle.
What "applying" looks like
There is no immediate prune on save. Retention is enforced when a new snapshot lands. The exporter, on every successful snapshot write:
- Checks the count of snapshots already on disk for the same scope.
- If the count exceeds
maxPerApp, removes the oldest entries from the PVC. - Updates the application CRD's
snapshotsarray to drop the removed entries.
Lowering the cap from 10 to 3 will not delete anything until the next snapshot is written. If you want to enforce a lower cap immediately, trigger a force-sync on the affected applications — the next cycle will write a snapshot, which triggers the prune.
Picking a value
A pragmatic frame:
- 5 (default) — a working window of recent state. Roughly one work-week of typical change cadence.
- 10–20 — useful for slow-moving applications where the rollback target may be days back.
- >50 — uncommon. You usually want a backup product (Velero, volume snapshots) for long-tail recovery, not telark's manifest store.
PVC sizing is the practical constraint. The Storage bars in the dashboard show consumed bytes per application — multiply the average by the cap to estimate.
Reading current usage
GET /snapshots/infos returns:
- Total PVC capacity.
- Used bytes.
- Snapshot count.
- Per-application top consumers.
This is what the Settings → Snapshot storage bar reads.
Excluding namespaces
A different lever in the same neighbourhood: exclude noisy
namespaces from discovery entirely. Set
spec.excludedNamespaces on the GlobalConfig CRD. Anything in an
excluded namespace is never discovered and therefore never
snapshotted, removing the storage cost from the floor.
What this knob does not do
- Not a per-application cap. Today retention is cluster-wide. Per-application overrides are on the ideas list.
- Not a time-based retention. The cap is count, not age. An application that changes once a year will keep its last 5 snapshots indefinitely.
- Not a guarantee for compliance. If you need long-term
audit, capture the NATS
telark.applications.updatetopic into your own store. The PVC is not designed as a compliance log.