[stable/redis-ha] Fix double scraping redis pods by serviceMonitor (#18957)

Add third label to select only one redis service (exclude redis-announce-* targets from scraping)

Signed-off-by: Andrey Izotikov <andrsp@gmail.com>
This commit is contained in:
Andrey Izotikov
2019-11-25 07:53:51 -08:00
committed by Kubernetes Prow Robot
parent b5c738a13d
commit cf188f69a2
3 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ keywords:
- redis
- keyvalue
- database
version: 4.1.0
version: 4.1.1
appVersion: 5.0.5
description: Highly available Kubernetes implementation of Redis
icon: https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png
@@ -4,6 +4,9 @@ metadata:
name: {{ template "redis-ha.fullname" . }}
labels:
{{ include "labels.standard" . | indent 4 }}
{{- if and ( .Values.exporter.enabled ) ( .Values.exporter.serviceMonitor.enabled ) }}
servicemonitor: enabled
{{- end }}
annotations:
{{- if .Values.serviceAnnotations }}
{{ toYaml .Values.serviceAnnotations | indent 4 }}
@@ -30,4 +30,5 @@ spec:
matchLabels:
app: {{ template "redis-ha.name" . }}
release: {{ .Release.Name }}
servicemonitor: enabled
{{- end }}