Skip to content

Commit

Permalink
Merge pull request #379 from JoelSpeed/interruptible-machine
Browse files Browse the repository at this point in the history
Bug 1907286: Ensure Machine is marked interruptible as well as Node
  • Loading branch information
openshift-merge-robot committed Dec 15, 2020
2 parents 973296b + 50b7c88 commit da9951a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/actuators/machine/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ func (r *Reconciler) setMachineCloudProviderSpecifics(instance *ec2.Instance) er
}

if instance.InstanceLifecycle != nil && *instance.InstanceLifecycle == ec2.InstanceLifecycleTypeSpot {
// Label on the Machine so that an MHC can select spot instances
r.machine.Labels[machinecontroller.MachineInterruptibleInstanceLabelName] = ""
// Label on the Spec so that it is propogated to the Node
r.machine.Spec.Labels[machinecontroller.MachineInterruptibleInstanceLabelName] = ""
}
Expand Down

0 comments on commit da9951a

Please sign in to comment.