Skip to content

Commit 6eff188

Browse files
committed
Remove creation of 2 Events for the same event
`record.Infof()` and `record.Warnf()` both create an event, so there's no need to use both at the same time. This commit removes one such occurrence.
1 parent ee41129 commit 6eff188

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/cloud/services/loadbalancer/loadbalancer.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,7 @@ func (s *Service) getOrCreateMonitor(openStackCluster *infrav1.OpenStackCluster,
368368
monitor, err = s.loadbalancerClient.CreateMonitor(monitorCreateOpts)
369369
// Skip creating monitor if it is not supported by Octavia provider
370370
if capoerrors.IsNotImplementedError(err) {
371-
record.Warnf(openStackCluster, "SkippedCreateMonitor", "Health monitors are not supported with the current Octavia provider.")
372-
record.Eventf(openStackCluster, "SkippedCreateMonitor", "Health Monitor is not created as it's not implemented with the current Octavia provider.")
371+
record.Warnf(openStackCluster, "SkippedCreateMonitor", "Health Monitor is not created as it's not implemented with the current Octavia provider.")
373372
return nil
374373
}
375374

0 commit comments

Comments
 (0)