Skip to content

Commit f557903

Browse files
committed
Delete unusued max resources function
1 parent 6cb301a commit f557903

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

plugin/pkg/admission/limitranger/admission.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -640,24 +640,3 @@ func maxResourceList(list, newList api.ResourceList) {
640640
}
641641
}
642642
}
643-
644-
// max returns the result of max(a, b) for each named resource and is only used if we can't
645-
// accumulate into an existing resource list
646-
func max(a api.ResourceList, b api.ResourceList) api.ResourceList {
647-
result := api.ResourceList{}
648-
for key, value := range a {
649-
if other, found := b[key]; found {
650-
if value.Cmp(other) <= 0 {
651-
result[key] = other.DeepCopy()
652-
continue
653-
}
654-
}
655-
result[key] = value.DeepCopy()
656-
}
657-
for key, value := range b {
658-
if _, found := result[key]; !found {
659-
result[key] = value.DeepCopy()
660-
}
661-
}
662-
return result
663-
}

0 commit comments

Comments
 (0)