Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use single configmap for overrides #896

Merged
merged 10 commits into from
Aug 19, 2021
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions operations/jsonnet/microservices/compactor.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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) +
Expand All @@ -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,
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions operations/jsonnet/microservices/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
26 changes: 10 additions & 16 deletions operations/jsonnet/microservices/configmap.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions operations/jsonnet/microservices/distributor.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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) +
Expand All @@ -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,
Expand All @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions operations/jsonnet/microservices/ingester.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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,
Expand All @@ -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:
Expand Down