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: {}