Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* [ENHANCEMENT] Enable support for HA in the Cortex Alertmanager #147
* [ENHANCEMENT] Support `alertmanager.fallback_config` option in the Alertmanager. #179
* [ENHANCEMENT] Add support for S3 block storage. #181
* [ENHANCEMENT] Add support for Azure block storage. #182
* [BUGFIX] Add support the `local` ruler client type #175
* [BUGFIX] Fixes `ruler.storage.s3.url` argument for the Ruler. It used an incorrect argument. #177

Expand Down
11 changes: 10 additions & 1 deletion cortex/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@
// Use the Cortex chunks storage engine by default, while giving the ability
// to switch to blocks storage.
storage_engine: 'chunks', // Available options are 'chunks' or 'blocks'
blocks_storage_backend: 'gcs',
blocks_storage_backend: 'gcs', // Available options are 'gcs', 's3', 'azure'
blocks_storage_bucket_name: error 'must specify blocks storage bucket name',
blocks_storage_s3_endpoint: 's3.dualstack.us-east-1.amazonaws.com',
blocks_storage_azure_account_name: if $._config.blocks_storage_backend == 'azure' then error 'must specify azure account name' else '',
blocks_storage_azure_account_key: if $._config.blocks_storage_backend == 'azure' then error 'must specify azure account key' else '',

// Secondary storage engine is only used for querying.
querier_second_storage_engine: null,
Expand Down Expand Up @@ -169,12 +171,19 @@
'experimental.blocks-storage.s3.bucket-name': $._config.blocks_storage_bucket_name,
'experimental.blocks-storage.s3.endpoint': $._config.blocks_storage_s3_endpoint,
},
azureBlocksStorageConfig:: $._config.genericBlocksStorageConfig {
'experimental.blocks-storage.backend': 'azure',
'experimental.blocks-storage.azure.container-name': $._config.blocks_storage_bucket_name,
'experimental.blocks-storage.azure.account-name': $._config.blocks_storage_account_name,
'experimental.blocks-storage.azure.account-key': $._config.blocks_storage_account_key,
},
// Blocks storage configuration, used only when 'blocks' storage
// engine is explicitly enabled.
blocksStorageConfig: (
if $._config.storage_engine == 'blocks' || $._config.querier_second_storage_engine == 'blocks' then (
if $._config.blocks_storage_backend == 'gcs' then $._config.gcsBlocksStorageConfig
else if $._config.blocks_storage_backend == 's3' then $._config.s3BlocksStorageConfig
else if $._config.blocks_storage_backend == 'azure' then $._config.azureBlocksStorageConfig
else $._config.genericBlocksStorageConfig
) else {}
),
Expand Down