VictoriaMetrics/lib/promscrape
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
..
discovery lib/promscrape/discovery/kubernetes: add common labels to all ports discovered from endpoints (#4235) 2023-05-03 02:17:33 +02:00
discoveryutils lib/promscrape: follow-up for 43e104a83f 2023-02-24 12:20:42 -08:00
testdata lib/promscrape: fix errors in test config 2022-02-08 19:56:37 +02:00
client.go fix some typo (#3898) 2023-03-03 11:02:13 +01:00
config.go lib/promscrape: do not re-use previously loaded scrape targets on failed attempt to load updated scrape targets at file_sd_configs 2023-04-02 21:05:28 -07:00
config_test.go lib/promscrape: do not re-use previously loaded scrape targets on failed attempt to load updated scrape targets at file_sd_configs 2023-04-02 21:05:28 -07:00
config_timing_test.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:00 -08:00
relabel_debug.go vmui: add metric relabel debug (#3889) 2023-04-26 11:53:29 +03:00
scraper.go lib/streamaggr: follow-up for ff72ca14b9 2023-03-31 22:30:38 -07:00
scrapework.go lib/protoparser/prometheus: move streamparser to subpackage (#3814) 2023-02-13 09:26:07 -08:00
scrapework_test.go lib/promscrape: fix honor_labels behavior (#3739) 2023-02-01 11:21:44 -08:00
scrapework_timing_test.go lib/promscrape: add exported_ prefix to metric names exported by scrape targets if they clash with automatically generated metrics 2022-11-28 18:37:09 -08:00
statconn.go lib/promscrape: properly show proxy_url option value at /config page 2021-10-26 21:23:54 +03:00
targetstatus.go lib/promscrape: pre-fetch metric_relabel_configs rules when debugging metric relabeling for a particular target 2023-01-05 03:26:49 -08:00
targetstatus.qtpl lib/promscrape: pre-fetch metric_relabel_configs rules when debugging metric relabeling for a particular target 2023-01-05 03:26:49 -08:00
targetstatus.qtpl.go lib/promscrape: pre-fetch metric_relabel_configs rules when debugging metric relabeling for a particular target 2023-01-05 03:26:49 -08:00