ci: implement the documented Velero restore drill in the system-test job#1995
Open
devantler wants to merge 1 commit into
Open
ci: implement the documented Velero restore drill in the system-test job#1995devantler wants to merge 1 commit into
devantler wants to merge 1 commit into
Conversation
docs/dr/restore-drill.md has documented a CI restore drill since it was written, but no workflow ever implemented it -- the backup -> data-loss -> restore path was never regression-tested, so a Velero chart bump, RBAC drift or MinIO credential break would only surface during a real disaster (the worst possible time, as the 2026-06-10 vault incident demonstrated for the adjacent snapshot path). Implement the drill as steps inside the existing system-test job, reusing the Talos+Docker cluster it just reconciled (a separate job would pay a second 10-minute cluster bootstrap for no extra signal): 1. wait for BackupStorageLocation/default to be Available (Velero -> in-cluster MinIO, the local R2 stand-in) 2. create a dr-drill namespace + marker ConfigMap carrying run-id/sha 3. Backup CR scoped to the namespace, wait for Completed (fail fast on Failed/PartiallyFailed/FailedValidation) 4. delete the namespace and assert it is gone 5. Restore CR from the backup, wait for Completed 6. assert the restored ConfigMap's run-id matches GITHUB_RUN_ID Velero CRs are created with kubectl (no velero CLI install, no version drift). On any drill failure the step dumps BSL/Backup/Restore state and the Velero server log before exiting. Also truth up the docs: restore-drill.md described a standalone job with its own cluster and a timeout-minutes: 240 budget that never existed; runbook.md claimed the drill asserts etcd encryption-at-rest, which restore-drill.md itself explicitly scopes out. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
System-test status: the first run failed in ~2 min on a transient schema-fetch error during |
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.
Summary
docs/dr/restore-drill.md has documented a CI restore drill since it was written — but no workflow ever implemented it. The backup → data-loss → restore path was never regression-tested, so a Velero chart bump, RBAC drift, or MinIO credential break would only surface during a real disaster (as 2026-06-10 demonstrated for the adjacent vault-snapshot path, which turned out to be a health check in a trench coat).
This implements the drill as steps inside the existing
system-testjob, reusing the Talos+Docker cluster it just reconciled — a separate job (as the doc originally described) would pay a second ~10-minute cluster bootstrap for no extra signal. Added wall-clock: ~2-3 minutes.The drill
BackupStorageLocation/default→Available(Velero → in-cluster MinIO, the local R2 stand-in — same S3 code path as prod)dr-drillnamespace + marker ConfigMap carryingrun-id/shaBackupCR scoped to the namespace; wait forCompleted, failing fast onFailed/PartiallyFailed/FailedValidationRestoreCR from the backup; wait forCompletedrun-idmatchesGITHUB_RUN_IDVelero CRs are created with
kubectl(no velero CLI install, can't drift from the deployed Velero version). On failure the step dumps BSL/Backup/Restore state + the Velero server log.Doc truth-ups in the same change
restore-drill.mddescribed a standalone job with its own cluster and atimeout-minutes: 240budget that never existed → now describes the implemented steps.runbook.mdclaimed the drill asserts etcd encryption-at-rest;restore-drill.mditself explicitly scopes that out → corrected.Validation
bash -n; the heredoc Backup/Restore payloads verified as valid YAML at column 0.🤖 Generated with Claude Code