mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-03-13 15:41:06 +08:00
Update comment for syncHandler
``` // If the Deployment is not controlled by this Foo resource, we should log // a warning to the event recorder and return error msg ``` For a clearer understanding of the comment. Kubernetes-commit: db303bc2af859d48958e0b9c084a3b2983c1220f
This commit is contained in:
parent
2b8cca0f69
commit
1205a13b28
@ -284,7 +284,7 @@ func (c *Controller) syncHandler(key string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If the Deployment is not controlled by this Foo resource, we should log
|
// If the Deployment is not controlled by this Foo resource, we should log
|
||||||
// a warning to the event recorder and ret
|
// a warning to the event recorder and return error msg.
|
||||||
if !metav1.IsControlledBy(deployment, foo) {
|
if !metav1.IsControlledBy(deployment, foo) {
|
||||||
msg := fmt.Sprintf(MessageResourceExists, deployment.Name)
|
msg := fmt.Sprintf(MessageResourceExists, deployment.Name)
|
||||||
c.recorder.Event(foo, corev1.EventTypeWarning, ErrResourceExists, msg)
|
c.recorder.Event(foo, corev1.EventTypeWarning, ErrResourceExists, msg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user