Skip to content

Commit 7ee32c5

Browse files
weicaoapecloud-bot
authored andcommitted
fix(operations): rebuild no-backup instances via fresh PVCs (#10295)
(cherry picked from commit 37eb9ff)
1 parent 0fedfd4 commit 7ee32c5

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

pkg/operations/rebuild_instance_inplace.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,16 @@ func getPVCMapAndVolumes(opsRes *OpsResource,
762762
}
763763
continue
764764
}
765+
if noBackup {
766+
pvcMap[sourcePVCName] = &corev1.PersistentVolumeClaim{
767+
ObjectMeta: metav1.ObjectMeta{
768+
Name: sourcePVCName,
769+
Namespace: targetPod.Namespace,
770+
},
771+
Spec: vct.Spec,
772+
}
773+
continue
774+
}
765775
pvcLabels := getWellKnownLabels(synthesizedComp)
766776
tmpPVC := &corev1.PersistentVolumeClaim{
767777
ObjectMeta: metav1.ObjectMeta{

0 commit comments

Comments
 (0)