浏览代码

Merge pull request #904 from docker/reservation

Use reservations if user has not set limits
Nicolas De loof 5 年之前
父节点
当前提交
919db3f619
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      ecs/convert.go

+ 3 - 0
ecs/convert.go

@@ -389,6 +389,9 @@ func getConfiguredLimits(service types.ServiceConfig) (types.UnitBytes, int64, e
 	}
 
 	limits := service.Deploy.Resources.Limits
+	if limits == nil {
+		limits = service.Deploy.Resources.Reservations
+	}
 	if limits == nil {
 		return 0, 0, nil
 	}