mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 12:48:51 +00:00
dedupe pod resource request calculation
This commit is contained in:
@@ -561,6 +561,8 @@ func PodValidateLimitFunc(limitRange *corev1.LimitRange, pod *api.Pod) error {
|
||||
|
||||
// enforce pod limits on init containers
|
||||
if limitType == corev1.LimitTypePod {
|
||||
// TODO: look into re-using resourcehelper.PodRequests/resourcehelper.PodLimits instead of duplicating
|
||||
// that calculation
|
||||
containerRequests, containerLimits := []api.ResourceList{}, []api.ResourceList{}
|
||||
for j := range pod.Spec.Containers {
|
||||
container := &pod.Spec.Containers[j]
|
||||
|
Reference in New Issue
Block a user