From 2badc381c44681cf3cc59ac958908ef0eff018ee Mon Sep 17 00:00:00 2001 From: John Gardiner Myers Date: Tue, 1 Jun 2021 20:43:02 -0700 Subject: [PATCH] Set lifecycle on Droplet task --- pkg/model/domodel/droplets.go | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pkg/model/domodel/droplets.go b/pkg/model/domodel/droplets.go index 76812ba983e0e..7d9760514ed71 100644 --- a/pkg/model/domodel/droplets.go +++ b/pkg/model/domodel/droplets.go @@ -55,18 +55,20 @@ func (d *DropletBuilder) Build(c *fi.ModelBuilderContext) error { for _, ig := range d.InstanceGroups { name := d.AutoscalingGroupName(ig) - var droplet dotasks.Droplet - droplet.Count = int(fi.Int32Value(ig.Spec.MinSize)) - droplet.Name = fi.String(name) - - // during alpha support we only allow 1 region - // validation for only 1 region is done at this point - droplet.Region = fi.String(d.Cluster.Spec.Subnets[0].Region) - droplet.Size = fi.String(ig.Spec.MachineType) - droplet.Image = fi.String(ig.Spec.Image) - droplet.SSHKey = fi.String(sshKeyFingerPrint) - - droplet.Tags = []string{clusterTag} + droplet := dotasks.Droplet{ + Count: int(fi.Int32Value(ig.Spec.MinSize)), + Name: fi.String(name), + Lifecycle: d.Lifecycle, + + // during alpha support we only allow 1 region + // validation for only 1 region is done at this point + Region: fi.String(d.Cluster.Spec.Subnets[0].Region), + Size: fi.String(ig.Spec.MachineType), + Image: fi.String(ig.Spec.Image), + SSHKey: fi.String(sshKeyFingerPrint), + + Tags: []string{clusterTag}, + } if ig.IsMaster() { masterIndexCount++