Skip to content

Commit

Permalink
Use ssa.Patch to create machinepool machines
Browse files Browse the repository at this point in the history
  • Loading branch information
CecileRobertMichon committed Nov 20, 2023
1 parent 175cd18 commit b1e96b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exp/internal/controllers/machinepool_controller_phases.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ func (r *MachinePoolReconciler) createOrUpdateMachines(ctx context.Context, mp *
log.Info("Creating new Machine for infraMachine", "infraMachine", klog.KObj(infraMachine))
machine := computeDesiredMachine(mp, infraMachine, nil)

if err := r.Client.Create(ctx, machine); err != nil {
if err := ssa.Patch(ctx, r.Client, MachinePoolControllerName, machine); err != nil {
errs = append(errs, errors.Wrapf(err, "failed to create new Machine for infraMachine %q in namespace %q", infraMachine.GetName(), infraMachine.GetNamespace()))
continue
}
Expand Down

0 comments on commit b1e96b3

Please sign in to comment.