josmo / drone-ecs

Drone plugin for triggering Amazon EC2 Container Service (ECS) deployments
Apache License 2.0
30 stars 41 forks source link

Expose ulimits as a configurable setting #43

Closed willvincent closed 4 years ago

willvincent commented 4 years ago

I'm not really familiar with Go, so this is mostly a stab in the dark, but based on other existing parts of the plugin code I think this is accurate. It would be good to get ulimits config exposed, I have code in production that depends on a higher than default nofile ulimit.

willvincent commented 4 years ago

Have built my fork, and tested a build with it.

Confirmed this is working as expected:

.drone.yml settings addition:

  ulimits:
    - nofile 2048 4096

Resulting Ulimits config in task definition file:

Ulimits: [{
  HardLimit: 4096,
  Name: "nofile",
  SoftLimit: 2048
}]

Screen Shot 2019-08-29 at 12 22 52 PM

josmo commented 4 years ago

Thanks @willvincent I'll get this merged in. Did you verify that it works with no ulimit set? I just took a quick glance and I think it should be fine but it would be good to verify

willvincent commented 4 years ago

Have not yet verified without, but it is the same logic used for environment variable etc that may or may not be specified so yeah it should work.. will confirm shortly though

willvincent commented 4 years ago

Yes, confirmed build works as expected without ulimits defined.

When not defined in .drone.yml it comes through to the task definition as an empty array as it did prior to these changes.

josmo commented 4 years ago

thanks!