Skip to content

Commit 0bc1ebd

Browse files
committed
docs/configuration: Document external_labels option
Let the documentation generator understand the `labels.Labels` field, and generate `config-file-reference.md` with ```console $ go run tools/doc-generator \ > docs/configuration/config-file-reference.template > docs/configuration/config-file-reference.md ``` Signed-off-by: Benoît Knecht <[email protected]>
1 parent abd5a6e commit 0bc1ebd

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

docs/configuration/config-file-reference.md

+3
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,9 @@ The `ruler_config` configures the Cortex ruler.
11811181
# CLI flag: -ruler.external.url
11821182
[external_url: <url> | default = ]
11831183
1184+
# Labels to add to all alerts.
1185+
[external_labels: <map of string to string> | default = ]
1186+
11841187
ruler_client:
11851188
# gRPC client max receive message size (bytes).
11861189
# CLI flag: -ruler.client.grpc-max-recv-msg-size

tools/doc-generator/parser.go

+2
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ func getFieldType(t reflect.Type) (string, error) {
257257
return "string", nil
258258
case "[]*relabel.Config":
259259
return "relabel_config...", nil
260+
case "labels.Labels":
261+
return "map of string to string", nil
260262
}
261263

262264
// Fallback to auto-detection of built-in data types

0 commit comments

Comments
 (0)