Skip to content

Commit

Permalink
Merge pull request #4165 from rkosegi/patch-1
Browse files Browse the repository at this point in the history
📖 Simplify event recording example
  • Loading branch information
k8s-ci-robot authored Sep 14, 2024
2 parents 0dcb3a2 + 264499f commit ec4fee8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/book/src/reference/raising-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ Following is an example of a code implementation that raises an Event.

```go
// The following implementation will raise an event
r.Recorder.Event(cr, "Warning", "Deleting",
fmt.Sprintf("Custom Resource %s is being deleted from the namespace %s",
cr.Name,
cr.Namespace))
r.Recorder.Eventf(cr, "Warning", "Deleting",
"Custom Resource %s is being deleted from the namespace %s",
cr.Name, cr.Namespace)
```

</aside>
Expand Down Expand Up @@ -110,4 +109,4 @@ And then, run `$ make manifests` to update the rules under `config/rbac/role.yam
[Event-Example]: https://github.com/kubernetes/api/blob/6c11c9e4685cc62e4ddc8d4aaa824c46150c9148/core/v1/types.go#L6019-L6024
[Reason-Example]: https://github.com/kubernetes/api/blob/6c11c9e4685cc62e4ddc8d4aaa824c46150c9148/core/v1/types.go#L6048
[Message-Example]: https://github.com/kubernetes/api/blob/6c11c9e4685cc62e4ddc8d4aaa824c46150c9148/core/v1/types.go#L6053
[rbac-markers]: ./markers/rbac.md
[rbac-markers]: ./markers/rbac.md

0 comments on commit ec4fee8

Please sign in to comment.