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: docs/user-guides/perses-dashboards.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -208,6 +208,54 @@ More examples can be found in the [community dashboards repository](https://gith
208
208
> [!IMPORTANT]
209
209
> **Automatic Datasource Detection**: Notice that the above example does not set a specific datasource for the dashboard. This is because Perses will automatically detect the available datasources in the namespace and use the default one it finds. A specific datasource can be set by adding a `datasource` field in the panel query or by adding a datasource variable to the dashboard so users can select the datasource they want to use.
210
210
211
+
## Secrets
212
+
Perses secrets are exclusively managed by the Perses Operator with PersesDatasource and PersesGlobalDatasource resources under the client field for proxy configuration. Review the [perses-operator API docs](https://github.com/rhobs/perses-operator/blob/main/docs/api.md) for full specifications.
213
+
214
+
> [!IMPORTANT]
215
+
To configure a secret to be used for proxy authentication, you can create a Kubernetes Secret with the necessary credentials and reference it in the `client` field used for the datasource proxy configuration. This will create a Perses secret in the project corresponding to the namespace where the CR is created. The secret will be named after the Datasource name with a `-secret` suffix. The secret must be referenced in `spec.config.spec.proxy.spec.secret`.
216
+
217
+
The following `PersesDatasource` illustrate examples of how to configure a secret.
218
+
```yaml
219
+
apiVersion: perses.dev/v1alpha1
220
+
kind: PersesDatasource
221
+
metadata:
222
+
name: prometheus-through-proxy
223
+
namespace: monitoring
224
+
spec:
225
+
config: ...
226
+
# Optional datasource proxy client configuration
227
+
client:
228
+
basicAuth:
229
+
type: secret
230
+
name: k8s-basicauth-secret-name
231
+
namespace: optional-namespacename # if the secret resides in another namespace
232
+
username: "actual-username"
233
+
password_path: "password-key-in-secret"# or an actual path if type is `file`
234
+
oauth:
235
+
type: secret
236
+
name: k8s-oauth-secret-name
237
+
# namespace: monitoring
238
+
clientIDPath: client-id-key-in-secret
239
+
clientSecretPath: client-secret-key-in-secret
240
+
tokenURL: https://auth.example.com/token
241
+
scopes:
242
+
- read:metrics
243
+
endpointParams:
244
+
audience: prometheus
245
+
authStyle: dunno
246
+
tls:
247
+
enable: true
248
+
caCert:
249
+
type: secret # May be of type `secret`, `configmap` or `file`
250
+
name: prometheus-certs # In this case the k8s secret name
251
+
certPath: ca.crt # The key in the secret
252
+
userCert:
253
+
type: secret # May be of type `secret`, `configmap` or `file`
254
+
name: prometheus-certs
255
+
certPath: tls.crt
256
+
privateKeyPath: tls.key
257
+
```
258
+
211
259
## RBAC permissions
212
260
213
261
The Perses operator creates the following `ClusterRole`s for datasources and dashboards:
0 commit comments