fix(authentik): correct errors blocking metrics from working (#49454)

**Description**
Correct the syntax for metrics definitions in the authentik chart, and
enable worker metrics
⚒️ Fixes  # <!--(issue)-->

**⚙️ 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
- [ ] 📜 Documentation Changes

**🧪 How Has This Been Tested?**
Tested against the values in the `ci/` directory and it now produces the
consistent, expected ServiceMonitor resources, Service resources, and
adds containerPorts.

**📃 Notes:**
I can't find an associated issue, but the values.yaml and templates both
indicate this was an old bug that needed to be fixed.

**✔️ Checklist:**

- [x] ⚖️ My code follows the style guidelines of this project
- [x] 👀 I have performed a self-review of my own code
- [x] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made changes to the documentation
- [x] 🧪 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
- [x] I made sure the title starts with `feat(chart-name):`,
`fix(chart-name):`, `chore(chart-name):`, `docs(chart-name):` or
`fix(docs):`

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Aspen
2026-06-24 23:23:14 -04:00
committed by GitHub
parent bbdd781876
commit 76e8fa8ee7
4 changed files with 38 additions and 17 deletions
+1 -1
View File
@@ -40,5 +40,5 @@ sources:
- https://github.com/trueforge-org/truecharts/tree/master/charts/stable/authentik
- https://goauthentik.io/docs/
type: application
version: 40.8.0
version: 40.8.1
@@ -11,6 +11,13 @@ server:
AUTHENTIK_LISTEN__HTTP: {{ printf "0.0.0.0:%v" .Values.service.http.ports.http.port | quote }}
AUTHENTIK_LISTEN__METRICS: {{ printf "0.0.0.0:%v" .Values.service.servermetrics.ports.servermetrics.port | quote }}
{{/* Worker-only config */}}
worker:
enabled: true
data:
AUTHENTIK_LISTEN__METRICS: {{ printf "0.0.0.0:%v" .Values.service.workermetrics.ports.workermetrics.port | quote }}
{{/* Shared config for server and worker */}}
server-worker:
enabled: true
data:
@@ -82,16 +82,5 @@
{{- $_ := set .Values.metrics.ldapmetrics "enabled" false -}}
{{- end -}}
{{/* FIXME: See values.yaml */}}
{{- $_ := set .Values.service.servermetrics "enabled" false -}}
{{- $_ := set .Values.service.proxymetrics "enabled" false -}}
{{- $_ := set .Values.service.radiusmetrics "enabled" false -}}
{{- $_ := set .Values.service.ldapmetrics "enabled" false -}}
{{- $_ := set .Values.metrics.servermetrics "enabled" false -}}
{{- $_ := set .Values.metrics.proxymetrics "enabled" false -}}
{{- $_ := set .Values.metrics.radiusmetrics "enabled" false -}}
{{- $_ := set .Values.metrics.ldapmetrics "enabled" false -}}
{{/* Render the templates */}}
{{ include "tc.v1.common.loader.apply" . }}
+30 -5
View File
@@ -145,6 +145,8 @@ workload:
name: server-worker
- configMapRef:
name: server-worker
- configMapRef:
name: worker
args:
- worker
probes:
@@ -372,6 +374,17 @@ service:
enabled: true
protocol: http
port: 10231
# Worker Metrics
workermetrics:
enabled: true
type: ClusterIP
targetSelector: worker
ports:
workermetrics:
enabled: true
protocol: http
port: 10235
targetSelector: worker
# Radius Metrics
radiusmetrics:
enabled: true
@@ -459,37 +472,49 @@ cnpg:
database: authentik
metrics:
# FIXME: Metrics do not work yet
servermetrics:
enabled: true
type: servicemonitor
endpoints:
- port: "{{ .Values.service.servermetrics.ports.servermetrics.port }}"
- port: "servermetrics"
path: /metrics
targetSelector: servermetrics
prometheusRule:
enabled: false
workermetrics:
enabled: true
type: servicemonitor
endpoints:
- port: "workermetrics"
path: /metrics
targetSelector: workermetrics
prometheusRule:
enabled: false
radiusmetrics:
enabled: true
type: servicemonitor
endpoints:
- port: "{{ .Values.service.radiusmetrics.ports.radiusmetrics.port }}"
- port: "radiusmetrics"
path: /metrics
targetSelector: radiusmetrics
prometheusRule:
enabled: false
ldapmetrics:
enabled: true
type: servicemonitor
endpoints:
- port: "{{ .Values.service.ldapmetrics.ports.ldapmetrics.port }}"
- port: "ldapmetrics"
path: /metrics
targetSelector: ldapmetrics
prometheusRule:
enabled: false
proxymetrics:
enabled: true
type: servicemonitor
endpoints:
- port: "{{ .Values.service.proxymetrics.ports.proxymetrics.port }}"
- port: "proxymetrics"
path: /metrics
targetSelector: proxymetrics
prometheusRule:
enabled: false
updated: true