File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,14 @@ const (
25
25
RestartPolicyNever GCPRestartPolicyType = "Never"
26
26
)
27
27
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
+
28
36
// SecureBootPolicy represents the secure boot configuration for the GCP machine.
29
37
type SecureBootPolicy string
30
38
@@ -129,6 +137,13 @@ type GCPMachineProviderSpec struct {
129
137
// preemptible indicates if created instance is preemptible.
130
138
// +optional
131
139
Preemptible bool `json:"preemptible,omitempty"`
140
+ // provisioningModel is used to enable GCP spot instances.
141
+ // the only value supported is "Spot"
142
+ // Cannot have preemptible enabled and be a GCP spot instance at the sametime
143
+ // +kubebuilder:validation:MinLength=1
144
+ // +kubebuilder:validation:MaxLength=32
145
+ // +optional
146
+ ProvisioningModel GCPProvisioningModelType `json:"provisioningModel,omitempty"`
132
147
// onHostMaintenance determines the behavior when a maintenance event occurs that might cause the instance to reboot.
133
148
// This is required to be set to "Terminate" if you want to provision machine with attached GPUs.
134
149
// Otherwise, allowed values are "Migrate" and "Terminate".
You can’t perform that action at this time.
0 commit comments