You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,8 @@
17
17
*`--experimental.distributor.user-subring-size`
18
18
*[FEATURE] Added flag `-experimental.ruler.enable-api` to enable the ruler api which implements the Prometheus API `/api/v1/rules` and `/api/v1/alerts` endpoints under the configured `-http.prefix`. #1999
19
19
*[FEATURE] Added sharding support to compactor when using the experimental TSDB blocks storage. #2113
20
+
*[FEATURE] Add ability to override YAML config file settings using environment variables. #2147
21
+
*`-config.expand-env`
20
22
*[ENHANCEMENT] Add `status` label to `cortex_alertmanager_configs` metric to gauge the number of valid and invalid configs. #2125
21
23
*[ENHANCEMENT] Cassandra Authentication: added the `custom_authenticators` config option that allows users to authenticate with cassandra clusters using password authenticators that are not approved by default in [gocql](https://github.com/gocql/gocql/blob/81b8263d9fe526782a588ef94d3fa5c6148e5d67/conn.go#L27)#2093
22
24
*[ENHANCEMENT] Experimental TSDB: Export TSDB Syncer metrics from Compactor component, they are prefixed with `cortex_compactor_`. #2023
Copy file name to clipboardExpand all lines: docs/configuration/config-file-reference.md
+25-2Lines changed: 25 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Cortex can be configured using a YAML file - specified using the `-config.file`
11
11
12
12
To specify which configuration file to load, pass the `-config.file` flag at the command line. The file is written in [YAML format](https://en.wikipedia.org/wiki/YAML), defined by the scheme below. Brackets indicate that a parameter is optional.
13
13
14
-
Generic placeholders are defined as follows:
14
+
### Generic placeholders
15
15
16
16
*`<boolean>`: a boolean that can take the values `true` or `false`
17
17
*`<int>`: any integer matching the regular expression `[1-9]+[0-9]*`
@@ -20,7 +20,30 @@ Generic placeholders are defined as follows:
20
20
*`<url>`: an URL
21
21
*`<prefix>`: a CLI flag prefix based on the context (look at the parent configuration block to see which CLI flags prefix should be used)
22
22
23
-
Supported contents and default values of the config file:
23
+
### Use environment variables in the configuration
24
+
25
+
You can use environment variable references in the config file to set values that need to be configurable during deployment.
26
+
To do this, use:
27
+
28
+
```
29
+
${VAR}
30
+
```
31
+
32
+
Where VAR is the name of the environment variable.
33
+
34
+
Each variable reference is replaced at startup by the value of the environment variable.
35
+
The replacement is case-sensitive and occurs before the YAML file is parsed.
36
+
References to undefined variables are replaced by empty strings unless you specify a default value or custom error text.
37
+
38
+
To specify a default value, use:
39
+
40
+
```
41
+
${VAR:default_value}
42
+
```
43
+
44
+
Where default_value is the value to use if the environment variable is undefined.
45
+
46
+
### Supported contents and default values of the config file
24
47
25
48
```yaml
26
49
# The Cortex service to run. Supported values are: all, distributor, ingester,
Copy file name to clipboardExpand all lines: docs/configuration/config-file-reference.template
+25-2Lines changed: 25 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Cortex can be configured using a YAML file - specified using the `-config.file`
11
11
12
12
To specify which configuration file to load, pass the `-config.file` flag at the command line. The file is written in [YAML format](https://en.wikipedia.org/wiki/YAML), defined by the scheme below. Brackets indicate that a parameter is optional.
13
13
14
-
Generic placeholders are defined as follows:
14
+
### Generic placeholders
15
15
16
16
* `<boolean>`: a boolean that can take the values `true` or `false`
17
17
* `<int>`: any integer matching the regular expression `[1-9]+[0-9]*`
@@ -20,5 +20,28 @@ Generic placeholders are defined as follows:
20
20
* `<url>`: an URL
21
21
* `<prefix>`: a CLI flag prefix based on the context (look at the parent configuration block to see which CLI flags prefix should be used)
22
22
23
-
Supported contents and default values of the config file:
23
+
### Use environment variables in the configuration
24
+
25
+
You can use environment variable references in the config file to set values that need to be configurable during deployment.
26
+
To do this, use:
27
+
28
+
```
29
+
${VAR}
30
+
```
31
+
32
+
Where VAR is the name of the environment variable.
33
+
34
+
Each variable reference is replaced at startup by the value of the environment variable.
35
+
The replacement is case-sensitive and occurs before the YAML file is parsed.
36
+
References to undefined variables are replaced by empty strings unless you specify a default value or custom error text.
37
+
38
+
To specify a default value, use:
39
+
40
+
```
41
+
${VAR:default_value}
42
+
```
43
+
44
+
Where default_value is the value to use if the environment variable is undefined.
45
+
46
+
### Supported contents and default values of the config file
0 commit comments