From 33cc2c6e90d6b59cf1e30faf414f1f99a7c85a3e Mon Sep 17 00:00:00 2001 From: Marian Soltys <41568766+maso7@users.noreply.github.com> Date: Fri, 26 May 2023 13:45:35 +0200 Subject: [PATCH] chart: add service monitor scrape timeout and fix scrape interval --- charts/ec2-price-exporter/templates/servicemonitor.yaml | 4 +++- charts/ec2-price-exporter/values.yaml | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/charts/ec2-price-exporter/templates/servicemonitor.yaml b/charts/ec2-price-exporter/templates/servicemonitor.yaml index 1614d4d..9c58d62 100644 --- a/charts/ec2-price-exporter/templates/servicemonitor.yaml +++ b/charts/ec2-price-exporter/templates/servicemonitor.yaml @@ -9,6 +9,8 @@ spec: endpoints: - targetPort: {{ .Values.service.port }} path: {{ .Values.serviceMonitor.metricsPath }} + interval: {{ .Values.serviceMonitor.interval }} + scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} {{- with .Values.serviceMonitor.metricRelabelings }} metricRelabelings: {{ toYaml . | nindent 8 }} @@ -17,7 +19,7 @@ spec: namespaceSelector: matchNames: - {{ .Release.Namespace }} - interval: {{ .Values.serviceMonitor.interval }} + selector: matchLabels: {{- include "ec2-price-exporter.selectorLabels" . | nindent 6 }} diff --git a/charts/ec2-price-exporter/values.yaml b/charts/ec2-price-exporter/values.yaml index 02c3d41..7c62ab8 100644 --- a/charts/ec2-price-exporter/values.yaml +++ b/charts/ec2-price-exporter/values.yaml @@ -77,7 +77,8 @@ autoscaling: serviceMonitor: enabled: false metricsPath: "/metrics" - interval: 60s + interval: 30s + scrapeTimeout: 30s metricRelabelings: [] nodeSelector: {}