Commit 4b5c1d4
authored
Honor cpu:null on the agent container resources (#334)
A consumer-supplied cpu:null on agents[].resources.limits was rendering
into the AmazonCloudWatchAgent CR as a literal cpu: null, which is invalid
under the CRD, instead of removing the cpu limit. The agent resources go
through mergeOverwrite over the chart defaults, and sprig's mergeOverwrite
keeps nil source values, so the null survived into the merged map.
Add a cloudwatch-agent.pruneNulls helper that strips nil leaves from the
merged resources map before rendering, so cpu:null removes the limit
(matching how the fluent-bit DaemonSet, which never merges over a default,
already behaves).1 parent 4102810 commit 4b5c1d4
2 files changed
Lines changed: 19 additions & 1 deletion
File tree
- charts/amazon-cloudwatch-observability/templates
- linux
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
0 commit comments