Service Monitor: Improve target labels.
This commit is contained in:
parent
fa7aeed7c0
commit
07ef900303
1 changed files with 2 additions and 5 deletions
|
@ -40,12 +40,9 @@ spec:
|
|||
matchNames:
|
||||
- {{ include "ingress-nginx.namespace" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.controller.metrics.serviceMonitor.targetLabels }}
|
||||
targetLabels:
|
||||
{{- range .Values.controller.metrics.serviceMonitor.targetLabels }}
|
||||
- {{ . }}
|
||||
{{- if .Values.controller.metrics.serviceMonitor.targetLabels }}
|
||||
targetLabels: {{ toYaml .Values.controller.metrics.serviceMonitor.targetLabels | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "ingress-nginx.selectorLabels" . | nindent 6 }}
|
||||
|
|
Loading…
Reference in a new issue