|
10 | 10 | storage_backend: 'none',
|
11 | 11 | storage_engine: 'tsdb',
|
12 | 12 |
|
13 |
| - // Allow to configure the querier disk. |
14 |
| - cortex_querier_data_disk_size: '10Gi', |
15 |
| - cortex_querier_data_disk_class: 'standard', |
16 |
| - |
17 | 13 | // Allow to configure the store-gateway disk.
|
18 | 14 | cortex_store_gateway_data_disk_size: '50Gi',
|
19 | 15 | cortex_store_gateway_data_disk_class: 'standard',
|
|
57 | 53 | 'experimental.tsdb.bucket-store.metadata-cache.memcached.max-get-multi-batch-size': '100',
|
58 | 54 | } else {},
|
59 | 55 |
|
60 |
| - // The querier should run on a dedicated volume used to sync TSDB |
61 |
| - // indexes, in order to not negatively affect the node performances |
62 |
| - // in case of sustained I/O or utilization. For this reason we: |
63 |
| - // 1. Remove default querier deployment |
64 |
| - // 2. Run querier as statefulset with PVC |
65 |
| - // 3. Replace the service switching it to the statefulset |
66 |
| - local querier_data_pvc = |
67 |
| - pvc.new() + |
68 |
| - pvc.mixin.spec.resources.withRequests({ storage: $._config.cortex_querier_data_disk_size }) + |
69 |
| - pvc.mixin.spec.withAccessModes(['ReadWriteOnce']) + |
70 |
| - pvc.mixin.spec.withStorageClassName($._config.cortex_querier_data_disk_class) + |
71 |
| - pvc.mixin.metadata.withName('querier-data'), |
72 |
| - |
73 |
| - querier_args+:: { |
74 |
| - // Reduce the number of blocks synched simultaneously, in order to |
75 |
| - // keep the memory utilization under control when the index header |
76 |
| - // is generated |
77 |
| - 'experimental.tsdb.bucket-store.tenant-sync-concurrency': 2, |
78 |
| - 'experimental.tsdb.bucket-store.block-sync-concurrency': 5, |
79 |
| - } + $.blocks_metadata_caching_config + (if !$._config.store_gateway_enabled then $.blocks_chunks_caching_config else {}), |
80 |
| - |
81 |
| - querier_container+:: |
82 |
| - container.withVolumeMountsMixin([ |
83 |
| - volumeMount.new('querier-data', '/data'), |
84 |
| - ]), |
85 |
| - |
86 |
| - querier_deployment: {}, |
87 |
| - |
88 |
| - querier_statefulset: |
89 |
| - statefulSet.new('querier', 3, [$.querier_container], querier_data_pvc) |
90 |
| - .withServiceName('querier') + |
91 |
| - statefulSet.mixin.metadata.withNamespace($._config.namespace) + |
92 |
| - statefulSet.mixin.metadata.withLabels({ name: 'querier' }) + |
93 |
| - statefulSet.mixin.spec.template.metadata.withLabels({ name: 'querier' } + $.querier_deployment_labels) + |
94 |
| - statefulSet.mixin.spec.selector.withMatchLabels({ name: 'querier' }) + |
95 |
| - statefulSet.mixin.spec.template.spec.securityContext.withRunAsUser(0) + |
96 |
| - statefulSet.mixin.spec.template.spec.withTerminationGracePeriodSeconds(60) + |
97 |
| - statefulSet.mixin.spec.updateStrategy.withType('RollingUpdate') + |
98 |
| - $.util.configVolumeMount('overrides', '/etc/cortex') + |
99 |
| - $.util.antiAffinity, |
100 |
| - |
101 |
| - querier_service: |
102 |
| - $.util.serviceFor($.querier_statefulset, $.querier_service_ignored_labels) + |
103 |
| - service.mixin.spec.withSelector({ name: 'query-frontend' }), |
| 56 | + querier_args+:: $.blocks_metadata_caching_config, |
104 | 57 |
|
105 | 58 | // The ingesters should persist TSDB blocks and WAL on a persistent
|
106 | 59 | // volume in order to be crash resilient.
|
|
218 | 171 | $.util.readinessProbe +
|
219 | 172 | $.jaeger_mixin,
|
220 | 173 |
|
221 |
| - store_gateway_statefulset: if !$._config.store_gateway_enabled then {} else |
| 174 | + store_gateway_statefulset: |
222 | 175 | statefulSet.new('store-gateway', 3, [$.store_gateway_container], store_gateway_data_pvc)
|
223 | 176 | .withServiceName('store-gateway') +
|
224 | 177 | statefulSet.mixin.metadata.withNamespace($._config.namespace) +
|
|
229 | 182 | statefulSet.mixin.spec.updateStrategy.withType('RollingUpdate') +
|
230 | 183 | statefulSet.mixin.spec.template.spec.withTerminationGracePeriodSeconds(120),
|
231 | 184 |
|
232 |
| - store_gateway_service: if !$._config.store_gateway_enabled then {} else |
| 185 | + store_gateway_service: |
233 | 186 | $.util.serviceFor($.store_gateway_statefulset),
|
234 | 187 | }
|
0 commit comments