@@ -87,12 +87,13 @@ func (b *snapshotBackups) Start(ctx context.Context, k8sclient client.Client, cl
8787func (b * snapshotBackups ) reconcileSnapshot (
8888 ctx context.Context ,
8989 cl client.Client ,
90+ rsName string ,
9091 pvc string ,
9192 bcp * api.PerconaServerMongoDBBackup ,
9293) (* volumesnapshotv1.VolumeSnapshot , error ) {
9394 volumeSnapshot := & volumesnapshotv1.VolumeSnapshot {
9495 ObjectMeta : metav1.ObjectMeta {
95- Name : naming .VolumeSnapshotName (bcp , pvc ),
96+ Name : naming .VolumeSnapshotName (bcp , rsName ),
9697 Namespace : bcp .GetNamespace (),
9798 },
9899 }
@@ -150,7 +151,7 @@ func (b *snapshotBackups) reconcileSnapshots(
150151
151152 // ensure snapshot is created.
152153 pvcName := config .MongodDataVolClaimName + "-" + podName
153- snapshot , err := b .reconcileSnapshot (ctx , cl , pvcName , bcp )
154+ snapshot , err := b .reconcileSnapshot (ctx , cl , rs . Name , pvcName , bcp )
154155 if err != nil {
155156 return false , nil , errors .Wrap (err , "reconcile snapshot" )
156157 }
@@ -165,7 +166,7 @@ func (b *snapshotBackups) reconcileSnapshots(
165166 return false , nil , errors .Errorf ("snapshot error: %s" , ptr .Deref (snapshot .Status .Error .Message , "" ))
166167 }
167168 snapshots = append (snapshots , api.SnapshotInfo {
168- NodeName : rs .Node ,
169+ ReplsetName : rs .Name ,
169170 SnapshotName : snapshot .GetName (),
170171 })
171172 }
0 commit comments