Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/proposals/20200330-spot-instances.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ when the instance is created:
(Delete is supported for VMs as part of VMSS only).

- BillingProfile (default: -1) : This is a struct containing a single field, `MaxPrice`.
This is a float representation of the maximum price the user wishes to pay for their VM.
This is a string representation of the maximum price the user wishes to pay for their VM.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a small comment about why we're using a string for the record? It might not be obvious to future readers.

Uses a string representation because [floats are disallowed](https://github.com/kubernetes-sigs/controller-tools/issues/245#issuecomment-518465214) in Kubernetes APIs.
This defaults to -1 which makes the maximum price the On-Demand price for the instance type.
This also means the instance will never be evicted for price reasons as Azure caps Spot Market prices at the On-Demand price.
(Note instances may still be evicted based on resource pressure within a region).
Expand All @@ -224,7 +225,7 @@ Similar to AWS, we can make an optional struct for SpotVMOptions, which, if pres

```
type SpotVMOptions struct {
MaxPrice *float64 `json:”maxPrice,omitempty”`
MaxPrice *string `json:”maxPrice,omitempty”`
}

type AzureMachineSpec struct {
Expand Down