diff --git a/CHANGELOG.md b/CHANGELOG.md index 66f75cc62f2..8cf6888b9e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * [BUGFIX] Cortex upgrade to fix an issue where unhealthy compactors can't be forgotten [#878](https://github.com/grafana/tempo/pull/878) (@joe-elliott) * [ENHANCEMENT] Added "query blocks" cli option. [#876](https://github.com/grafana/tempo/pull/876) (@joe-elliott) * [ENHANCEMENT] Added traceid to `trace too large message`. [#888](https://github.com/grafana/tempo/pull/888) (@mritunjaysharma394) +* [ENHANCEMENT] Add support to tempo workloads to `overrides` from single configmap in microservice mode. [#896](https://github.com/grafana/tempo/pull/896) (@kavirajk) ## v1.1.0-rc.0 / 2021-08-11 diff --git a/operations/jsonnet/microservices/compactor.libsonnet b/operations/jsonnet/microservices/compactor.libsonnet index 7b1e265e6fc..722e077b182 100644 --- a/operations/jsonnet/microservices/compactor.libsonnet +++ b/operations/jsonnet/microservices/compactor.libsonnet @@ -11,6 +11,7 @@ local target_name = 'compactor', local tempo_config_volume = 'tempo-conf', local tempo_data_volume = 'tempo-data', + local tempo_overrides_config_volume = 'overrides', tempo_compactor_container:: container.new(target_name, $._images.tempo) + @@ -24,6 +25,7 @@ ]) + container.withVolumeMounts([ volumeMount.new(tempo_config_volume, '/conf'), + volumeMount.new(tempo_overrides_config_volume, '/overrides'), ]) + $.util.withResources($._config.compactor.resources) + $.util.readinessProbe, @@ -42,6 +44,7 @@ }) + deployment.mixin.spec.template.spec.withVolumes([ volume.fromConfigMap(tempo_config_volume, $.tempo_compactor_configmap.metadata.name), + volume.fromConfigMap(tempo_overrides_config_volume, $.overrides_configmap.metadata.name), ]), tempo_compactor_service: diff --git a/operations/jsonnet/microservices/config.libsonnet b/operations/jsonnet/microservices/config.libsonnet index 7db8bf001ff..8b587be436a 100644 --- a/operations/jsonnet/microservices/config.libsonnet +++ b/operations/jsonnet/microservices/config.libsonnet @@ -97,6 +97,7 @@ backend: error 'Must specify a backend', // gcs|s3 bucket: error 'Must specify a bucket', + overrides_configmap_name: 'tempo-overrides', overrides+:: { super_user:: { max_traces_per_user: 100000, diff --git a/operations/jsonnet/microservices/configmap.libsonnet b/operations/jsonnet/microservices/configmap.libsonnet index 4f6f0c2b194..6b389c2b194 100644 --- a/operations/jsonnet/microservices/configmap.libsonnet +++ b/operations/jsonnet/microservices/configmap.libsonnet @@ -42,7 +42,7 @@ }, }, overrides: { - per_tenant_override_config: '/conf/overrides.yaml', + per_tenant_override_config: '/overrides/overrides.yaml', }, memberlist: { abort_if_cluster_join_fails: false, @@ -99,37 +99,31 @@ tempo_query_frontend_config:: $.tempo_config{}, - tempo_distributor_configmap: - configMap.new('tempo-distributor') + + // This will be the single configmap that stores `overrides.yaml`. + overrides_configmap: + configMap.new($._config.overrides_configmap_name) + configMap.withData({ - 'tempo.yaml': k.util.manifestYaml($.tempo_distributor_config), - }) + - configMap.withDataMixin({ 'overrides.yaml': k.util.manifestYaml({ overrides: $._config.overrides, }), }), + tempo_distributor_configmap: + configMap.new('tempo-distributor') + + configMap.withData({ + 'tempo.yaml': k.util.manifestYaml($.tempo_distributor_config), + }), + tempo_ingester_configmap: configMap.new('tempo-ingester') + configMap.withData({ 'tempo.yaml': k.util.manifestYaml($.tempo_ingester_config), - }) + - configMap.withDataMixin({ - 'overrides.yaml': k.util.manifestYaml({ - overrides: $._config.overrides, - }), }), tempo_compactor_configmap: configMap.new('tempo-compactor') + configMap.withData({ 'tempo.yaml': k.util.manifestYaml($.tempo_compactor_config), - }) + - configMap.withDataMixin({ - 'overrides.yaml': k.util.manifestYaml({ - overrides: $._config.overrides, - }), }), tempo_querier_configmap: diff --git a/operations/jsonnet/microservices/distributor.libsonnet b/operations/jsonnet/microservices/distributor.libsonnet index c521952940d..19c7e460eae 100644 --- a/operations/jsonnet/microservices/distributor.libsonnet +++ b/operations/jsonnet/microservices/distributor.libsonnet @@ -11,6 +11,7 @@ local target_name = 'distributor', local tempo_config_volume = 'tempo-conf', + local tempo_overrides_config_volume = 'overrides', tempo_distributor_container:: container.new(target_name, $._images.tempo) + @@ -24,6 +25,7 @@ ]) + container.withVolumeMounts([ volumeMount.new(tempo_config_volume, '/conf'), + volumeMount.new(tempo_overrides_config_volume, '/overrides'), ]) + $.util.withResources($._config.distributor.resources) + $.util.readinessProbe, @@ -46,6 +48,7 @@ }) + deployment.mixin.spec.template.spec.withVolumes([ volume.fromConfigMap(tempo_config_volume, $.tempo_distributor_configmap.metadata.name), + volume.fromConfigMap(tempo_overrides_config_volume, $.overrides_configmap.metadata.name), ]), tempo_distributor_service: diff --git a/operations/jsonnet/microservices/ingester.libsonnet b/operations/jsonnet/microservices/ingester.libsonnet index 8cf4c4ce97f..dfe0179780c 100644 --- a/operations/jsonnet/microservices/ingester.libsonnet +++ b/operations/jsonnet/microservices/ingester.libsonnet @@ -12,6 +12,7 @@ local target_name = 'ingester', local tempo_config_volume = 'tempo-conf', local tempo_data_volume = 'ingester-data', + local tempo_overrides_config_volume = 'overrides', tempo_ingester_pvc:: pvc.new() @@ -35,6 +36,7 @@ container.withVolumeMounts([ volumeMount.new(tempo_config_volume, '/conf'), volumeMount.new(tempo_data_volume, '/var/tempo'), + volumeMount.new(tempo_overrides_config_volume, '/overrides'), ]) + $.util.withResources($._config.ingester.resources) + $.util.readinessProbe, @@ -57,6 +59,7 @@ }) + statefulset.mixin.spec.template.spec.withVolumes([ volume.fromConfigMap(tempo_config_volume, $.tempo_ingester_configmap.metadata.name), + volume.fromConfigMap(tempo_overrides_config_volume, $.overrides_configmap.metadata.name), ]), tempo_ingester_service: