Fix double formatting on error message

fmt.Errorf() was called with a message rather than a format string
This commit is contained in:
Jille Timmermans 2021-09-25 09:51:48 +02:00
parent a53e2eaeab
commit 4c038d387c

View File

@ -289,7 +289,7 @@ func (c *Controller) syncHandler(key string) error {
if !metav1.IsControlledBy(deployment, foo) {
msg := fmt.Sprintf(MessageResourceExists, deployment.Name)
c.recorder.Event(foo, corev1.EventTypeWarning, ErrResourceExists, msg)
return fmt.Errorf(msg)
return fmt.Errorf("%s", msg)
}
// If this number of the replicas on the Foo resource is specified, and the