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.
This commit is contained in:
Mark Eisenblätter 2018-11-15 00:01:35 +01:00 committed by k8s-ci-robot
parent 5f7d5e1e80
commit 7deb842030

View file

@ -21,6 +21,10 @@ spec:
# Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)
scheduler.alpha.kubernetes.io/critical-pod: ''
kubespray.etcd-cert/serial: "{{ etcd_client_cert_serial }}"
{% if calico_felix_prometheusmetricsenabled %}
prometheus.io/scrape: 'true'
prometheus.io/port: "{{ calico_felix_prometheusmetricsport }}"
{% endif %}
spec:
{% if kube_version is version('v1.11.1', '>=') %}
priorityClassName: system-node-critical