Skip to content

Commit

Permalink
Add spot-price restart policy for gpu machines
Browse files Browse the repository at this point in the history
  • Loading branch information
dangra authored and matttpt committed Aug 14, 2024
1 parent 6a7123d commit 2fee701
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ var (
MachineRestartPolicyNo MachineRestartPolicy = "no"
MachineRestartPolicyOnFailure MachineRestartPolicy = "on-failure"
MachineRestartPolicyAlways MachineRestartPolicy = "always"
MachineRestartPolicySpotPrice MachineRestartPolicy = "spot-price"
)

// @description The Machine restart policy defines whether and how flyd restarts a Machine after its main process exits. See https://fly.io/docs/machines/guides-examples/machine-restart-policy/.
Expand All @@ -353,6 +354,8 @@ type MachineRestart struct {
Policy MachineRestartPolicy `json:"policy,omitempty" enums:"no,always,on-failure"`
// When policy is on-failure, the maximum number of times to attempt to restart the Machine before letting it stop.
MaxRetries int `json:"max_retries,omitempty"`
// GPU bid price for spot machines
GPUBidPrice float32 `json:"gpu_bid_price,omitempty"`
}

type MachineMount struct {
Expand Down

0 comments on commit 2fee701

Please sign in to comment.