Skip to content

Commit

Permalink
Fixing example in remote.kubernetes.secret.md to include nonsensitive…
Browse files Browse the repository at this point in the history
…() (#5704) (#5711)

The prometheus.remote_write basic_auth username is a string type and the agent will non start if the username is provided directly as a secret out of remote.kubernetes.secret.

Co-authored-by: Clayton Cornell <[email protected]>
(cherry picked from commit ffccd0a)

Co-authored-by: Nicolai Hornung <[email protected]>
  • Loading branch information
grafanabot and nicolai-hornung-bl authored Nov 8, 2023
1 parent 89ded9f commit 545adc2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ prometheus.remote_write "default" {
endpoint {
url = remote.kubernetes.configmap.endpoint.data["url"]
basic_auth {
username = remote.kubernetes.configmap.endpoint.data["username"]
username = nonsensitive(remote.kubernetes.configmap.endpoint.data["username"])
password = remote.kubernetes.secret.credentials.data["password"]
}
}
}
```

This example assumes that the Secret and ConfigMap have already been created, and that the appropriate field names
exist in their data.
exist in their data.

0 comments on commit 545adc2

Please sign in to comment.