Skip to content

Commit

Permalink
Merge fix and small renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
spinillos committed Apr 29, 2024
1 parent 6e091e3 commit e73da77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
16 changes: 4 additions & 12 deletions docs/content/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,11 @@ docs](https://grafana.com/docs/grafana/latest/http_api/auth/) for more info.
## Grafana Cloud Prometheus
To interact with Grafana Cloud Prometheus, you must have these environment variables set:

<<<<<<< HEAD
| Name | Description | Required |
|--------------------| --- |----------|
| `MIMIR_ADDRESS` | URL for Grafana Cloud Prometheus instance | true |
| Name | Description | Required |
|-------------------|-----------------------------------------------------|----------|
| `MIMIR_ADDRESS` | URL for Grafana Cloud Prometheus instance | true |
| `MIMIR_TENANT_ID` | Tenant ID for your Grafana Cloud Prometheus account | true |
| `MIMIR_API_KEY` | Authentication token/api key | false |
=======
| Name | Description | Required |
|--------------------|-----------------------------------------------------|----------|
| `CORTEX_ADDRESS` | URL for Grafana Cloud Prometheus instance | true |
| `CORTEX_TENANT_ID` | Tenant ID for your Grafana Cloud Prometheus account | true |
| `CORTEX_API_KEY` | Authentication token/api key | true |
>>>>>>> f7c171e48e49970e97686a84c2d505c742b5bc9a
| `MIMIR_API_KEY` | Authentication token/api key | false |

Note, this will also work with other Mimir installations, alongside Grafana Cloud Prometheus.

Expand Down
4 changes: 2 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ func override(v *viper.Viper) {
}

// To keep retro compatibility
mimirBindings := map[string]string{
legacyBindings := map[string]string{
"MIMIR_ADDRESS": "CORTEX_ADDRESS",
"MIMIR_TENANT_ID": "CORTEX_TENANT_ID",
"MIMIR_API_KEY": "CORTEX_API_KEY",
}

for key, env := range bindings {
if val := getVal(env, mimirBindings); val != "" {
if val := getVal(env, legacyBindings); val != "" {
v.Set(key, val)
}
}
Expand Down

0 comments on commit e73da77

Please sign in to comment.