From a961ac1d286040fa427c269010f4e1fce920fcbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Fri, 12 Dec 2025 13:00:39 +0100 Subject: [PATCH] OCPBUGS-67298: Don't record event for every reconcile Record events for when the machine is _actually_ updated, and change the event from "Reconciled" to "Updated". This is now in line with other providers. --- pkg/machine/actuator.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/machine/actuator.go b/pkg/machine/actuator.go index e62dd1803..d46190cc3 100644 --- a/pkg/machine/actuator.go +++ b/pkg/machine/actuator.go @@ -176,6 +176,8 @@ func (oc *OpenstackClient) Update(ctx context.Context, machine *machinev1.Machin } func (oc *OpenstackClient) reconcile(ctx context.Context, machine *machinev1.Machine) error { + originalResourceVersion := machine.ResourceVersion + machineSpec, err := clients.MachineSpecFromProviderSpec(machine.Spec.ProviderSpec) if err != nil { return maoMachine.InvalidMachineConfiguration("Cannot unmarshal providerSpec for %s: %v", machine.Name, err) @@ -233,7 +235,10 @@ func (oc *OpenstackClient) reconcile(ctx context.Context, machine *machinev1.Mac return err } - oc.eventRecorder.Eventf(machine, corev1.EventTypeNormal, "Reconciled", "Reconciled machine %v", machine.Name) + // Only record the Updated event if the machine was actually modified + if machine.ResourceVersion != originalResourceVersion { + oc.eventRecorder.Eventf(machine, corev1.EventTypeNormal, "Updated", "Updated machine %v", machine.Name) + } return nil }