kubelet: update cAdvisor usage for v0.43

* Change cAdvisor manager constructor
* Change call to adding AcceleratorUsageMetrics

Signed-off-by: David Porter <david@porter.me>
This commit is contained in:
David Porter 2021-11-09 14:30:59 -08:00
parent c6452be958
commit b6269ce5de
2 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ func New(imageFsInfoProvider ImageFsInfoProvider, rootPath string, cgroupRoots [
}
// Create the cAdvisor container manager.
m, err := manager.New(memory.New(statsCacheDuration, nil), sysFs, housekeepingConfig, includedMetrics, http.DefaultClient, cgroupRoots, "")
m, err := manager.New(memory.New(statsCacheDuration, nil), sysFs, housekeepingConfig, includedMetrics, http.DefaultClient, cgroupRoots, nil /* containerEnvMetadataWhiteList */, "" /* perfEventsFile */, time.Duration(0) /*resctrlInterval*/)
if err != nil {
return nil, err
}

View File

@ -373,7 +373,7 @@ func (s *Server) InstallDefaultHandlers() {
// Only add the Accelerator metrics if the feature is inactive
// Note: Accelerator metrics will be removed in the future, hence the feature gate.
if !utilfeature.DefaultFeatureGate.Enabled(features.DisableAcceleratorUsageMetrics) {
includedMetrics.Add(cadvisormetrics.MetricKind(cadvisormetrics.AcceleratorUsageMetrics))
includedMetrics[cadvisormetrics.AcceleratorUsageMetrics] = struct{}{}
}
cadvisorOpts := cadvisorv2.RequestOptions{