mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
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:
parent
c6452be958
commit
b6269ce5de
@ -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
|
||||
}
|
||||
|
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user