Skip to content

Commit

Permalink
Restrict snapshot lookup to machine
Browse files Browse the repository at this point in the history
Signed-off-by: Danil-Grigorev <[email protected]>
  • Loading branch information
Danil-Grigorev committed Nov 25, 2024
1 parent 486e6af commit 2eb710f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ func (r *ETCDMachineSnapshotReconciler) checkSnapshotStatus(ctx context.Context,
var etcdSnapshotFile *k3sv1.ETCDSnapshotFile

for _, snapshot := range etcdSnapshotFiles.Items {
if strings.Contains(snapshot.Name, scope.snapshot.Name) {
snapshotName := fmt.Sprintf("%s-%s", scope.snapshot.Name, scope.snapshot.Spec.MachineName)
if strings.Contains(snapshot.Name, snapshotName) {
etcdSnapshotFile = &snapshot
break
}
Expand Down

0 comments on commit 2eb710f

Please sign in to comment.