mirror of https://github.com/kubernetes/kops.git
				
				
				
			[addons/networking.cilium.io] enable prometheus scraping
When EnablePromethesMetrics is enabled the required metrics endpoints are exposed but no annotations is included in the agents. This commit includes the prometheus.io/scrape and prometheus.io/port annotations that prometheus scrappers can use for auto-discovery Co-authored-by: tchatzig <t.chatzigeorgiou@thebeat.co>
This commit is contained in:
		
							parent
							
								
									bfe8c472c8
								
							
						
					
					
						commit
						5ac4569998
					
				|  | @ -417,6 +417,12 @@ spec: | |||
|         # gets priority scheduling. | ||||
|         # https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/ | ||||
|         scheduler.alpha.kubernetes.io/critical-pod: "" | ||||
|         # Annotation required for prometheus auto-discovery scrapping | ||||
|         # https://docs.cilium.io/en/v1.9/operations/metrics/#installation | ||||
|         {{ if .EnablePrometheusMetrics }} | ||||
|         prometheus.io/scrape: "true" | ||||
|         prometheus.io/port: {{ .AgentPrometheusPort | quote }} | ||||
|         {{ end }} | ||||
|       labels: | ||||
|         k8s-app: cilium | ||||
|         kubernetes.io/cluster-service: "true" | ||||
|  |  | |||
|  | @ -503,6 +503,12 @@ spec: | |||
|         # gets priority scheduling. | ||||
|         # https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/ | ||||
|         scheduler.alpha.kubernetes.io/critical-pod: "" | ||||
|         # Annotation required for prometheus auto-discovery scrapping | ||||
|         # https://docs.cilium.io/en/v1.9/operations/metrics/#installation | ||||
|         {{ if .EnablePrometheusMetrics }} | ||||
|         prometheus.io/scrape: "true" | ||||
|         prometheus.io/port: {{ .AgentPrometheusPort | quote }} | ||||
|         {{ end }} | ||||
|       labels: | ||||
|         k8s-app: cilium | ||||
|         kubernetes.io/cluster-service: "true" | ||||
|  |  | |||
|  | @ -519,6 +519,12 @@ spec: | |||
|         # gets priority scheduling. | ||||
|         # https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/ | ||||
|         scheduler.alpha.kubernetes.io/critical-pod: "" | ||||
|         # Annotation required for prometheus auto-discovery scrapping | ||||
|         # https://docs.cilium.io/en/v1.9/operations/metrics/#installation | ||||
|         {{ if .EnablePrometheusMetrics }} | ||||
|         prometheus.io/scrape: "true" | ||||
|         prometheus.io/port: {{ .AgentPrometheusPort | quote }} | ||||
|         {{ end }} | ||||
|       labels: | ||||
|         k8s-app: cilium | ||||
|         kubernetes.io/cluster-service: "true" | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue