Commit cf68a3b
BUG/MINOR: avoid hard restarts when using a Global CRD
When using a global CRD, every state change triggers a hard restart on HAProxy
(even a simple pod scale):
```text
2022/08/03 16:20:49 DEBUG global.go:81 Global config updated: [TuneOptions: <nil pointer> != models.GlobalTuneOptions]
Restart required
```
When synchronizing a `core.haproxy.org.Global` resource, the comparison with
the corresponding settings in the HAProxy will always fail, because the
`TuneOptions` attribute of an initialized `models.Global` is a `<nil pointer>`
and the corresponding value returned by HAProxy is an empty
`models.GlobalTuneOptions`.
This PR sets an empty `models.GlobalTuneOptions` as default value of
`.TuneOptions` attribute to prevent unnecessary restarts.1 parent 1ca13cf commit cf68a3b
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
0 commit comments