Skip to content
Snippets Groups Projects
Unverified Commit 2bbe5732 authored by Ilya Margolin's avatar Ilya Margolin Committed by GitHub
Browse files

Add node label to etcd metrics (#8475)

targetRef on endpoints surfaces as
__meta_kubernetes_endpoint_address_target_kind/__meta_kubernetes_endpoint_address_target_name
in prometheus and gets converted to the label `node` by
prometheus-operator
parent e6e7fbc2
No related branches found
No related tags found
No related merge requests found
...@@ -7,9 +7,12 @@ metadata: ...@@ -7,9 +7,12 @@ metadata:
k8s-app: etcd k8s-app: etcd
app.kubernetes.io/managed-by: Kubespray app.kubernetes.io/managed-by: Kubespray
subsets: subsets:
{% for etcd_metrics_address in etcd_metrics_addresses.split(',') %} {% for etcd_metrics_address, etcd_host in etcd_metrics_addresses.split(',') | zip(etcd_hosts) %}
- addresses: - addresses:
- ip: {{ etcd_metrics_address | urlsplit('hostname') }} - ip: {{ etcd_metrics_address | urlsplit('hostname') }}
targetRef:
kind: Node
name: {{ etcd_host }}
ports: ports:
- name: http-metrics - name: http-metrics
port: {{ etcd_metrics_address | urlsplit('port') }} port: {{ etcd_metrics_address | urlsplit('port') }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment