Allow specifying limits for pipeline steps from server config (#2085)

This commit is contained in:
Jacob McCann
2017-06-24 07:16:16 -05:00
committed by Brad Rydzewski
parent 3ed811644f
commit daa23ce673
4 changed files with 51 additions and 0 deletions

View File

@@ -484,6 +484,7 @@ func (b *builder) Build() ([]*buildItem, error) {
compiler.WithEnviron(environ),
compiler.WithEnviron(b.Envs),
compiler.WithEscalated(Config.Pipeline.Privileged...),
compiler.WithResourceLimit(Config.Pipeline.Limits.MemSwapLimit, Config.Pipeline.Limits.MemLimit, Config.Pipeline.Limits.ShmSize, Config.Pipeline.Limits.CPUQuota, Config.Pipeline.Limits.CPUShares, Config.Pipeline.Limits.CPUSet),
compiler.WithVolumes(Config.Pipeline.Volumes...),
compiler.WithNetworks(Config.Pipeline.Networks...),
compiler.WithLocal(false),

View File

@@ -58,6 +58,7 @@ var Config = struct {
// Admins map[string]struct{}
}
Pipeline struct {
Limits model.ResourceLimit
Volumes []string
Networks []string
Privileged []string