389a8460e4
### Benefits Can protect metrics endpoint with `Bearer` token authentication provided by gitea. see PR #637 for previous discussion. ### Possible drawbacks No possible drawbacks ### Applicable issues - fixes #635 ### Additional information ``` gitea: metrics: enabled: true token: "somepassword" serviceMonitor: enabled: true ``` Using above configuration is sufficient to secure /metrics endpoint with bearer token and corresponding ServiceMonitor. ### Checklist - [x] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm) - [ ] ~~Breaking changes are documented in the `README.md`~~ Not applicable - [x] Templating unittests are added Signed-off-by: Hitesh Nayak <hiteshnayak305@gmail.com> Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/719 Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.com> Co-authored-by: Hitesh Nayak <hiteshnayak305@gmail.com> Co-committed-by: Hitesh Nayak <hiteshnayak305@gmail.com>
24 lines
689 B
YAML
24 lines
689 B
YAML
suite: Metrics secret template (monitoring disabled)
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
templates:
|
|
- templates/gitea/metrics-secret.yaml
|
|
tests:
|
|
- it: renders nothing if monitoring disabled and gitea.metrics.token empty
|
|
set:
|
|
gitea.metrics.enabled: false
|
|
gitea.metrics.serviceMonitor.enabled: false
|
|
gitea.metrics.token: ""
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|
|
- it: renders nothing if monitoring disabled and gitea.metrics.token not empty
|
|
set:
|
|
gitea.metrics.enabled: false
|
|
gitea.metrics.serviceMonitor.enabled: false
|
|
gitea.metrics.token: "test-token"
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|