Skip to content

Commit bf654e0

Browse files
authored
Merge pull request #3453 from Sajiyah-Salat/raising-events-extended
📖 Update Raising events doc page
2 parents cf78f51 + 0920c99 commit bf654e0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/book/src/reference/raising-events.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ Following is an example of a code implementation that raises an Event.
4141

4242
</aside>
4343

44-
## How to be able to raise Events?
44+
### How to be able to raise Events?
4545

4646
Following are the steps with examples to help you raise events in your controller's reconciliations.
47-
Events are published from a Controller using an [EventRecorder]`type CorrelatorOptions struct`,
47+
Events are published from a Controller using an [EventRecorder][Events]`type CorrelatorOptions struct`,
4848
which can be created for a Controller by calling `GetRecorder(name string)` on a Manager. See that we will change the implementation scaffolded in `cmd/main.go`:
4949

5050
```go
@@ -60,6 +60,7 @@ which can be created for a Controller by calling `GetRecorder(name string)` on a
6060
```
6161

6262
### Allowing usage of EventRecorder on the Controller
63+
6364
To raise an event, you must have access to `record.EventRecorder` in the Controller. Therefore, firstly let's update the controller implementation:
6465
```go
6566
import (
@@ -89,6 +90,7 @@ which can be created for a Controller by calling `GetRecorder(name string)` on a
8990
}
9091
```
9192
### Granting the required permissions
93+
9294
You must also grant the RBAC rules permissions to allow your project to create Events. Therefore, ensure that you add the [RBAC][rbac-markers] into your controller:
9395
```go
9496
...

0 commit comments

Comments
 (0)