mirror of
https://github.com/docker/compose.git
synced 2026-08-04 14:47:40 +00:00
Use reservations if user has not set limits
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
12d7ab55d6
commit
8438eee612
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue