Skip to content

Commit

Permalink
feat: enable setting ulimits for services (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Meinen committed Jul 22, 2021
1 parent 4c255a3 commit b8d37ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yaml/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type (
Environment raw.StringSliceMap `yaml:"environment,omitempty" json:"environment,omitempty" jsonschema:"description=Variables to inject into the container environment.\nReference: https://go-vela.github.io/docs/reference/yaml/services/#the-environment-tag"`
Ports raw.StringSlice `yaml:"ports,omitempty" json:"ports,omitempty" jsonschema:"description=List of ports to map for the container in the pipeline.\nReference: https://go-vela.github.io/docs/reference/yaml/services/#the-ports-tag"`
Pull string `yaml:"pull,omitempty" json:"pull,omitempty" jsonschema:"enum=always,enum=not_present,enum=on_start,enum=never,default=not_present,description=Declaration to configure if and when the Docker image is pulled.\nReference: https://go-vela.github.io/docs/reference/yaml/services/#the-pul-tag"`
Ulimits UlimitSlice `yaml:"ulimits,omitempty" json:"ulimits,omitempty" jsonschema:"description=Set the user limits for the container.\nReference: https://go-vela.github.io/docs/reference/yaml/services/#the-ulimits-tag"`
}
)

Expand All @@ -48,6 +49,7 @@ func (s *ServiceSlice) ToPipeline() *pipeline.ContainerSlice {
Environment: service.Environment,
Ports: service.Ports,
Pull: service.Pull,
Ulimits: *service.Ulimits.ToPipeline(),
})
}

Expand Down

0 comments on commit b8d37ac

Please sign in to comment.