feat(uptime-kuma): snapshot the volume nightly with Longhorn - #75
Closed
PragalvaXFREZ wants to merge 1 commit into
Closed
PragalvaXFREZ wants to merge 1 commit into
PragalvaXFREZ wants to merge 1 commit into
Conversation
Declare a RecurringJob that takes a daily snapshot and retains seven, bound to the claim through the recurring-job label Longhorn copies onto the volume. Snapshots stay on the volume's disks; off-cluster copies remain the on-demand Velero path. Signed-off-by: Pragalva Sapkota <sapkotapragalva@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #73. Base retargets to
mainonce that merges.What
RecurringJobuptime-kuma-dailyinlonghorn-system: tasksnapshot, cron15 3 * * *, retain 7, concurrency 1. Declared beside the workload because the workload owns its lifecycle; Argo applies it to the namespace the manifest names.recurring-job.longhorn.io/uptime-kuma-daily: enabled, which is how Longhorn binds a volume to a named job.Why a Longhorn snapshot and not a Velero schedule
kubernetes/infra/storage/velero/README.mdrecords that no unattendedScheduleexists because R2 has a 1 GB ceiling and no provider-side quota. That contract is left intact. A Longhorn snapshot costs a few MB on disks with hundreds of GB free, runs inside the existing instance managers with no new pods, and covers the realistic failure for this workload: a corrupt SQLite file or a bad chart upgrade. It does not cover losing both workers. Off-cluster stays on-demand.Validation
kubeconform -strictpasses on the resources directory; the RecurringJob validates against the datreelonghorn.iocatalog schema.v1beta2.python3 scripts/check-docs.pypasses.After merge
The Kuma volume must carry the
recurring-job.longhorn.io/uptime-kuma-dailylabel. After the first 03:15 run, the Longhorn UI shows one snapshot on the volume.