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
|
apiVersion: v1
|
||||||
name: ingress-nginx
|
name: ingress-nginx
|
||||||
version: 2.11.3
|
version: 2.12.0
|
||||||
appVersion: 0.34.1
|
appVersion: 0.34.1
|
||||||
home: https://github.com/kubernetes/ingress-nginx
|
home: https://github.com/kubernetes/ingress-nginx
|
||||||
description: Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer
|
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 }}
|
{{- if .Values.controller.metrics.serviceMonitor.honorLabels }}
|
||||||
honorLabels: true
|
honorLabels: true
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.controller.metrics.serviceMonitor.metricRelabelings }}
|
||||||
|
metricRelabelings: {{ toYaml .Values.controller.metrics.serviceMonitor.metricRelabelings | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.controller.metrics.serviceMonitor.namespaceSelector }}
|
{{- if .Values.controller.metrics.serviceMonitor.namespaceSelector }}
|
||||||
namespaceSelector: {{ toYaml .Values.controller.metrics.serviceMonitor.namespaceSelector | nindent 4 }}
|
namespaceSelector: {{ toYaml .Values.controller.metrics.serviceMonitor.namespaceSelector | nindent 4 }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
namespaceSelector:
|
namespaceSelector:
|
||||||
matchNames:
|
matchNames:
|
||||||
- {{ .Release.Namespace }}
|
- {{ .Release.Namespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.metrics.serviceMonitor.targetLabels }}
|
||||||
|
targetLabels:
|
||||||
|
{{- range .Values.controller.metrics.serviceMonitor.targetLabels }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
|
|
@ -426,6 +426,8 @@ controller:
|
||||||
# any: true
|
# any: true
|
||||||
scrapeInterval: 30s
|
scrapeInterval: 30s
|
||||||
# honorLabels: true
|
# honorLabels: true
|
||||||
|
targetLabels: []
|
||||||
|
metricRelabelings: []
|
||||||
|
|
||||||
prometheusRule:
|
prometheusRule:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
Loading…
Reference in a new issue