calico-node: add prometheus annotations (#3645)
add prometheus annotations to calico-node if calico_felix_prometheusmetricsenabled is enabled. This will allow a kubernetes_sd to automaticly find the pods and start scraping.pull/3713/head
parent
5f7d5e1e80
commit
7deb842030
|
@ -21,6 +21,10 @@ spec:
|
||||||
# Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)
|
# Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)
|
||||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||||
kubespray.etcd-cert/serial: "{{ etcd_client_cert_serial }}"
|
kubespray.etcd-cert/serial: "{{ etcd_client_cert_serial }}"
|
||||||
|
{% if calico_felix_prometheusmetricsenabled %}
|
||||||
|
prometheus.io/scrape: 'true'
|
||||||
|
prometheus.io/port: "{{ calico_felix_prometheusmetricsport }}"
|
||||||
|
{% endif %}
|
||||||
spec:
|
spec:
|
||||||
{% if kube_version is version('v1.11.1', '>=') %}
|
{% if kube_version is version('v1.11.1', '>=') %}
|
||||||
priorityClassName: system-node-critical
|
priorityClassName: system-node-critical
|
||||||
|
|
Loading…
Reference in New Issue