Apply suggestions from code review

Co-authored-by: Bing Hongtao <695097494plus@gmail.com>
This commit is contained in:
Shachar Tal
2026-04-28 10:57:53 +03:00
committed by GitHub
parent d7f380f7e3
commit db2380e4c1
2 changed files with 3 additions and 3 deletions

View File

@@ -588,8 +588,8 @@ func (m *managerImpl) containerEphemeralStorageLimitEviction(logger klog.Logger,
thresholdsMap[container.Name] = ephemeralLimit
}
}
for i, container := range pod.Spec.InitContainers {
if !podutil.IsRestartableInitContainer(&pod.Spec.InitContainers[i]) {
for _, container := range pod.Spec.InitContainers {
if !podutil.IsRestartableInitContainer(&container) {
continue
}
ephemeralLimit := container.Resources.Limits.StorageEphemeral()

View File

@@ -1316,7 +1316,7 @@ func diskConsumingSidecarPod(name string, diskConsumedMB int, sidecarResources v
{
Image: busyboxImage,
Name: fmt.Sprintf("%s-container", name),
Command: []string{"sh", "-c", "while true; do sleep 5; done"},
Command: []string{"sh", "-c", "sleep infinity"},
},
},
},