Remove AcceleratorUsageMetrics from kubelet

The feature gate is GA'd and enabled by default and the metrics have
been removed from cAdvisor.

Signed-off-by: David Porter <david@porter.me>
This commit is contained in:
David Porter 2023-01-06 13:36:44 -08:00
parent a0916996df
commit 8e3a02efa8

View File

@ -39,9 +39,7 @@ import (
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
"github.com/google/cadvisor/manager"
"github.com/google/cadvisor/utils/sysfs"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/klog/v2"
kubefeatures "k8s.io/kubernetes/pkg/features"
"k8s.io/utils/pointer"
)
@ -94,11 +92,6 @@ func New(imageFsInfoProvider ImageFsInfoProvider, rootPath string, cgroupRoots [
cadvisormetrics.OOMMetrics: struct{}{},
}
// Only add the Accelerator metrics if the feature is inactive
if !utilfeature.DefaultFeatureGate.Enabled(kubefeatures.DisableAcceleratorUsageMetrics) {
includedMetrics[cadvisormetrics.AcceleratorUsageMetrics] = struct{}{}
}
if usingLegacyStats || localStorageCapacityIsolation {
includedMetrics[cadvisormetrics.DiskUsageMetrics] = struct{}{}
}