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 atiratree committed Aug 15, 2024
1 parent 5d1c61c commit 55e8c60
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/kubelet/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,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 55e8c60

Please sign in to comment.