VictoriaMetrics/lib/promscrape/discovery/kubernetes
Zakhar Bessarab 1b06af321f
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:15:37 -07:00
..
testdata lib/promscrape/discovery/kubernetes: follow-up after 0b5c874911 (#2672) 2022-06-04 01:11:23 +03:00
api_watcher_test.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
api_watcher.go chore: Use http constants to replace numbers (#3846) 2023-02-22 18:59:32 -08:00
api.go lib/promauth: refactor NewConfig in order to improve maintainability 2022-07-04 14:31:43 +03:00
common_types.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
endpoints_test.go lib/promscrape/discovery/kubernetes: add common labels to all ports discovered from endpoints (#4235) 2023-05-08 22:15:37 -07:00
endpoints.go lib/promscrape/discovery/kubernetes: add common labels to all ports discovered from endpoints (#4235) 2023-05-08 22:15:37 -07:00
endpointslice_test.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
endpointslice.go lib/promscrape/discovery: add a comment explaining why duplicates are removed from the generated target labels 2023-02-22 17:50:42 -08:00
ingress_test.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
ingress.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
kubeconfig_test.go lib/promscrape/discovery/kubernetes: follow-up after 006b8c7534 2022-06-06 14:41:28 +03:00
kubeconfig.go lib/promscrape/discovery/kubernetes: use unsupportedFieldError() function instead of errContext string 2022-06-07 01:24:14 +03:00
kubernetes.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
node_test.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
node.go app,lib: fix typos in comments (#3804) 2023-02-13 09:32:35 -08:00
pod_test.go lib/promscrape/discovery/kubernetes: add support for __meta_kubernetes_pod_container_id 2023-01-27 16:33:57 -08:00
pod_timing_test.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
pod.go lib/promscrape/discovery/kubernetes: add support for __meta_kubernetes_pod_container_id 2023-01-27 16:33:57 -08:00
service_test.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00
service.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:23 -08:00