From 2a1c60f55e384caab66654286a026abef77ab993 Mon Sep 17 00:00:00 2001 From: Kevin Richardson Date: Mon, 28 Oct 2019 08:05:49 -0400 Subject: [PATCH] CoreDNS prometheus metric annotations exposed at pod level These annotations would previously never be rendered because they were added under the kube-dns section (rather than CoreDNS's). Additionally, the annotations are now added to the Pods themselves rather than the Deployment. --- builtin/files/userdata/cloud-config-controller | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/builtin/files/userdata/cloud-config-controller b/builtin/files/userdata/cloud-config-controller index f37f21f33..819d34ce7 100644 --- a/builtin/files/userdata/cloud-config-controller +++ b/builtin/files/userdata/cloud-config-controller @@ -4106,6 +4106,8 @@ write_files: labels: k8s-app: kube-dns annotations: + prometheus.io/port: "9153" + prometheus.io/scrape: "true" seccomp.security.alpha.kubernetes.io/pod: 'docker/default' spec: priorityClassName: system-node-critical @@ -4200,11 +4202,6 @@ write_files: labels: k8s-app: kube-dns kubernetes.io/cluster-service: "true" - {{- if eq .KubeDns.Provider "coredns" }} - annotations: - prometheus.io/port: "9153" - prometheus.io/scrape: "true" - {{- end }} spec: # replicas: not specified here: # 1. In order to make Addon Manager do not reconcile this replicas parameter.