VictoriaMetrics/lib/promscrape/discovery
Zakhar Bessarab bf3b6732bd
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-03 02:17:33 +02:00
..
azure Azure Service Discovery - Fix token fetch for Container Apps/App Services (#3832) 2023-02-22 19:19:53 -08:00
consul lib/promscrape: adds filter for consul_sd_configs: (#4184) 2023-04-26 19:16:27 +02:00
digitalocean lib/promscrape: optimize service discovery speed 2022-11-29 21:26:00 -08:00
dns lib/promscrape: optimize service discovery speed 2022-11-29 21:26:00 -08:00
docker lib/promscrape/discovery: add a comment explaining why duplicates are removed from the generated target labels 2023-02-22 17:51:51 -08:00
dockerswarm lib/promscrape/discovery: add a comment explaining why duplicates are removed from the generated target labels 2023-02-22 17:51:51 -08:00
ec2 lib/promscrape: optimize service discovery speed 2022-11-29 21:26:00 -08:00
eureka lib/promscrape: optimize service discovery speed 2022-11-29 21:26:00 -08:00
gce chore: Use http constants to replace numbers (#3846) 2023-02-22 18:53:05 -08:00
http lib/promscrape/discovery: add a comment explaining why duplicates are removed from the generated target labels 2023-02-22 17:51:51 -08:00
kubernetes lib/promscrape/discovery/kubernetes: add common labels to all ports discovered from endpoints (#4235) 2023-05-03 02:17:33 +02:00
kuma lib/promscrape/discovery/kuma: substitute blocking HTTP call with non-blocking HTTP call at discoveryutils.Client 2023-02-23 15:13:08 -08:00
nomad .golangci.yml: properly enable revive linter and fix all the warnings it detects 2023-02-26 12:18:59 -08:00
openstack chore: Use http constants to replace numbers (#3846) 2023-02-22 18:53:05 -08:00
yandexcloud chore: Use http constants to replace numbers (#3846) 2023-02-22 18:53:05 -08:00