feat: configure service monitor port for authentication service

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-03-17 22:46:23 +08:00
parent 368c726b0b
commit ae64135a7b
4 changed files with 3 additions and 6 deletions

View File

@ -19,11 +19,6 @@ spec:
ports:
- port: {{ $service.port }}
targetPort: {{ $service.targetPort }}
{{- if $serviceMonitorEnabled }}
- port: {{ $service.port }}
targetPort: {{ $service.targetPort }}
name: metrics
{{- end }}
selector:
app.kubernetes.io/version: {{ $appVersion }}
app.kubernetes.io/name: "authentication"

View File

@ -15,7 +15,7 @@ metadata:
spec:
endpoints:
- path: /api/_/metrics
port: metrics
port: {{ .Values.authentication.serviceMonitor.port }}
{{- if .Values.authentication.serviceMonitor.interval }}
interval: {{ .Values.authentication.serviceMonitor.interval }}
{{- end }}

View File

@ -45,6 +45,7 @@ authentication:
terminationGracePeriodSeconds: 30
serviceMonitor:
enabled: true
port: 8004
labels:
release: kube-prometheus-stack
namespace: freeleaps-monitoring-system

View File

@ -25,6 +25,7 @@ authentication:
probes: {}
serviceMonitor:
enabled: false
port: 8004
labels: {}
namespace: ""
internal: 30s