Add configurable serviceMonitor metricRelabelling and targetLabels
Signed-off-by: Calvin Bui <3604363+calvinbui@users.noreply.github.com>
This commit is contained in:
parent
6cfab1f1b4
commit
bca7b8b217
3 changed files with 12 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
apiVersion: v1
|
||||
name: ingress-nginx
|
||||
version: 2.11.3
|
||||
version: 2.12.0
|
||||
appVersion: 0.34.1
|
||||
home: https://github.com/kubernetes/ingress-nginx
|
||||
description: Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer
|
||||
|
|
|
@ -19,12 +19,21 @@ spec:
|
|||
{{- if .Values.controller.metrics.serviceMonitor.honorLabels }}
|
||||
honorLabels: true
|
||||
{{- end }}
|
||||
{{- if .Values.controller.metrics.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings: {{ toYaml .Values.controller.metrics.serviceMonitor.metricRelabelings | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.controller.metrics.serviceMonitor.namespaceSelector }}
|
||||
namespaceSelector: {{ toYaml .Values.controller.metrics.serviceMonitor.namespaceSelector | nindent 4 }}
|
||||
{{ else }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
{{- if .Values.controller.metrics.serviceMonitor.targetLabels }}
|
||||
targetLabels:
|
||||
{{- range .Values.controller.metrics.serviceMonitor.targetLabels }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
|
|
|
@ -426,6 +426,8 @@ controller:
|
|||
# any: true
|
||||
scrapeInterval: 30s
|
||||
# honorLabels: true
|
||||
targetLabels: []
|
||||
metricRelabelings: []
|
||||
|
||||
prometheusRule:
|
||||
enabled: false
|
||||
|
|
Loading…
Reference in a new issue