Skip to content

Commit

Permalink
feat!: promote Spot VM to GA (#1294)
Browse files Browse the repository at this point in the history
promote Spot VM to GA

Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
  • Loading branch information
mirobertod and bharathkkb committed Jun 29, 2022
1 parent 4f5dded commit 274da2f
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Session.vim
# IntelliJ IDEA files:
.idea/

# Visual Studio Code files:
.vscode/

### https://raw.github.com/github/gitignore/90f149de451a5433aebd94d02d11b0e28843a1af/Terraform.gitignore

# Local .terraform directories
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module "gke" {
min_count = 1
max_count = 100
local_ssd_count = 0
spot = false
disk_size_gb = 100
disk_type = "pd-standard"
image_type = "COS_CONTAINERD"
Expand Down Expand Up @@ -254,6 +255,7 @@ The node_pools variable takes the following parameters:
| 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 |
| node_metadata | Options to expose the node metadata to the workload running on the node | | Optional |
| preemptible | A boolean that represents whether or not the underlying node VMs are preemptible | false | Optional |
| spot | A boolean that represents whether the underlying node VMs are spot | false | Optional |
| service_account | The service account to be used by the Node VMs | " " | Optional |
| tags | The list of instance tags applied to all nodes | | Required |
| value | The value for the taint | | Required |
Expand Down
4 changes: 2 additions & 2 deletions autogen/main/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ module "gke" {
min_count = 1
max_count = 100
local_ssd_count = 0
{% if beta_cluster %}
spot = false
{% if beta_cluster %}
local_ssd_ephemeral_count = 0
{% endif %}
disk_size_gb = 100
Expand Down Expand Up @@ -223,8 +223,8 @@ The node_pools variable takes the following parameters:
| 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 |
| node_metadata | Options to expose the node metadata to the workload running on the node | | Optional |
| preemptible | A boolean that represents whether or not the underlying node VMs are preemptible | false | Optional |
{% if beta_cluster %}
| spot | A boolean that represents whether the underlying node VMs are spot | false | Optional |
{% if beta_cluster %}
| sandbox_type | Sandbox to use for pods in the node pool | | Required |
{% endif %}
| service_account | The service account to be used by the Node VMs | " " | Optional |
Expand Down
4 changes: 0 additions & 4 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,7 @@ locals {
"machine_type",
"min_cpu_platform",
"preemptible",
{% if beta_cluster %}
"spot",
{% endif %}
"service_account",
"enable_gcfs",
"enable_secure_boot",
Expand Down Expand Up @@ -652,9 +650,7 @@ resource "google_container_node_pool" "pools" {
local.service_account,
)
preemptible = lookup(each.value, "preemptible", false)
{% if beta_cluster %}
spot = lookup(each.value, "spot", false)
{% endif %}

oauth_scopes = concat(
local.node_pools_oauth_scopes["all"],
Expand Down
2 changes: 1 addition & 1 deletion autogen/main/versions.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 4.10.0, < 5.0"
version = ">= 4.25.0, < 5.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
1 change: 1 addition & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ resource "google_container_node_pool" "pools" {
local.service_account,
)
preemptible = lookup(each.value, "preemptible", false)
spot = lookup(each.value, "spot", false)

oauth_scopes = concat(
local.node_pools_oauth_scopes["all"],
Expand Down
2 changes: 2 additions & 0 deletions modules/private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ module "gke" {
min_count = 1
max_count = 100
local_ssd_count = 0
spot = false
disk_size_gb = 100
disk_type = "pd-standard"
image_type = "COS_CONTAINERD"
Expand Down Expand Up @@ -288,6 +289,7 @@ The node_pools variable takes the following parameters:
| 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 |
| node_metadata | Options to expose the node metadata to the workload running on the node | | Optional |
| preemptible | A boolean that represents whether or not the underlying node VMs are preemptible | false | Optional |
| spot | A boolean that represents whether the underlying node VMs are spot | false | Optional |
| service_account | The service account to be used by the Node VMs | " " | Optional |
| tags | The list of instance tags applied to all nodes | | Required |
| value | The value for the taint | | Required |
Expand Down
2 changes: 2 additions & 0 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ locals {
"machine_type",
"min_cpu_platform",
"preemptible",
"spot",
"service_account",
"enable_gcfs",
"enable_secure_boot",
Expand Down Expand Up @@ -451,6 +452,7 @@ resource "google_container_node_pool" "pools" {
local.service_account,
)
preemptible = lookup(each.value, "preemptible", false)
spot = lookup(each.value, "spot", false)

oauth_scopes = concat(
local.node_pools_oauth_scopes["all"],
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 4.10.0, < 5.0"
version = ">= 4.25.0, < 5.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 2 additions & 0 deletions modules/private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module "gke" {
min_count = 1
max_count = 100
local_ssd_count = 0
spot = false
disk_size_gb = 100
disk_type = "pd-standard"
image_type = "COS_CONTAINERD"
Expand Down Expand Up @@ -266,6 +267,7 @@ The node_pools variable takes the following parameters:
| 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 |
| node_metadata | Options to expose the node metadata to the workload running on the node | | Optional |
| preemptible | A boolean that represents whether or not the underlying node VMs are preemptible | false | Optional |
| spot | A boolean that represents whether the underlying node VMs are spot | false | Optional |
| service_account | The service account to be used by the Node VMs | " " | Optional |
| tags | The list of instance tags applied to all nodes | | Required |
| value | The value for the taint | | Required |
Expand Down
1 change: 1 addition & 0 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ resource "google_container_node_pool" "pools" {
local.service_account,
)
preemptible = lookup(each.value, "preemptible", false)
spot = lookup(each.value, "spot", false)

oauth_scopes = concat(
local.node_pools_oauth_scopes["all"],
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 4.10.0, < 5.0"
version = ">= 4.25.0, < 5.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 4.10.0, < 5.0"
version = ">= 4.25.0, < 5.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down

0 comments on commit 274da2f

Please sign in to comment.