doc: add secure /metrics example in README

Signed-off-by: Hitesh Nayak <hiteshnayak305@gmail.com>
This commit is contained in:
Hitesh Nayak 2024-04-19 15:55:04 +05:30
parent 6e37421445
commit 02f17782a5
No known key found for this signature in database
GPG Key ID: D1EE65392CD1E987
1 changed files with 17 additions and 0 deletions

View File

@ -30,6 +30,7 @@
- [OAuth2 Settings](#oauth2-settings)
- [Configure commit signing](#configure-commit-signing)
- [Metrics and profiling](#metrics-and-profiling)
- [Secure Metrics Endpoint](#secure-metrics-endpoint)
- [Pod annotations](#pod-annotations)
- [Themes](#themes)
- [Renovate](#renovate)
@ -725,6 +726,22 @@ gitea:
ENABLE_PPROF: true
```
### Secure Metrics Endpoint
Metrics endpoint `/metrics` can be secured using `Bearer` token authentication. Providing non-empty `TOKEN` value will also add authentication parameters to `ServiceMonitor`.
```yaml
gitea:
metrics:
enabled: true
serviceMonitor:
enabled: true
config:
metrics:
TOKEN: "secure-token"
```
## Pod annotations
Annotations can be added to the Gitea pod.