From 84a453b6285d502c52be1cda3c67905fe419fe39 Mon Sep 17 00:00:00 2001 From: yoshihiro-shu Date: Sun, 21 Jan 2024 01:24:21 +0900 Subject: [PATCH] add: service-monitor yaml --- .../templates/service-monitor.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 deployment/helm/tech-blog-backend/templates/service-monitor.yaml diff --git a/deployment/helm/tech-blog-backend/templates/service-monitor.yaml b/deployment/helm/tech-blog-backend/templates/service-monitor.yaml new file mode 100644 index 00000000..b5ce5c14 --- /dev/null +++ b/deployment/helm/tech-blog-backend/templates/service-monitor.yaml @@ -0,0 +1,18 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "tech-blog-backend.fullname" . }}-service-monitor + labels: + release: prometheus + {{- include "tech-blog-backend.labels" . | nindent 4 }} +spec: + selector: + matchLabels: + app.kubernetes.io/name: tech-blog-backend + namespaceSelector: + matchNames: + - tech-blog + endpoints: + - port: api-v1 + path: metrics + interval: 30s