From 64fa11d77703f2df1778356f08dd5aa8c776eef2 Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Tue, 9 Nov 2021 18:09:08 +0100 Subject: [PATCH 1/2] cortex: Define Azure ruler args Signed-off-by: Arve Knudsen --- CHANGELOG.md | 1 + cortex/config.libsonnet | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0fed5c..ae6c119 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,6 +78,7 @@ * [ENHANCEMENT] Add ability to override `datasource` for generated dashboards. #407 * [ENHANCEMENT] Use alertmanager jobname for alertmanager dashboard panels #411 * [ENHANCEMENT] Added `CortexDistributorReachingInflightPushRequestLimit` alert. #408 +* [ENHANCEMENT] Define Azure object storage ruler args. #416 * [BUGFIX] Fixed `CortexIngesterHasNotShippedBlocks` alert false positive in case an ingester instance had ingested samples in the past, then no traffic was received for a long period and then it started receiving samples again. #308 * [BUGFIX] Alertmanager: fixed `--alertmanager.cluster.peers` CLI flag passed to alertmanager when HA is enabled. #329 * [BUGFIX] Fixed `CortexInconsistentRuntimeConfig` metric. #335 diff --git a/cortex/config.libsonnet b/cortex/config.libsonnet index 1761bed..1002098 100644 --- a/cortex/config.libsonnet +++ b/cortex/config.libsonnet @@ -258,7 +258,11 @@ 'ruler-storage.s3.region': $._config.aws_region, 'ruler-storage.s3.bucket-name': $._config.ruler_storage_bucket_name, }, - azure: {}, + azure: { + 'ruler-storage.azure.container-name': '%(cluster)s-%(namespace)s-ruler' % $._config, + 'ruler-storage.azure.account-name': '$(BLOCKS_STORAGE_AZURE_ACCOUNT_NAME)', + 'ruler-storage.azure.account-key': '$(BLOCKS_STORAGE_AZURE_ACCOUNT_KEY)', + }, 'local': { 'ruler-storage.local.directory': $._config.ruler_local_directory, }, From afb7bc86d5f04b67eb27a7f7572afd2ed613c107 Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Wed, 10 Nov 2021 16:21:45 +0100 Subject: [PATCH 2/2] Parameterize Signed-off-by: Arve Knudsen --- cortex/config.libsonnet | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cortex/config.libsonnet b/cortex/config.libsonnet index 1002098..5ce9bff 100644 --- a/cortex/config.libsonnet +++ b/cortex/config.libsonnet @@ -245,6 +245,8 @@ ruler_enabled: false, ruler_client_type: error 'you must specify a storage backend type for the ruler (azure, gcs, s3, local)', ruler_storage_bucket_name: error 'must specify the ruler storage bucket name', + ruler_storage_azure_account_name: error 'must specify the ruler storage Azure account name', + ruler_storage_azure_account_key: error 'must specify the ruler storage Azure account key', rulerClientConfig: { @@ -259,9 +261,9 @@ 'ruler-storage.s3.bucket-name': $._config.ruler_storage_bucket_name, }, azure: { - 'ruler-storage.azure.container-name': '%(cluster)s-%(namespace)s-ruler' % $._config, - 'ruler-storage.azure.account-name': '$(BLOCKS_STORAGE_AZURE_ACCOUNT_NAME)', - 'ruler-storage.azure.account-key': '$(BLOCKS_STORAGE_AZURE_ACCOUNT_KEY)', + 'ruler-storage.azure.container-name': $._config.ruler_storage_bucket_name, + 'ruler-storage.azure.account-name': $._config.ruler_storage_azure_account_name, + 'ruler-storage.azure.account-key': $._config.ruler_storage_azure_account_key, }, 'local': { 'ruler-storage.local.directory': $._config.ruler_local_directory,