From af62a7d7634bff7b09599cdc03fa91037f4d3ca4 Mon Sep 17 00:00:00 2001 From: Julien Nicolas de Verteuil <6644855+jndeverteuil@users.noreply.github.com> Date: Sat, 14 Oct 2023 16:30:33 -0400 Subject: [PATCH] fix(gitea) enable prometheus metrics on main service (#13477) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** The servicemonitor deployed with Gitea chart is bugged with the current helm chart because metrics are not enabled on Gitea properly. ![image](https://github.com/truecharts/charts/assets/6644855/c803c7b5-8838-411e-a75d-9c92e60f9201) The helm chart common.yaml template is looking for `metrics.enabled: true` but it should be `metrics.main.enabled: true` as per the current values. ![image](https://github.com/truecharts/charts/assets/6644855/87459c66-dc74-4d01-9c8c-26096af9098d) This bug currently results in `app.ini` to have an empty value: ![image](https://github.com/truecharts/charts/assets/6644855/677575c6-8dc6-4ce6-aaca-53d3c42a221b) **โš™๏ธ Type of change** - [ ] โš™๏ธ Feature/App addition - [x] ๐Ÿช› Bugfix - [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] ๐Ÿ”ƒ Refactor of current code **๐Ÿงช How Has This Been Tested?** Deploy the helm chart with the change **๐Ÿ“ƒ Notes:** **โœ”๏ธ Checklist:** - [x] โš–๏ธ My code follows the style guidelines of this project - [x] ๐Ÿ‘€ I have performed a self-review of my own code - [ ] #๏ธโƒฃ I have commented my code, particularly in hard-to-understand areas - [ ] ๐Ÿ“„ I have made corresponding changes to the documentation - [ ] โš ๏ธ My changes generate no new warnings - [ ] ๐Ÿงช I have added tests to this description that prove my fix is effective or that my feature works - [x] โฌ†๏ธ I increased versions for any altered app according to semantic versioning **โž• App addition** If this PR is an app addition please make sure you have done the following. - [ ] ๐Ÿชž I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] ๐Ÿ–ผ๏ธ I have added an icon in the Chart's root directory called `icon.png` --------- Signed-off-by: Julien Nicolas de Verteuil <6644855+jndeverteuil@users.noreply.github.com> --- charts/stable/gitea/Chart.yaml | 2 +- charts/stable/gitea/templates/_secrets.tpl | 2 +- charts/stable/gitea/values.yaml | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/charts/stable/gitea/Chart.yaml b/charts/stable/gitea/Chart.yaml index 374bed57afd..879659a4649 100644 --- a/charts/stable/gitea/Chart.yaml +++ b/charts/stable/gitea/Chart.yaml @@ -30,7 +30,7 @@ sources: - https://gitea.com/gitea/helm-chart - https://github.com/go-gitea/gitea type: application -version: 14.0.2 +version: 14.0.3 annotations: truecharts.org/catagories: | - GIT diff --git a/charts/stable/gitea/templates/_secrets.tpl b/charts/stable/gitea/templates/_secrets.tpl index b0d30ed35c0..620c8c8737b 100644 --- a/charts/stable/gitea/templates/_secrets.tpl +++ b/charts/stable/gitea/templates/_secrets.tpl @@ -44,7 +44,7 @@ secret: {{- end }} [metrics] - ENABLED = {{ .Values.metrics.enabled }} + ENABLED = {{ .Values.metrics.main.enabled }} {{- range $catindex, $catvalue := .Values.customConfig }} {{- if eq $catvalue.name "metrics" }} {{- range $index, $value := $catvalue.keys }} diff --git a/charts/stable/gitea/values.yaml b/charts/stable/gitea/values.yaml index 160946fb001..1ca8df4f16b 100644 --- a/charts/stable/gitea/values.yaml +++ b/charts/stable/gitea/values.yaml @@ -37,6 +37,9 @@ metrics: main: enabled: true type: "servicemonitor" + endpoints: + - port: main + path: /metrics ldap: enabled: false # name: