|
1 | 1 | { |
2 | 2 | local container = $.core.v1.container, |
| 3 | + local envType = container.envType, |
3 | 4 | local pvc = $.core.v1.persistentVolumeClaim, |
4 | 5 | local statefulSet = $.apps.v1.statefulSet, |
5 | 6 | local volumeMount = $.core.v1.volumeMount, |
|
44 | 45 | container.withPorts($.compactor_ports) + |
45 | 46 | container.withArgsMixin($.util.mapToFlags($.compactor_args)) + |
46 | 47 | container.withEnvMap($.compactor_env_map) + |
| 48 | + container.withEnvMixin([ |
| 49 | + envType.withName('GOMAXPROCS') + |
| 50 | + envType.valueFrom.resourceFieldRef.withResource('requests.cpu'), |
| 51 | + envType.withName('GOMEMLIMIT') + |
| 52 | + envType.valueFrom.resourceFieldRef.withResource('requests.memory'), |
| 53 | + ]) + |
47 | 54 | container.withVolumeMountsMixin([volumeMount.new('compactor-data', '/data')]) + |
48 | 55 | // Do not limit compactor CPU and request enough cores to honor configured max concurrency. |
49 | | - $.util.resourcesRequests($._config.cortex_compactor_max_concurrency, '6Gi') + |
| 56 | + $.util.resourcesRequests($._config.cortex_compactor_max_concurrency, '5Gi') + |
50 | 57 | $.util.resourcesLimits(null, '6Gi') + |
51 | 58 | $.util.readinessProbe + |
52 | 59 | $.jaeger_mixin, |
53 | 60 |
|
54 | 61 | compactor_env_map:: { |
55 | | - GOMAXPROCS: std.toString($._config.cortex_compactor_max_concurrency), |
56 | | - GOMEMLIMIT: '5GiB', |
57 | 62 | }, |
58 | 63 |
|
59 | 64 | newCompactorStatefulSet(name, container):: |
|
0 commit comments