From 7d92ef3acd62fcb4199eafc2936008a873eedda3 Mon Sep 17 00:00:00 2001 From: Nikolay Date: Wed, 3 Mar 2021 11:43:39 +0300 Subject: [PATCH] Fix ingress discovery api (#1110) --- lib/promscrape/discovery/kubernetes/api.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/promscrape/discovery/kubernetes/api.go b/lib/promscrape/discovery/kubernetes/api.go index 1d319a671..e79ef6325 100644 --- a/lib/promscrape/discovery/kubernetes/api.go +++ b/lib/promscrape/discovery/kubernetes/api.go @@ -528,6 +528,9 @@ func getAPIPath(objectName, namespace, query string) string { if len(query) > 0 { suffix += "?" + query } + if objectName == "ingresses" { + return "/apis/networking.k8s.io/v1beta1/" + suffix + } if objectName == "endpointslices" { return "/apis/discovery.k8s.io/v1beta1/" + suffix }