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

Commit 1587ec5

Browse files
authored
Merge pull request #182 from grafana/add-azure-support-to-blocks-storage
Added Azure support to blocks storage
2 parents 68b0bf3 + d502516 commit 1587ec5

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* [ENHANCEMENT] Enable support for HA in the Cortex Alertmanager #147
1010
* [ENHANCEMENT] Support `alertmanager.fallback_config` option in the Alertmanager. #179
1111
* [ENHANCEMENT] Add support for S3 block storage. #181
12+
* [ENHANCEMENT] Add support for Azure block storage. #182
1213
* [BUGFIX] Add support the `local` ruler client type #175
1314
* [BUGFIX] Fixes `ruler.storage.s3.url` argument for the Ruler. It used an incorrect argument. #177
1415

cortex/config.libsonnet

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@
5757
// Use the Cortex chunks storage engine by default, while giving the ability
5858
// to switch to blocks storage.
5959
storage_engine: 'chunks', // Available options are 'chunks' or 'blocks'
60-
blocks_storage_backend: 'gcs',
60+
blocks_storage_backend: 'gcs', // Available options are 'gcs', 's3', 'azure'
6161
blocks_storage_bucket_name: error 'must specify blocks storage bucket name',
6262
blocks_storage_s3_endpoint: 's3.dualstack.us-east-1.amazonaws.com',
63+
blocks_storage_azure_account_name: if $._config.blocks_storage_backend == 'azure' then error 'must specify azure account name' else '',
64+
blocks_storage_azure_account_key: if $._config.blocks_storage_backend == 'azure' then error 'must specify azure account key' else '',
6365

6466
// Secondary storage engine is only used for querying.
6567
querier_second_storage_engine: null,
@@ -169,12 +171,19 @@
169171
'experimental.blocks-storage.s3.bucket-name': $._config.blocks_storage_bucket_name,
170172
'experimental.blocks-storage.s3.endpoint': $._config.blocks_storage_s3_endpoint,
171173
},
174+
azureBlocksStorageConfig:: $._config.genericBlocksStorageConfig {
175+
'experimental.blocks-storage.backend': 'azure',
176+
'experimental.blocks-storage.azure.container-name': $._config.blocks_storage_bucket_name,
177+
'experimental.blocks-storage.azure.account-name': $._config.blocks_storage_account_name,
178+
'experimental.blocks-storage.azure.account-key': $._config.blocks_storage_account_key,
179+
},
172180
// Blocks storage configuration, used only when 'blocks' storage
173181
// engine is explicitly enabled.
174182
blocksStorageConfig: (
175183
if $._config.storage_engine == 'blocks' || $._config.querier_second_storage_engine == 'blocks' then (
176184
if $._config.blocks_storage_backend == 'gcs' then $._config.gcsBlocksStorageConfig
177185
else if $._config.blocks_storage_backend == 's3' then $._config.s3BlocksStorageConfig
186+
else if $._config.blocks_storage_backend == 'azure' then $._config.azureBlocksStorageConfig
178187
else $._config.genericBlocksStorageConfig
179188
) else {}
180189
),

0 commit comments

Comments
 (0)