prometheus/discovery/kubernetes
Filip Petkovski 7a78897d0b
Improve reliability of Kubernetes SD tests (#10761)
The tests for Kubernetes SD rely on comparing target groups by first
serializing them to JSON. However, the target group MarshalJSON function
only serializes the __address__ label, which makes eliminates all other
labels from the comparison.

This commit implements a separate marshaling function intended for use in
Kubernetes SD tests. The function serializes all target labels, making
comparisons much more reliable. The commit also fixes all tests that
started to fail due to the newly introduced change.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2022-06-07 16:19:40 +01:00
..
client_metrics.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
endpoints.go refactor (discovery): move from github.com/pkg/errors to 'errors' and 'fmt' (#10807) 2022-06-03 13:47:14 +02:00
endpoints_test.go Implement target discovery in own k8s namespace 2021-12-14 13:41:38 +01:00
endpointslice.go refactor (discovery): move from github.com/pkg/errors to 'errors' and 'fmt' (#10807) 2022-06-03 13:47:14 +02:00
endpointslice_adaptor.go Kubernetes SD: Support discovery.k8s.io/v1 EndpointSlice 2022-03-19 00:42:16 +03:00
endpointslice_adaptor_test.go Kubernetes SD: Support discovery.k8s.io/v1 EndpointSlice 2022-03-19 00:42:16 +03:00
endpointslice_test.go Improve reliability of Kubernetes SD tests (#10761) 2022-06-07 16:19:40 +01:00
ingress.go refactor (discovery): move from github.com/pkg/errors to 'errors' and 'fmt' (#10807) 2022-06-03 13:47:14 +02:00
ingress_adaptor.go Kubernetes SD: Fix golint issue 2021-08-24 17:30:33 +09:00
ingress_test.go Implement target discovery in own k8s namespace 2021-12-14 13:41:38 +01:00
kubernetes.go refactor (discovery): move from github.com/pkg/errors to 'errors' and 'fmt' (#10807) 2022-06-03 13:47:14 +02:00
kubernetes_test.go Improve reliability of Kubernetes SD tests (#10761) 2022-06-07 16:19:40 +01:00
node.go refactor (discovery): move from github.com/pkg/errors to 'errors' and 'fmt' (#10807) 2022-06-03 13:47:14 +02:00
node_test.go Kubernetes service discovery: add provider ID label (#9603) 2021-12-06 22:27:11 +01:00
pod.go refactor (discovery): move from github.com/pkg/errors to 'errors' and 'fmt' (#10807) 2022-06-03 13:47:14 +02:00
pod_test.go Allow attaching node metadata 2022-03-10 08:40:52 +01:00
service.go refactor (discovery): move from github.com/pkg/errors to 'errors' and 'fmt' (#10807) 2022-06-03 13:47:14 +02:00
service_test.go Implement target discovery in own k8s namespace 2021-12-14 13:41:38 +01:00