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