diff --git a/freeleaps/helm-pkg/authentication/templates/authentication/service.yaml b/freeleaps/helm-pkg/authentication/templates/authentication/service.yaml index aef953a1..c82add73 100644 --- a/freeleaps/helm-pkg/authentication/templates/authentication/service.yaml +++ b/freeleaps/helm-pkg/authentication/templates/authentication/service.yaml @@ -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" diff --git a/freeleaps/helm-pkg/authentication/templates/authentication/servicemonitor.yaml b/freeleaps/helm-pkg/authentication/templates/authentication/servicemonitor.yaml index 9e346010..ac9fe8ad 100644 --- a/freeleaps/helm-pkg/authentication/templates/authentication/servicemonitor.yaml +++ b/freeleaps/helm-pkg/authentication/templates/authentication/servicemonitor.yaml @@ -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 }} diff --git a/freeleaps/helm-pkg/authentication/values.prod.yaml b/freeleaps/helm-pkg/authentication/values.prod.yaml index a695c34e..cd0f3fc5 100644 --- a/freeleaps/helm-pkg/authentication/values.prod.yaml +++ b/freeleaps/helm-pkg/authentication/values.prod.yaml @@ -45,6 +45,7 @@ authentication: terminationGracePeriodSeconds: 30 serviceMonitor: enabled: true + port: 8004 labels: release: kube-prometheus-stack namespace: freeleaps-monitoring-system diff --git a/freeleaps/helm-pkg/authentication/values.yaml b/freeleaps/helm-pkg/authentication/values.yaml index c06d4219..13df6f68 100644 --- a/freeleaps/helm-pkg/authentication/values.yaml +++ b/freeleaps/helm-pkg/authentication/values.yaml @@ -25,6 +25,7 @@ authentication: probes: {} serviceMonitor: enabled: false + port: 8004 labels: {} namespace: "" internal: 30s