mirror of https://git.rancher.io/charts
rancher-node-exporter: updating metricRelabelings to include cluster names
parent
6e1b64438c
commit
834896da1a
|
@ -1,20 +1,24 @@
|
|||
--- charts-original/templates/servicemonitor.yaml
|
||||
+++ charts/templates/servicemonitor.yaml
|
||||
@@ -47,5 +47,17 @@
|
||||
{{- with .Values.prometheus.monitor.metricRelabelings }}
|
||||
metricRelabelings:
|
||||
@@ -44,8 +44,18 @@
|
||||
relabelings:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
- {{- with .Values.prometheus.monitor.metricRelabelings }}
|
||||
metricRelabelings:
|
||||
- {{- toYaml . | nindent 8 }}
|
||||
- {{- end }}
|
||||
+ {{- with .Values.prometheus.monitor.metricRelabelings }}
|
||||
+ {{- toYaml . | nindent 8 }}
|
||||
+ {{- end }}
|
||||
+ {{ if .Values.global.cattle.clusterId }}
|
||||
+ - sourceLabels: [__address__]
|
||||
+ targetLabel: cluster_id
|
||||
+ eplacement: {{ .Values.global.cattle.clusterId }}
|
||||
+ {{- end }}
|
||||
+ {{ else }}
|
||||
+ {{ if .Values.global.cattle.clusterId }}
|
||||
+ metricRelabelings:
|
||||
+ {{ if .Values.global.cattle.clusterName }}
|
||||
+ - sourceLabels: [__address__]
|
||||
+ targetLabel: cluster_id
|
||||
+ replacement: {{ .Values.global.cattle.clusterId }}
|
||||
+ targetLabel: cluster_name
|
||||
+ replacement: {{ .Values.global.cattle.clusterName }}
|
||||
+ {{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -41,12 +41,12 @@
|
|||
pspAnnotations: {}
|
||||
|
||||
# for deployments that have node_exporter deployed outside of the cluster, list
|
||||
@@ -163,6 +167,8 @@
|
||||
|
||||
@@ -164,6 +168,8 @@
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
+ operator: Exists
|
||||
+ - effect: NoExecute
|
||||
operator: Exists
|
||||
+ - effect: NoExecute
|
||||
+ operator: Exists
|
||||
|
||||
## Assign a PriorityClassName to pods if set
|
||||
# priorityClassName: ""
|
||||
|
|
Loading…
Reference in New Issue