josmo / drone-rancher

Drone plugin for triggering Rancher deployments
53 stars 35 forks source link

Batch size and batch interval #13

Closed ColtonProvias closed 7 years ago

ColtonProvias commented 8 years ago

It would be great to be able to alter the batch size at least. If you have a global container across 10 separate hosts with the image being 250 MB in size, it can take a while to upgrade them 1 at a time. Allowing for adjustable batch sizes would allow for more to upgrade simultaneously, thus speeding up deployment.

cusspvz commented 8 years ago

I find this completely useful to be implemented!

Found this can be done with current go-rancher's client, unfortunately I am not a Go developer. :/

ColtonProvias commented 8 years ago

Looking into it now, it looks like it's just 4 lines that have to be added. After Line 21 in main.go, adding:

    BatchSize    int64   `json:"batch_size,omitempty"`
    IntervalMillis    int64    `json:"interval_millis,omitempty"`

And then after line 116:

        BatchSize:             vargs.BatchSize,
        IntervalMillis:             vargs.IntervalMillis,

Then it's just updating the documentation appropriately.

josmo commented 7 years ago

The latest version of the plugin for drone .5 now has this :)