From 910438a6e70b31bbc3cbbf46d7c02b5ea7d3b93f Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Thu, 29 Dec 2022 17:38:37 +0100 Subject: [PATCH] fix: expose metrics for same server --- deploy/caddy/caddy.json | 16 +++------------- deploy/helm/templates/deployment.yaml | 7 ++----- deploy/helm/templates/pod_monitor.yaml | 2 +- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/deploy/caddy/caddy.json b/deploy/caddy/caddy.json index a0dc24e..5ab2d4c 100644 --- a/deploy/caddy/caddy.json +++ b/deploy/caddy/caddy.json @@ -14,19 +14,9 @@ "root": "/usr/share/caddy", "index_names": [ "index.html" - ] - } - ] - } - ] - }, - "metrics" : { - "listen": [ - ":9100" - ], - "routes": [ - { - "handle": [ + ], + "pass_thru": true + }, { "handler": "metrics" } diff --git a/deploy/helm/templates/deployment.yaml b/deploy/helm/templates/deployment.yaml index 103994f..f80cf68 100644 --- a/deploy/helm/templates/deployment.yaml +++ b/deploy/helm/templates/deployment.yaml @@ -36,17 +36,14 @@ spec: - name: http containerPort: 3000 protocol: TCP - - name: metrics - containerPort: 9100 - protocol: TCP livenessProbe: httpGet: path: /metrics - port: metrics + port: http readinessProbe: httpGet: path: /metrics - port: metrics + port: http resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/deploy/helm/templates/pod_monitor.yaml b/deploy/helm/templates/pod_monitor.yaml index c421ce2..b09f7d1 100644 --- a/deploy/helm/templates/pod_monitor.yaml +++ b/deploy/helm/templates/pod_monitor.yaml @@ -9,4 +9,4 @@ spec: matchLabels: {{- include "web.selectorLabels" . | nindent 6 }} podMetricsEndpoints: - - port: metrics \ No newline at end of file + - port: http \ No newline at end of file