From 831cdf2bdeb5c42eb88ccb87fcb6c1228d3a2f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Le=20Blay?= Date: Tue, 28 Nov 2023 14:41:07 +0100 Subject: [PATCH] feat: add template value for kratos metric path (#654) --- hacks/values/kratos.yaml | 3 +++ helm/charts/kratos/templates/service-admin.yaml | 2 +- helm/charts/kratos/values.yaml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hacks/values/kratos.yaml b/hacks/values/kratos.yaml index 416021312c..57f29a78e8 100644 --- a/hacks/values/kratos.yaml +++ b/hacks/values/kratos.yaml @@ -331,3 +331,6 @@ test: busybox: repository: docker.io/library/busybox tag: 1.36 +service: + admin: + metricsPath: "/admin/metrics/different-prometheus-path" diff --git a/helm/charts/kratos/templates/service-admin.yaml b/helm/charts/kratos/templates/service-admin.yaml index 5016e5ef30..7992d7f94e 100644 --- a/helm/charts/kratos/templates/service-admin.yaml +++ b/helm/charts/kratos/templates/service-admin.yaml @@ -53,7 +53,7 @@ metadata: {{- end }} spec: endpoints: - - path: /admin/metrics/prometheus + - path: {{ .Values.service.admin.metricsPath }} port: {{ .Values.service.admin.name }} scheme: {{ .Values.serviceMonitor.scheme }} interval: {{ .Values.serviceMonitor.scrapeInterval }} diff --git a/helm/charts/kratos/values.yaml b/helm/charts/kratos/values.yaml index 617543498e..450db75061 100644 --- a/helm/charts/kratos/values.yaml +++ b/helm/charts/kratos/values.yaml @@ -39,6 +39,8 @@ service: annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" + # -- Path to the metrics endpoint + metricsPath: /admin/metrics/prometheus public: enabled: true type: ClusterIP