Skip to content

Commit

Permalink
Limit must be set for non overcommitable resources
Browse files Browse the repository at this point in the history
Request could potentially be blank

Signed-off-by: Brian Dwyer <[email protected]>
  • Loading branch information
bdwyertech committed Dec 9, 2021
1 parent 66a051d commit fcd6373
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controllers/provisioning/binpacking/packable.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func (p *Packable) validateAWSNeurons(pods []*v1.Pod) error {
func (p *Packable) validateAWSPodENI(pods []*v1.Pod) error {
for _, pod := range pods {
for _, container := range pod.Spec.Containers {
if _, ok := container.Resources.Requests[resources.AWSPodENI]; ok {
if _, ok := container.Resources.Limits[resources.AWSPodENI]; ok {
if p.InstanceType.AWSPodENI().IsZero() {
return fmt.Errorf("aws pod eni is required")
}
Expand Down

0 comments on commit fcd6373

Please sign in to comment.