Monorepo for Tangled
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

spindle/engines/nixery: limit max memory per job

Default to 6GB.

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>

+4
+1
spindle/config/config.go
··· 39 39 type NixeryPipelines struct { 40 40 Nixery string `env:"NIXERY, default=nixery.tangled.sh"` 41 41 WorkflowTimeout string `env:"WORKFLOW_TIMEOUT, default=5m"` 42 + MaxJobMemoryMB int64 `env:"MAX_JOB_MEMORY_MB, default=6144"` // per-container memory limit in MiB (default 6 GiB) 42 43 } 43 44 44 45 type S3 struct {
+3
spindle/engines/nixery/engine.go
··· 257 257 CapAdd: []string{"CAP_DAC_OVERRIDE", "CAP_CHOWN", "CAP_FOWNER", "CAP_SETUID", "CAP_SETGID"}, 258 258 SecurityOpt: []string{"no-new-privileges"}, 259 259 ExtraHosts: []string{"host.docker.internal:host-gateway"}, 260 + Resources: container.Resources{ 261 + Memory: e.cfg.NixeryPipelines.MaxJobMemoryMB * 1024 * 1024, 262 + }, 260 263 }, nil, nil, "") 261 264 if err != nil { 262 265 fmt.Fprintf(