Commit c3154e1
fix(monitoring): guard against nil pointer in pooler PodMonitor template (#841)
* fix(monitoring): guard against nil pointer in pooler PodMonitor template
When a pooler defines `monitoring.enabled: true` without a `podMonitor`
sub-key, the template panics with a nil pointer error because Go
templates evaluate all arguments to `and` before calling the function.
Signed-off-by: Philippe Noël <philippemnoel@gmail.com>
Signed-off-by: Itay Grudev <itay+github.com@grudev.com>
Co-authored-by: Itay Grudev <itay@verito.digital>
Co-authored-by: Itay Grudev <itay+github.com@grudev.com>1 parent fbc5c54 commit c3154e1
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
2 | 6 | | |
3 | | - | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
| |||
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments