Skip to content

Commit

Permalink
Make node pool taint non-mandatory (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
Katie Keel authored Sep 15, 2021
1 parent 850df2f commit 9b28f5c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions node_pool/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# node-pool-v3.5.0
- Fixed taints so that Terraform won't error out if you don't specify them on a node pool

# node-pool-v3.4.0
- Added taints to node pool module (mandatory, mistakenly)

# node-pool-v3.3.1
- Added the ability to enable secure boot on nodes when the cluster uses shielded nodes. This can be enabled with the variable `enable_secure_boot`

# node-pool-v3.3.0
- Added `node_metadata` parameter to control node metadata provided to workload, so that [workload identity](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity) functionality may be used.

Expand Down
1 change: 1 addition & 0 deletions node_pool/inputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,5 @@ variable "enable_secure_boot" {
variable "taint" {
description = "Key value pairs of taints to apply on nodes in the pool"
type = map
default = null
}
9 changes: 4 additions & 5 deletions node_pool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@ resource "google_container_node_pool" "node_pool" {
}

dynamic "taint" {
for_each = [var.taint]
for_each = toset(var.taint == null ? [] : [var.taint])
content {
# TF-UPGRADE-TODO: The automatic upgrade tool can't predict
# which keys might be set in maps assigned here, so it has
# produced a comprehensive set here. Consider simplifying
# this after confirming which keys can be set in practice.

effect = taint.value.effect
key = taint.value.key
value = taint.value.value
effect = var.taint.effect
key = var.taint.key
value = var.taint.value
}
}

Expand All @@ -100,4 +100,3 @@ resource "google_container_node_pool" "node_pool" {
create_before_destroy = true
}
}

0 comments on commit 9b28f5c

Please sign in to comment.