diff --git a/staging/src/k8s.io/sample-controller/controller.go b/staging/src/k8s.io/sample-controller/controller.go index f279db5d2a0..82611e95602 100644 --- a/staging/src/k8s.io/sample-controller/controller.go +++ b/staging/src/k8s.io/sample-controller/controller.go @@ -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