2021-11-18 07:53:01 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Endpoints
|
|
|
|
metadata:
|
|
|
|
name: etcd-metrics
|
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
k8s-app: etcd
|
|
|
|
app.kubernetes.io/managed-by: Kubespray
|
|
|
|
subsets:
|
2022-01-31 14:08:23 +00:00
|
|
|
{% for etcd_metrics_address, etcd_host in etcd_metrics_addresses.split(',') | zip(etcd_hosts) %}
|
2021-11-18 07:53:01 +00:00
|
|
|
- addresses:
|
|
|
|
- ip: {{ etcd_metrics_address | urlsplit('hostname') }}
|
2022-01-31 14:08:23 +00:00
|
|
|
targetRef:
|
|
|
|
kind: Node
|
|
|
|
name: {{ etcd_host }}
|
2021-11-18 07:53:01 +00:00
|
|
|
ports:
|
|
|
|
- name: http-metrics
|
|
|
|
port: {{ etcd_metrics_address | urlsplit('port') }}
|
|
|
|
protocol: TCP
|
|
|
|
{% endfor %}
|