Skip to content

Commit 274da2f

Browse files
feat!: promote Spot VM to GA (#1294)
promote Spot VM to GA Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
1 parent 4f5dded commit 274da2f

File tree

13 files changed

+19
-10
lines changed

13 files changed

+19
-10
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ Session.vim
2222
# IntelliJ IDEA files:
2323
.idea/
2424

25+
# Visual Studio Code files:
26+
.vscode/
27+
2528
### https://raw.github.com/github/gitignore/90f149de451a5433aebd94d02d11b0e28843a1af/Terraform.gitignore
2629

2730
# Local .terraform directories

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ module "gke" {
5555
min_count = 1
5656
max_count = 100
5757
local_ssd_count = 0
58+
spot = false
5859
disk_size_gb = 100
5960
disk_type = "pd-standard"
6061
image_type = "COS_CONTAINERD"
@@ -254,6 +255,7 @@ The node_pools variable takes the following parameters:
254255
| node_locations | The list of zones in which the cluster's nodes are located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. Defaults to cluster level node locations if nothing is specified | " " | Optional |
255256
| node_metadata | Options to expose the node metadata to the workload running on the node | | Optional |
256257
| preemptible | A boolean that represents whether or not the underlying node VMs are preemptible | false | Optional |
258+
| spot | A boolean that represents whether the underlying node VMs are spot | false | Optional |
257259
| service_account | The service account to be used by the Node VMs | " " | Optional |
258260
| tags | The list of instance tags applied to all nodes | | Required |
259261
| value | The value for the taint | | Required |

autogen/main/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ module "gke" {
101101
min_count = 1
102102
max_count = 100
103103
local_ssd_count = 0
104-
{% if beta_cluster %}
105104
spot = false
105+
{% if beta_cluster %}
106106
local_ssd_ephemeral_count = 0
107107
{% endif %}
108108
disk_size_gb = 100
@@ -223,8 +223,8 @@ The node_pools variable takes the following parameters:
223223
| node_locations | The list of zones in which the cluster's nodes are located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. Defaults to cluster level node locations if nothing is specified | " " | Optional |
224224
| node_metadata | Options to expose the node metadata to the workload running on the node | | Optional |
225225
| preemptible | A boolean that represents whether or not the underlying node VMs are preemptible | false | Optional |
226-
{% if beta_cluster %}
227226
| spot | A boolean that represents whether the underlying node VMs are spot | false | Optional |
227+
{% if beta_cluster %}
228228
| sandbox_type | Sandbox to use for pods in the node pool | | Required |
229229
{% endif %}
230230
| service_account | The service account to be used by the Node VMs | " " | Optional |

autogen/main/cluster.tf.tmpl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,7 @@ locals {
444444
"machine_type",
445445
"min_cpu_platform",
446446
"preemptible",
447-
{% if beta_cluster %}
448447
"spot",
449-
{% endif %}
450448
"service_account",
451449
"enable_gcfs",
452450
"enable_secure_boot",
@@ -652,9 +650,7 @@ resource "google_container_node_pool" "pools" {
652650
local.service_account,
653651
)
654652
preemptible = lookup(each.value, "preemptible", false)
655-
{% if beta_cluster %}
656653
spot = lookup(each.value, "spot", false)
657-
{% endif %}
658654

659655
oauth_scopes = concat(
660656
local.node_pools_oauth_scopes["all"],

autogen/main/versions.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ terraform {
3838
required_providers {
3939
google = {
4040
source = "hashicorp/google"
41-
version = ">= 4.10.0, < 5.0"
41+
version = ">= 4.25.0, < 5.0"
4242
}
4343
kubernetes = {
4444
source = "hashicorp/kubernetes"

cluster.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ resource "google_container_node_pool" "pools" {
351351
local.service_account,
352352
)
353353
preemptible = lookup(each.value, "preemptible", false)
354+
spot = lookup(each.value, "spot", false)
354355

355356
oauth_scopes = concat(
356357
local.node_pools_oauth_scopes["all"],

modules/private-cluster-update-variant/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ module "gke" {
8383
min_count = 1
8484
max_count = 100
8585
local_ssd_count = 0
86+
spot = false
8687
disk_size_gb = 100
8788
disk_type = "pd-standard"
8889
image_type = "COS_CONTAINERD"
@@ -288,6 +289,7 @@ The node_pools variable takes the following parameters:
288289
| node_locations | The list of zones in which the cluster's nodes are located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. Defaults to cluster level node locations if nothing is specified | " " | Optional |
289290
| node_metadata | Options to expose the node metadata to the workload running on the node | | Optional |
290291
| preemptible | A boolean that represents whether or not the underlying node VMs are preemptible | false | Optional |
292+
| spot | A boolean that represents whether the underlying node VMs are spot | false | Optional |
291293
| service_account | The service account to be used by the Node VMs | " " | Optional |
292294
| tags | The list of instance tags applied to all nodes | | Required |
293295
| value | The value for the taint | | Required |

modules/private-cluster-update-variant/cluster.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ locals {
278278
"machine_type",
279279
"min_cpu_platform",
280280
"preemptible",
281+
"spot",
281282
"service_account",
282283
"enable_gcfs",
283284
"enable_secure_boot",
@@ -451,6 +452,7 @@ resource "google_container_node_pool" "pools" {
451452
local.service_account,
452453
)
453454
preemptible = lookup(each.value, "preemptible", false)
455+
spot = lookup(each.value, "spot", false)
454456

455457
oauth_scopes = concat(
456458
local.node_pools_oauth_scopes["all"],

modules/private-cluster-update-variant/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ terraform {
2121
required_providers {
2222
google = {
2323
source = "hashicorp/google"
24-
version = ">= 4.10.0, < 5.0"
24+
version = ">= 4.25.0, < 5.0"
2525
}
2626
kubernetes = {
2727
source = "hashicorp/kubernetes"

modules/private-cluster/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ module "gke" {
6161
min_count = 1
6262
max_count = 100
6363
local_ssd_count = 0
64+
spot = false
6465
disk_size_gb = 100
6566
disk_type = "pd-standard"
6667
image_type = "COS_CONTAINERD"
@@ -266,6 +267,7 @@ The node_pools variable takes the following parameters:
266267
| node_locations | The list of zones in which the cluster's nodes are located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. Defaults to cluster level node locations if nothing is specified | " " | Optional |
267268
| node_metadata | Options to expose the node metadata to the workload running on the node | | Optional |
268269
| preemptible | A boolean that represents whether or not the underlying node VMs are preemptible | false | Optional |
270+
| spot | A boolean that represents whether the underlying node VMs are spot | false | Optional |
269271
| service_account | The service account to be used by the Node VMs | " " | Optional |
270272
| tags | The list of instance tags applied to all nodes | | Required |
271273
| value | The value for the taint | | Required |

0 commit comments

Comments
 (0)