VictoriaMetrics/lib/promscrape/discovery
Zakhar Bessarab 57affa15fc
lib/promscrape/discovery/kubernetes: add common labels to all ports discovered from endpoints (#4235)
* lib/promscrape/discovery/kubernetes: add common labels to all ports discovered from endpoints

Sets
`__meta_kubernetes_endpoints_name` and `__meta_kubernetes_namespace` labels to all ports of pod.
Prometheus sets those labels to all ports in pod (0ab9553611/discovery/kubernetes/endpoints.go (L267C15-L269)) even if port is not matching any service.

See: #4154

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* lib/promscrape/discovery/kubernetes: fix test for updated discovery logic

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

---------

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
2023-05-08 22:17:30 -07:00
..
azure Azure Service Discovery - Fix token fetch for Container Apps/App Services (#3832) 2023-02-23 19:30:23 -08:00
consul discovery/{consul,nomad}: fix cancelling serviceWatcher in-flight requests (#3658) 2023-01-17 21:47:51 -08:00
digitalocean lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
dns lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
docker lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
dockerswarm lib/promscrape/discovery: missing changes after b4ad3a3b4c 2023-01-11 23:03:14 -08:00
ec2 lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
eureka lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
gce lib/promscrape/discovery/gce: follow-up for b2ccdaaa2f 2023-01-10 13:51:57 -08:00
http lib/promscrape/discoveryutils: switch to native http client from fasthttp (#3568) 2023-01-05 21:23:15 -08:00
kubernetes lib/promscrape/discovery/kubernetes: add common labels to all ports discovered from endpoints (#4235) 2023-05-08 22:17:30 -07:00
nomad sd/nomad: panic in nomad watcher because of nil map (#3784) 2023-02-08 08:37:02 -08:00
openstack lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
yandexcloud lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00