From 1c19ef6ad6b59f3afcc9d9ee8397dc3e0e65f8e5 Mon Sep 17 00:00:00 2001 From: Jayson Wang Date: Wed, 3 Jan 2024 23:26:22 +0800 Subject: [PATCH] fix the check for whether the cluster supports metrics (#2424) --- internal/client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/client/client.go b/internal/client/client.go index 3a478167..28ecc2f0 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -352,7 +352,7 @@ func (a *APIClient) Config() *Config { // HasMetrics checks if the cluster supports metrics. func (a *APIClient) HasMetrics() bool { - return a.supportsMetricsResources() != nil + return a.supportsMetricsResources() == nil } // DialLogs returns a handle to api server for logs.