mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-30 23:26:41 +00:00
Apply suggestions from code review
Co-authored-by: Bing Hongtao <695097494plus@gmail.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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"},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user