Enable ComponentSLIs as beta feature

This commit is contained in:
Richa Banker
2023-01-09 17:25:50 -08:00
parent eb55e2b980
commit 452343367c
6 changed files with 63 additions and 52 deletions

View File

@@ -17,8 +17,6 @@ limitations under the License.
package metrics
import (
"context"
"k8s.io/component-base/metrics/testutil"
)
@@ -42,19 +40,3 @@ func parseAPIServerMetrics(data string) (APIServerMetrics, error) {
}
return result, nil
}
func (g *Grabber) getMetricsFromAPIServer(ctx context.Context) (string, error) {
rawOutput, err := g.client.CoreV1().RESTClient().Get().RequestURI("/metrics").Do(ctx).Raw()
if err != nil {
return "", err
}
return string(rawOutput), nil
}
func (g *Grabber) getMetricsSLIsFromAPIServer(ctx context.Context) (string, error) {
rawOutput, err := g.client.CoreV1().RESTClient().Get().RequestURI("/metrics/slis").Do(ctx).Raw()
if err != nil {
return "", err
}
return string(rawOutput), nil
}