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 (
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. 
2937type  SecureBootPolicy  string 
3038
@@ -129,6 +137,13 @@ 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+ 	// 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"` 
132147	// onHostMaintenance determines the behavior when a maintenance event occurs that might cause the instance to reboot. 
133148	// This is required to be set to "Terminate" if you want to provision machine with attached GPUs. 
134149	// Otherwise, allowed values are "Migrate" and "Terminate". 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments