Skip to content

Commit 7f23b1b

Browse files
authored
feat(iops): Added iops setting for guaranted qos pods (#6)
Signed-off-by: Abhranil <[email protected]>
1 parent f80e8f9 commit 7f23b1b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/device/iolimit/utils.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ func getContainerdPodCGSuffix(podUid string) string {
9797
func getContainerdCGPath(podUid string) (string, error) {
9898
kubepodsCGPath := baseCgroupPath + "/kubepods.slice"
9999
podSuffix := getContainerdPodCGSuffix(podUid)
100-
podCGPath := kubepodsCGPath + "/kubepods-besteffort.slice/kubepods-besteffort-" + podSuffix + ".slice"
100+
podCGPath := kubepodsCGPath + "/kubepods-" + podSuffix + ".slice"
101+
if helpers.DirExists(podCGPath) {
102+
return podCGPath, nil
103+
}
104+
podCGPath = kubepodsCGPath + "/kubepods-besteffort.slice/kubepods-besteffort-" + podSuffix + ".slice"
101105
if helpers.DirExists(podCGPath) {
102106
return podCGPath, nil
103107
}

0 commit comments

Comments
 (0)