Skip to content

fix(dr): fully qualify Velero resource names in the rebuild workflow#2031

Merged
devantler merged 1 commit into
mainfrom
claude/dr-rebuild-velero-group-fix
Jun 11, 2026
Merged

fix(dr): fully qualify Velero resource names in the rebuild workflow#2031
devantler merged 1 commit into
mainfrom
claude/dr-rebuild-velero-group-fix

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Daily AI Assistant

Summary

Applies the lesson from the restore drill's first real run on #1995 to the merged DR rebuild workflow (#1997): CNPG also defines a backups resource, and kubectl resolves unqualified backups / restore names to postgresql.cnpg.io on this cluster, not velero.io.

In a real disaster, the merged workflow's backup-discovery loop would have listed CNPG Backup CRs, found no Completed ones (wrong phase semantics entirely), and aborted the whole restore with No Completed Velero backup found — after the cluster rebuild had already succeeded. The restore-phase polls had the same problem.

Every velero get/describe/wait in the workflow now uses fully-qualified names (backups.velero.io, restores.velero.io, backupstoragelocations.velero.io), with a comment documenting the collision. Same fix already verified green in the drill on #1995 (backups.velero.io/dr-drill: Completed).

Note: a stray push briefly recreated the merged PR's deleted branch (claude/dr-rebuild-workflow) before I noticed #1997 had merged — that branch has been deleted again; this PR is the proper carrier for the fix.

Validation

  • Workflow YAML parses (yq); both modified step scripts pass bash -n.
  • Workflow-only change; no k8s manifests touched.

🤖 Generated with Claude Code

Applies the lesson from the CI restore drill's first run (#1995):
CNPG also defines a 'backups' resource, and kubectl resolves the
unqualified 'backups'/'restore' names to the wrong API group on this
cluster. In a real DR the backup-discovery loop would have listed CNPG
Backup CRs, found no Completed ones, and aborted the whole restore with
'No Completed Velero backup found'. Every velero get/describe/wait now
uses backups.velero.io / restores.velero.io /
backupstoragelocations.velero.io.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@devantler devantler marked this pull request as ready for review June 11, 2026 19:07
@devantler devantler added this pull request to the merge queue Jun 11, 2026
Merged via the queue into main with commit 758c68c Jun 11, 2026
10 checks passed
@devantler devantler deleted the claude/dr-rebuild-velero-group-fix branch June 11, 2026 19:08
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board Jun 11, 2026
@botantler

botantler Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.52.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant