Repository navigation
fix(restore): label each Velero Restore with the id of its restore - #638
Open
fatih-acar wants to merge 1 commit into
Open
fatih-acar wants to merge 1 commit into
fatih-acar wants to merge 1 commit into
Conversation
ADR-073 requires every Kubernetes object that Styrmin creates for a record to carry a label with the record's id. #631 added styrmin.io/backup-id to the Velero Backup; the Velero Restore was named styrmin-<restore id> but had no label with the restore's id. build_velero_restore now takes restore_id and sets the label styrmin.io/restore-id, and execute_restore_workflow passes the id of the Restore record it read. The backup lifecycle E2E test checks the label on the Velero Restore after the restore completes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying styrmin with
|
| Latest commit: |
4cf2160
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f1a7a8f0.styrmin.pages.dev |
| Branch Preview URL: | https://fix-velero-restore-id-label.styrmin.pages.dev |
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 #631. This pull request targets the branch of #631 (
034-backup-rename-description). After #631 merges, retarget it todevelop.Summary
ADR-073 requires every Kubernetes object that Styrmin creates for a record to carry a label with the record's id. #631 adds the label
styrmin.io/backup-idto the VeleroBackup. The VeleroRestorewas already namedstyrmin-<restore id>, but it had no label with the restore's id. With this change, an operator can select the VeleroRestoreof a restore by its id:Key changes
Restorehas the labelstyrmin.io/restore-idwith the id of the Styrmin restore. This applies to in-place restores, environment restores and the restores that an environment clone runs.build_velero_restoretakes the new required argumentrestore_id.execute_restore_workflowpasses the id of the Restore record that it read.Restoreobjects that earlier versions created keep their labels. Nothing in Styrmin updates or deletes VeleroRestoreobjects, so the older objects need no migration.Documentation updates
docs/docs/concepts-and-architecture/backups-and-restores.md, "What happens when you restore": the name and the label of the VeleroRestore, with thekubectlcommand.dev/knowledge/backend/backup-restore.md, "Builders": the label thatbuild_velero_restoresets.changelog/+velero-restore-id-label.added.md.Test plan
backend/tests/unit/agent/test_backup_builders.pychecks the label on in-place and cross-target restores.test_restore_workflow_labels_the_velero_restore_with_the_restore_idinbackend/tests/unit/workflows/test_restore_steps.pychecks that the flow passes the restore's id.uv run invoke format lintpassed locally.test_backup_and_restore_lifecycle(shardbackup) now reads the VeleroRestorestyrmin-<restore id>after the restore completes and checks itsstyrmin.io/restore-idlabel.chart-serverpod stayed inImagePullBackOffduring fixture setup, before the test body ran.E2E Tests (api / backup)and its UI variant for this test.Related
Backupobjects named and labelled by the backup's id.developagainst ADR-073. Issues from the same review: fix(jobs): the Jobs that runJob creates are never deleted, so each run leaves a Job and its pod in the deployment namespace #634, fix(agent): a namespace create that the Kubernetes API refuses is not reported, because apply_kubernetes_namespace ignores every error #635, fix(operator): drift correction never checks Traefik Middlewares, and deletes Services by name without a resourceVersion precondition #636, chore(agent): the deployment id is on Kubernetes objects under two label keys, styrmin/deployment_id and styrmin.io/deployment-id #637.