mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
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:
parent
a0916996df
commit
8e3a02efa8
@ -39,9 +39,7 @@ import (
|
|||||||
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
||||||
"github.com/google/cadvisor/manager"
|
"github.com/google/cadvisor/manager"
|
||||||
"github.com/google/cadvisor/utils/sysfs"
|
"github.com/google/cadvisor/utils/sysfs"
|
||||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
kubefeatures "k8s.io/kubernetes/pkg/features"
|
|
||||||
"k8s.io/utils/pointer"
|
"k8s.io/utils/pointer"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -94,11 +92,6 @@ func New(imageFsInfoProvider ImageFsInfoProvider, rootPath string, cgroupRoots [
|
|||||||
cadvisormetrics.OOMMetrics: struct{}{},
|
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 {
|
if usingLegacyStats || localStorageCapacityIsolation {
|
||||||
includedMetrics[cadvisormetrics.DiskUsageMetrics] = struct{}{}
|
includedMetrics[cadvisormetrics.DiskUsageMetrics] = struct{}{}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user