Skip to content

Commit dbb7be9

Browse files
committed
add ProvisioningModel to enable gcp spot instances
1 parent 588d549 commit dbb7be9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

machine/v1beta1/types_gcpprovider.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ const (
2525
RestartPolicyNever GCPRestartPolicyType = "Never"
2626
)
2727

28+
// GCPProvisioningModelType is a type representing acceptable values for ProvisioningModel field in GCPMachineProviderSpec
29+
type GCPProvisioningModelType string
30+
31+
const (
32+
// GCPSpotInstance To enable the GCP instances as spot type.
33+
GCPSpotInstance GCPProvisioningModelType = "Spot"
34+
)
35+
2836
// SecureBootPolicy represents the secure boot configuration for the GCP machine.
2937
type SecureBootPolicy string
3038

@@ -129,6 +137,9 @@ type GCPMachineProviderSpec struct {
129137
// preemptible indicates if created instance is preemptible.
130138
// +optional
131139
Preemptible bool `json:"preemptible,omitempty"`
140+
// provisioningModel is used to enable GCP spot instances.
141+
// +optional
142+
ProvisioningModel GCPProvisioningModelType `json:"provisioningModel,omitempty"`
132143
// onHostMaintenance determines the behavior when a maintenance event occurs that might cause the instance to reboot.
133144
// This is required to be set to "Terminate" if you want to provision machine with attached GPUs.
134145
// Otherwise, allowed values are "Migrate" and "Terminate".

0 commit comments

Comments
 (0)