|
31 | 31 | std.ceil((self.memory_limit_mb * self.overprovision_factor) + self.memory_request_overhead_mb) * 1024 * 1024, |
32 | 32 | memory_limits_bytes:: |
33 | 33 | std.max(self.memory_limit_mb * 1.5 * 1024 * 1024, self.memory_request_bytes), |
34 | | - exporter_cpu_requests:: '50m', |
35 | | - exporter_cpu_limits:: '500m', |
36 | | - exporter_memory_request_bytes:: 50 * 1024 * 1024, |
37 | | - exporter_memory_limits_bytes:: 250 * 1024 * 1024, |
| 34 | + exporter_cpu_requests:: null, |
| 35 | + exporter_cpu_limits:: null, |
| 36 | + exporter_memory_requests:: null, |
| 37 | + exporter_memory_limits:: null, |
38 | 38 | use_topology_spread:: false, |
39 | 39 | topology_spread_max_skew:: 1, |
40 | 40 | extended_options:: [], |
|
64 | 64 | '--memcached.address=localhost:11211', |
65 | 65 | '--web.listen-address=0.0.0.0:9150', |
66 | 66 | ]) + |
67 | | - $.util.resourcesRequests(self.exporter_cpu_requests, $.util.bytesToK8sQuantity(self.exporter_memory_request_bytes)) + |
68 | | - $.util.resourcesLimits(self.exporter_cpu_limits, $.util.bytesToK8sQuantity(self.exporter_memory_limits_bytes)), |
| 67 | + // Only add requests or limits if they've been set to a non-null value |
| 68 | + (if self.exporter_cpu_requests == null && self.exporter_memory_requests == null then {} else $.util.resourcesRequests(self.exporter_cpu_requests, self.exporter_memory_requests)) + |
| 69 | + (if self.exporter_cpu_limits == null && self.exporter_memory_limits == null then {} else $.util.resourcesLimits(self.exporter_cpu_limits, self.exporter_memory_limits)), |
69 | 70 |
|
70 | 71 | local statefulSet = $.apps.v1.statefulSet, |
71 | 72 | local topologySpreadConstraints = k.core.v1.topologySpreadConstraint, |
|
0 commit comments