Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 51b880a

Browse files
authored
Merge pull request #308 from grafana/migrate-alertmanager-config-to-new-storage
Changed alertmanager config to use the new storage config
2 parents be7b4d1 + fbc209d commit 51b880a

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* [CHANGE] Replaced the deprecated CLI flag `-limits.per-user-override-config` (removed in Cortex 1.9) with `-runtime-config.file`. #304
99
* [CHANGE] Ruler: changed ruler config to use the new storage config. #306
1010
* [CHANGE] Ruler: enabled API response compression. #306
11+
* [CHANGE] Alertmanager: changed alertmanager config to use the new storage config. #307
1112
* [FEATURE] Added "Cortex / Rollout progress" dashboard. #289 #290
1213
* [FEATURE] Added support for using query-scheduler component, which moves the queue out of query-frontend, and allows scaling up of query-frontend component. #295
1314
* [ENHANCEMENT] Added `newCompactorStatefulSet()` function to create a custom statefulset for the compactor. #287

cortex/config.libsonnet

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -253,19 +253,15 @@
253253
},
254254

255255
ruler_enabled: false,
256-
ruler_client_type: error 'you must specify a storage backend type for the ruler (azure, configdb, gcs, s3, local)',
257-
// TODO: Generic client generating functions would be nice.
258-
ruler_s3_bucket_name: $._config.s3_bucket_name,
256+
ruler_client_type: error 'you must specify a storage backend type for the ruler (azure, gcs, s3, local)',
257+
ruler_s3_bucket_name: error 'you must specify the ruler S3 bucket name',
259258
ruler_gcs_bucket_name: error 'must specify a GCS bucket name',
260259

261260
rulerClientConfig:
262261
{
263262
'ruler-storage.backend': $._config.ruler_client_type,
264263
} +
265264
{
266-
configdb: {
267-
configs_api_url: 'config.%s.svc.cluster.local' % $._config.namespace,
268-
},
269265
gcs: {
270266
'ruler-storage.gcs.bucket-name': $._config.ruler_gcs_bucket_name,
271267
},
@@ -284,26 +280,24 @@
284280
fallback_config: {},
285281
},
286282

287-
alertmanager_client_type: error 'you must specify a storage backend type for the alertmanager (azure, configdb, gcs, s3, local)',
288-
alertmanager_s3_bucket_name: $._config.s3_bucket_name,
283+
alertmanager_client_type: error 'you must specify a storage backend type for the alertmanager (azure, gcs, s3, local)',
284+
alertmanager_s3_bucket_name: error 'you must specify the alertmanager S3 bucket name',
289285
alertmanager_gcs_bucket_name: error 'must specify a GCS bucket name',
290286

291287
alertmanagerStorageClientConfig:
292288
{
293-
'alertmanager.storage.type': $._config.alertmanager_client_type,
289+
'alertmanager-storage.backend': $._config.alertmanager_client_type,
294290
} +
295291
{
296-
configdb: {
297-
configs_api_url: 'config.%s.svc.cluster.local' % $._config.namespace,
298-
},
299292
gcs: {
300-
'alertmanager.storage.gcs.bucketname': $._config.alertmanager_gcs_bucket_name,
293+
'alertmanager-storage.gcs.bucket-name': $._config.alertmanager_gcs_bucket_name,
301294
},
302295
s3: {
303-
'alertmanager.storage.s3.url': 'https://%s/%s' % [$._config.aws_region, $._config.alertmanager_s3_bucket_name],
296+
'alertmanager-storage.s3.region': $._config.aws_region,
297+
'alertmanager-storage.s3.bucket-name': $._config.alertmanager_s3_bucket_name,
304298
},
305299
'local': {
306-
'alertmanager.storage.local.directory': $._config.alertmanager_local_directory,
300+
'alertmanager-storage.local.path': $._config.alertmanager_local_directory,
307301
},
308302
}[$._config.alertmanager_client_type],
309303

0 commit comments

Comments
 (0)