Skip to content

Commit 808b691

Browse files
dulekk8s-infra-cherrypick-robot
authored andcommitted
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 c9239d5 commit 808b691

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
@@ -364,8 +364,7 @@ func (s *Service) getOrCreateMonitor(openStackCluster *infrav1.OpenStackCluster,
364364
monitor, err = s.loadbalancerClient.CreateMonitor(monitorCreateOpts)
365365
// Skip creating monitor if it is not supported by Octavia provider
366366
if capoerrors.IsNotImplementedError(err) {
367-
record.Warnf(openStackCluster, "SkippedCreateMonitor", "Health monitors are not supported with the current Octavia provider.")
368-
record.Eventf(openStackCluster, "SkippedCreateMonitor", "Health Monitor is not created as it's not implemented with the current Octavia provider.")
367+
record.Warnf(openStackCluster, "SkippedCreateMonitor", "Health Monitor is not created as it's not implemented with the current Octavia provider.")
369368
return nil
370369
}
371370

0 commit comments

Comments
 (0)