diff --git a/deploy/caddy/caddy.json b/deploy/caddy/caddy.json index 5ab2d4c..94d9243 100644 --- a/deploy/caddy/caddy.json +++ b/deploy/caddy/caddy.json @@ -6,6 +6,7 @@ "listen": [ ":3000" ], + "metrics": {}, "routes": [ { "handle": [ @@ -14,9 +15,19 @@ "root": "/usr/share/caddy", "index_names": [ "index.html" - ], - "pass_thru": true - }, + ] + } + ] + } + ] + }, + "metrics" : { + "listen": [ + ":9100" + ], + "routes": [ + { + "handle": [ { "handler": "metrics" } diff --git a/deploy/helm/templates/deployment.yaml b/deploy/helm/templates/deployment.yaml index f80cf68..103994f 100644 --- a/deploy/helm/templates/deployment.yaml +++ b/deploy/helm/templates/deployment.yaml @@ -36,14 +36,17 @@ spec: - name: http containerPort: 3000 protocol: TCP + - name: metrics + containerPort: 9100 + protocol: TCP livenessProbe: httpGet: path: /metrics - port: http + port: metrics readinessProbe: httpGet: path: /metrics - port: http + port: metrics 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 b09f7d1..c421ce2 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: http \ No newline at end of file + - port: metrics \ No newline at end of file