fix: makes servicemonitor more configurable #1422

Open
only-a-user wants to merge 2 commits from only-a-user/forgejo-helm:fix/servicemonitor into main
First-time contributor

I had issues using the service monitor with prometheus, as the labels were constantly overridden, making it impossible to pull the metrics from the forgejo-http service. Additionally, I found the filter options to be a bit sparse, so i added some additional possibilities to configure the service monitor and added some best-practice fields.

Signed-off-by: only-a-user only-a-user@use.startmail.com

I had issues using the service monitor with prometheus, as the labels were constantly overridden, making it impossible to pull the metrics from the `forgejo-http` service. Additionally, I found the filter options to be a bit sparse, so i added some additional possibilities to configure the service monitor and added some best-practice fields. Signed-off-by: only-a-user <only-a-user@use.startmail.com>
fix: makes servicemonitor more configurable
Some checks failed
build / lint-node (pull_request) Failing after 23s
build / lint-helm (pull_request) Successful in 29s
build / e2e (v1.28.15+k3s1) (pull_request) Has been skipped
build / e2e (v1.32.9+k3s1) (pull_request) Has been skipped
build / e2e (v1.33.5+k3s1) (pull_request) Has been skipped
build / test-success (pull_request) Failing after 1s
build / publish (pull_request) Has been skipped
656937ca63
Signed-off-by: only-a-user <only-a-user@use.startmail.com>
viceice left a comment

Please run pnpm prettier-fix, commit and push

Please run `pnpm prettier-fix`, commit and push
Author
First-time contributor

Hi @viceice,

I ran pnpm prettier-fix and it changed nothing, so there is nothing to commit.

Hi @viceice, I ran `pnpm prettier-fix` and it changed nothing, so there is nothing to commit.
Owner

@only-a-user wrote in #1422 (comment):

Hi @viceice,

I ran pnpm prettier-fix and it changed nothing, so there is nothing to commit.

ah, sorry. please run pnpm readme:parameters

@only-a-user wrote in https://code.forgejo.org/forgejo-helm/forgejo-helm/pulls/1422#issuecomment-66868: > Hi @viceice, > > I ran `pnpm prettier-fix` and it changed nothing, so there is nothing to commit. ah, sorry. please run `pnpm readme:parameters`
docs: updates readme
All checks were successful
build / lint-node (pull_request) Successful in 22s
build / lint-helm (pull_request) Successful in 26s
build / e2e (v1.28.15+k3s1) (pull_request) Successful in 3m33s
build / e2e (v1.32.9+k3s1) (pull_request) Successful in 3m44s
build / e2e (v1.33.5+k3s1) (pull_request) Successful in 4m11s
build / test-success (pull_request) Successful in 2s
build / publish (pull_request) Has been skipped
e895656455
Signed-off-by: only-a-user <only-a-user@use.startmail.com>
Author
First-time contributor

All checks have passed, the PR should be ready to merge @viceice.

All checks have passed, the PR should be ready to merge @viceice.
viceice left a comment

please add helm unit tests.

please add helm unit tests.
@ -13,0 +16,4 @@
scrapeTimeout: {{ default "30s" .Values.gitea.metrics.serviceMonitor.scrapeTimeout }}
path: /metrics
port: http
scheme: http
Owner

isn't this the default value and also path ? we should not set default values if they're not configurable anyways

isn't this the default value and also `path` ? we should not set default values if they're not configurable anyways
@ -13,0 +17,4 @@
path: /metrics
port: http
scheme: http
jobLabel: forgejo
Owner

what was the default value before this change?

what was the default value before this change?
All checks were successful
build / lint-node (pull_request) Successful in 22s
Required
Details
build / lint-helm (pull_request) Successful in 26s
Required
Details
build / e2e (v1.28.15+k3s1) (pull_request) Successful in 3m33s
Required
Details
build / e2e (v1.32.9+k3s1) (pull_request) Successful in 3m44s
Required
Details
build / e2e (v1.33.5+k3s1) (pull_request) Successful in 4m11s
Required
Details
build / test-success (pull_request) Successful in 2s
Required
Details
build / publish (pull_request) Has been skipped
This pull request has changes requested by an official reviewer.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix/servicemonitor:only-a-user-fix/servicemonitor
git switch only-a-user-fix/servicemonitor
Sign in to join this conversation.
No reviewers
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
forgejo-helm/forgejo-helm!1422
No description provided.