Skip to content

Commit 235e730

Browse files
authored
Merge pull request #3063 from JoelSpeed/update-spot-doc
📖 Update Azure spot types to use string instead of float
2 parents ba2c539 + dcfd137 commit 235e730

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/proposals/20200330-spot-instances.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ when the instance is created:
214214
(Delete is supported for VMs as part of VMSS only).
215215

216216
- BillingProfile (default: -1) : This is a struct containing a single field, `MaxPrice`.
217-
This is a float representation of the maximum price the user wishes to pay for their VM.
217+
This is a string representation of the maximum price the user wishes to pay for their VM.
218+
Uses a string representation because [floats are disallowed](https://github.com/kubernetes-sigs/controller-tools/issues/245#issuecomment-518465214) in Kubernetes APIs.
218219
This defaults to -1 which makes the maximum price the On-Demand price for the instance type.
219220
This also means the instance will never be evicted for price reasons as Azure caps Spot Market prices at the On-Demand price.
220221
(Note instances may still be evicted based on resource pressure within a region).
@@ -224,7 +225,7 @@ Similar to AWS, we can make an optional struct for SpotVMOptions, which, if pres
224225

225226
```
226227
type SpotVMOptions struct {
227-
MaxPrice *float64 `json:”maxPrice,omitempty”`
228+
MaxPrice *string `json:”maxPrice,omitempty”`
228229
}
229230
230231
type AzureMachineSpec struct {

0 commit comments

Comments
 (0)