mirror of
https://github.com/docker/compose.git
synced 2025-07-31 01:24:15 +02:00
Merge pull request #904 from docker/reservation
Use reservations if user has not set limits
This commit is contained in:
commit
919db3f619
@ -389,6 +389,9 @@ func getConfiguredLimits(service types.ServiceConfig) (types.UnitBytes, int64, e
|
|||||||
}
|
}
|
||||||
|
|
||||||
limits := service.Deploy.Resources.Limits
|
limits := service.Deploy.Resources.Limits
|
||||||
|
if limits == nil {
|
||||||
|
limits = service.Deploy.Resources.Reservations
|
||||||
|
}
|
||||||
if limits == nil {
|
if limits == nil {
|
||||||
return 0, 0, nil
|
return 0, 0, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user