Skip to content

Commit

Permalink
node pool spot bool (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
Azahorscak authored Jun 30, 2022
1 parent be29105 commit fa7b0ce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions node_pool/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# node-pool-v3.7.0
- Added the ability to use spot vms on a node pool. This can be enabled by setting the variable `spot_nodes` to true. This can only be enabled on new node pools and cannot be toggled after creation. Can only be used with GKE 1.22+.

# node-pool-v3.6.0
- Prepares module for compatibility with future 4.x GCP provider
- Added image_type parameter to control the OS image of the node pool
Expand Down
5 changes: 5 additions & 0 deletions node_pool/inputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ variable "preemptible_nodes" {
default = false
}

variable "spot_nodes"{
description = "Whether to use spot nodes"
default = false
}

variable "node_metadata" {
description = "Specifies how node metadata is exposed to the workload running on the node. Set to `GKE_METADATA` to enable workload identity"
default = "UNSPECIFIED"
Expand Down
1 change: 1 addition & 0 deletions node_pool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ resource "google_container_node_pool" "node_pool" {
disk_type = var.disk_type
tags = var.node_tags
preemptible = var.preemptible_nodes
spot = var.spot_nodes
shielded_instance_config {
enable_secure_boot = var.enable_secure_boot
}
Expand Down

0 comments on commit fa7b0ce

Please sign in to comment.