mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #88970 from mysunshine92/correct-NodeAllocatableRoot
fix function NodeAllocatableRoot
This commit is contained in:
commit
105c0c6951
@ -608,8 +608,8 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate f
|
|||||||
}
|
}
|
||||||
|
|
||||||
var cgroupRoots []string
|
var cgroupRoots []string
|
||||||
|
nodeAllocatableRoot := cm.NodeAllocatableRoot(s.CgroupRoot, s.CgroupsPerQOS, s.CgroupDriver)
|
||||||
cgroupRoots = append(cgroupRoots, cm.NodeAllocatableRoot(s.CgroupRoot, s.CgroupDriver))
|
cgroupRoots = append(cgroupRoots, nodeAllocatableRoot)
|
||||||
kubeletCgroup, err := cm.GetKubeletContainer(s.KubeletCgroups)
|
kubeletCgroup, err := cm.GetKubeletContainer(s.KubeletCgroups)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Warningf("failed to get the kubelet's cgroup: %v. Kubelet system container metrics may be missing.", err)
|
klog.Warningf("failed to get the kubelet's cgroup: %v. Kubelet system container metrics may be missing.", err)
|
||||||
|
@ -276,9 +276,11 @@ func GetPodCgroupNameSuffix(podUID types.UID) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NodeAllocatableRoot returns the literal cgroup path for the node allocatable cgroup
|
// NodeAllocatableRoot returns the literal cgroup path for the node allocatable cgroup
|
||||||
func NodeAllocatableRoot(cgroupRoot, cgroupDriver string) string {
|
func NodeAllocatableRoot(cgroupRoot string, cgroupsPerQOS bool, cgroupDriver string) string {
|
||||||
root := ParseCgroupfsToCgroupName(cgroupRoot)
|
nodeAllocatableRoot := ParseCgroupfsToCgroupName(cgroupRoot)
|
||||||
nodeAllocatableRoot := NewCgroupName(root, defaultNodeAllocatableCgroupName)
|
if cgroupsPerQOS {
|
||||||
|
nodeAllocatableRoot = NewCgroupName(nodeAllocatableRoot, defaultNodeAllocatableCgroupName)
|
||||||
|
}
|
||||||
if libcontainerCgroupManagerType(cgroupDriver) == libcontainerSystemd {
|
if libcontainerCgroupManagerType(cgroupDriver) == libcontainerSystemd {
|
||||||
return nodeAllocatableRoot.ToSystemd()
|
return nodeAllocatableRoot.ToSystemd()
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ func GetPodCgroupNameSuffix(podUID types.UID) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NodeAllocatableRoot returns the literal cgroup path for the node allocatable cgroup
|
// NodeAllocatableRoot returns the literal cgroup path for the node allocatable cgroup
|
||||||
func NodeAllocatableRoot(cgroupRoot, cgroupDriver string) string {
|
func NodeAllocatableRoot(cgroupRoot string, cgroupsPerQOS bool, cgroupDriver string) string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user