Skip to content

Commit

Permalink
Merge pull request #1698 from Tualua/patch-1
Browse files Browse the repository at this point in the history
Fix example prometheus datasource
  • Loading branch information
theSuess authored Oct 2, 2024
2 parents 34ac85d + 707dd22 commit 4bede1c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/docs/datasources.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ metadata:
name: grafanadatasource-sample
spec:
valuesFrom:
- targetPath: "user"
- targetPath: "basicAuthUser"
valueFrom:
secretKeyRef:
name: "credentials"
key: "PROMETHEUS_USERNAME"
- targetPath: "secureJsonData.password"
- targetPath: "secureJsonData.basicAuthPassword"
valueFrom:
secretKeyRef:
name: "credentials"
Expand All @@ -48,12 +48,12 @@ spec:
basicAuth: true
url: http://prometheus-service:9090
isDefault: true
user: ${PROMETHEUS_USERNAME}
basicAuthUser: ${PROMETHEUS_USERNAME}
jsonData:
"tlsSkipVerify": true
"timeInterval": "5s"
secureJsonData:
"password": ${PROMETHEUS_PASSWORD} # Notice the brakes around PROMETHEUS_PASSWORD
"basicAuthPassword": ${PROMETHEUS_PASSWORD} # Notice the braces around PROMETHEUS_PASSWORD
```
**NOTE:** The secret must exist in the same namespace as the datasource.
Expand Down

0 comments on commit 4bede1c

Please sign in to comment.