Skip to content

Commit

Permalink
UPSTREAM: <carry>: Export cpu stats of ovs.slice via prometheus
Browse files Browse the repository at this point in the history
When a PerformanceProfile configures a node for cpu partitioning,
it also lets OVS use all the cpus available to burstable pods.
To be able to do that, OVS was moved to its own slice and that
slice needs to be re-added to cAdvisor for monitoring purposes.
  • Loading branch information
MarSik authored and sairameshv committed Dec 4, 2023
1 parent f84116c commit 9816bd3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/kubelet/app/server.go
Expand Up @@ -729,6 +729,12 @@ func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Depend
cgroupRoots = append(cgroupRoots, s.SystemCgroups)
}

// CARRY: Monitor extra cgroups that are specific to OpenShift deployments
// Adding them here since there is no way to handle this via configuration atm
// - ovs.slice is configured on clusters that use the NTO's PerformanceProfile and only exists together
// with system-cpu-reserved
cgroupRoots = append(cgroupRoots, "/ovs.slice")

if kubeDeps.CAdvisorInterface == nil {
imageFsInfoProvider := cadvisor.NewImageFsInfoProvider(s.ContainerRuntimeEndpoint)
kubeDeps.CAdvisorInterface, err = cadvisor.New(imageFsInfoProvider, s.RootDirectory, cgroupRoots, cadvisor.UsingLegacyCadvisorStats(s.ContainerRuntimeEndpoint), s.LocalStorageCapacityIsolation)
Expand Down

0 comments on commit 9816bd3

Please sign in to comment.