Fix the localhost nodeport metrics test to not fail under non-kube-proxy

If the cluster is using a non-kube-proxy service proxy, the `curl`
will presumably fail; this should not be considered a hard failure.
This commit is contained in:
Dan Winship 2024-08-21 09:44:42 -04:00
parent 6ca629d46b
commit a3b97b118b

View File

@ -284,7 +284,9 @@ var _ = common.SIGDescribe("KubeProxy", func() {
// get proxyMode
stdout, err := e2epodoutput.RunHostCmd(fr.Namespace.Name, hostExecPodName, fmt.Sprintf("curl --silent 127.0.0.1:%d/proxyMode", ports.ProxyStatusPort))
framework.ExpectNoError(err)
if err != nil {
e2eskipper.Skipf("kube-proxy is not running or could not determine kube-proxy mode (%v)", err)
}
proxyMode := strings.TrimSpace(stdout)
// get value of route_localnet