Add condition to catch backup.velero.io labels

Signed-off-by: Joseph <jvaikath@redhat.com>
This commit is contained in:
Joseph
2025-10-22 11:21:48 -04:00
committed by Tiger Kaovilai
parent eae5bea469
commit 2d8a87fec4

View File

@@ -103,7 +103,7 @@ func (a *PVCAction) cleanupStaleVeleroLabels(pvc *corev1api.PersistentVolumeClai
// Clean stale Velero labels from main metadata
if pvc.Labels != nil {
for k, v := range pvc.Labels {
if strings.HasPrefix(k, "velero.io/") {
if strings.HasPrefix(k, "velero.io/") || strings.HasPrefix(k, "backup.velero.io/") {
// Only remove labels that are clearly stale from previous operations
shouldRemove := false