Skip to content

Commit 020111e

Browse files
committed
docs: OU-1055 Improve docs for: Perses Dashboard shows Certificate Error
1 parent 37b64f3 commit 020111e

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

docs/user-guides/perses-dashboards.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,54 @@ More examples can be found in the [community dashboards repository](https://gith
208208
> [!IMPORTANT]
209209
> **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.
210210
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+
211259
## RBAC permissions
212260
213261
The Perses operator creates the following `ClusterRole`s for datasources and dashboards:

0 commit comments

Comments
 (0)