option to set global shm_size
This commit is contained in:
@@ -51,6 +51,7 @@ type Resources struct {
|
||||
CPUPeriod int64
|
||||
CPUShares int64
|
||||
CPUSet []string
|
||||
ShmSize int64
|
||||
}
|
||||
|
||||
// Compiler compiles the Yaml configuration file to an
|
||||
@@ -371,12 +372,15 @@ func (c *Compiler) Compile(ctx context.Context, args runtime.CompilerArgs) runti
|
||||
// the resource limits defined in the yaml currently
|
||||
// take precedence over global values. This is something
|
||||
// we should re-think in a future release.
|
||||
if step.MemSwapLimit != 0 {
|
||||
if step.MemSwapLimit == 0 {
|
||||
step.MemSwapLimit = c.Resources.MemorySwap
|
||||
}
|
||||
if step.MemLimit != 0 {
|
||||
if step.MemLimit == 0 {
|
||||
step.MemLimit = c.Resources.Memory
|
||||
}
|
||||
if step.ShmSize == 0 {
|
||||
step.ShmSize = c.Resources.ShmSize
|
||||
}
|
||||
step.CPUPeriod = c.Resources.CPUPeriod
|
||||
step.CPUQuota = c.Resources.CPUQuota
|
||||
step.CPUShares = c.Resources.CPUShares
|
||||
|
||||
Reference in New Issue
Block a user