From 02f17782a51aa5b5945c78e3bb1cb7db9cf44eba Mon Sep 17 00:00:00 2001 From: Hitesh Nayak Date: Fri, 19 Apr 2024 15:55:04 +0530 Subject: [PATCH] doc: add secure /metrics example in README Signed-off-by: Hitesh Nayak --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index defd747..fa66b0e 100644 --- a/README.md +++ b/README.md @@ -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.