fix(k8s-ui): label CNPG Backup spec.target as "Backup Target", not "Recovery Target" - #1569
Open
hisco wants to merge 1 commit into
Open
fix(k8s-ui): label CNPG Backup spec.target as "Backup Target", not "Recovery Target"#1569hisco wants to merge 1 commit into
hisco wants to merge 1 commit into
Conversation
…very Target CloudNativePG Backup.spec.target (primary | prefer-standby) is the policy for which instance runs the backup, not a restore destination. The detail renderer labeled it Recovery Target, which names CNPG's actual recovery target concept - that lives on Cluster.spec.bootstrap.recovery. Relabel to Backup Target, mirroring the upstream BackupTarget type, and fix the same term in the integrations doc. Ticket: RAD-403. Claude-Session: https://claude.ai/code/session_01KxZ3xt2G4KpexrKSoXQ91S
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.
Problem
CloudNativePG
Backup.spec.target(enumprimary | prefer-standby) is the policy deciding which instance runs the backup — it is not a restore destination. Radar's Backup detail renderer labeled it "Recovery Target", which names a different, real CNPG concept (point-in-time recovery target, which lives onCluster.spec.bootstrap.recovery.recoveryTarget). An operator reading "Recovery Target" on a Backup would reasonably conclude it controlled restore behavior; it does not.Fix
CNPGBackupRenderer, mirroring the upstreamBackupTargettype name so a CNPG operator recognizes it. ("Target Instance" was rejected —prefer-standbyis a policy, not a specific pod, and it would collide with the renderer's existing "Instance" property.)docs/integrations.md.No logic, accessor, data-key, or section changes.
Tests
Added a renderer test (none existed) asserting the corrected label renders, the misleading "Recovery Target" is gone, and the section is omitted when
spec.targetis unset — the label assertions fail against the pre-fix code. Full k8s-ui suite passes with no regressions.Ticket: RAD-403 (Velero/CNPG/Kyverno review).
https://claude.ai/code/session_01KxZ3xt2G4KpexrKSoXQ91S
Note
Low Risk
Label and documentation-only change with regression tests; no backup or restore behavior is modified.
Overview
Fixes misleading UI/docs for CloudNativePG Backup
spec.target(primary/prefer-standby): that field is the instance selection policy for where the backup runs, not a point-in-time recovery destination (which lives on Cluster bootstrap/recovery config).CNPGBackupRenderer now shows Backup Target instead of Recovery Target, with an inline comment clarifying the semantics. docs/integrations.md uses the same wording in the Backup detail bullet list. No accessors, keys, or rendering logic changed.
Adds CNPGBackupRenderer tests that assert the new label, forbid Recovery Target, and hide the target section when
spec.targetis unset.Reviewed by Cursor Bugbot for commit 5e31cbb. Bugbot is set up for automated code reviews on this repo. Configure here.