Skip to content

Commit 24f5b37

Browse files
MarSikbertinatto
authored andcommitted
UPSTREAM: <carry>: Export cpu stats of ovs.slice via prometheus
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.
1 parent df854d9 commit 24f5b37

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: cmd/kubelet/app/server.go

+6
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,12 @@ func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Depend
766766
cgroupRoots = append(cgroupRoots, s.SystemCgroups)
767767
}
768768

769+
// CARRY: Monitor extra cgroups that are specific to OpenShift deployments
770+
// Adding them here since there is no way to handle this via configuration atm
771+
// - ovs.slice is configured on clusters that use the NTO's PerformanceProfile and only exists together
772+
// with system-cpu-reserved
773+
cgroupRoots = append(cgroupRoots, "/ovs.slice")
774+
769775
if kubeDeps.CAdvisorInterface == nil {
770776
imageFsInfoProvider := cadvisor.NewImageFsInfoProvider(s.ContainerRuntimeEndpoint)
771777
kubeDeps.CAdvisorInterface, err = cadvisor.New(imageFsInfoProvider, s.RootDirectory, cgroupRoots, cadvisor.UsingLegacyCadvisorStats(s.ContainerRuntimeEndpoint), s.LocalStorageCapacityIsolation)

0 commit comments

Comments
 (0)