Skip to content

Commit be88b67

Browse files
committed
Use optimistic locking when patching the node taints
1 parent af4c269 commit be88b67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/controllers/machine/machine_controller_noderef.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ func (r *Reconciler) patchNode(ctx context.Context, remoteClient client.Client,
356356
return nil
357357
}
358358

359-
return remoteClient.Patch(ctx, newNode, client.StrategicMergeFrom(node))
359+
return remoteClient.Patch(ctx, newNode, client.StrategicMergeFrom(node, client.MergeFromWithOptimisticLock{}))
360360
}
361361

362362
// shouldNodeHaveOutdatedTaint tries to compare the revision of the owning MachineSet to the MachineDeployment.

0 commit comments

Comments
 (0)