Skip to content

Add snapshot command, diff summary, and refactor CLI args - #41

Merged
Boomatang merged 3 commits into
mainfrom
snapshot
Jun 28, 2026
Merged

Add snapshot command, diff summary, and refactor CLI args#41
Boomatang merged 3 commits into
mainfrom
snapshot

Conversation

@Boomatang

Copy link
Copy Markdown
Owner

Description

Adds a new snapshot subcommand that captures the state of cluster resources at configurable intervals, saving each snapshot to a SQLite database with auto-suffixed labels (<label>-0, <label>-1, ...). The command supports a time-based --delay between runs, a --count limit on iterations, and a --limit on total runtime. This lays the groundwork for future detection of runaway resource generation.

Also adds a summary section to the diff command output (both TTY and JSON formats) showing counts of added, updated, and deleted resources.

CLI argument definitions and shared cluster interaction functions (getCrdList, getCRJson) have been extracted from get.zig into dedicated args.zig and cluster.zig modules so they can be reused by both the get and snapshot commands. The compareStrings utility was similarly moved to utils.zig.

Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
A snapshot of a cluster can be taken at given intervals. This is work is
to allow the runaway generation detection later.

Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
@Boomatang
Boomatang merged commit dd9b4eb into main Jun 28, 2026
2 checks passed
@Boomatang
Boomatang deleted the snapshot branch June 28, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant