Skip to content

Commit

Permalink
Fix typo in GKE nodepool taints (#1754)
Browse files Browse the repository at this point in the history
* Fix typo in GKE nodepool taints

Fixes #1749

* fix windows taints
  • Loading branch information
ludoo committed Oct 12, 2023
1 parent 55fc3e2 commit 85d2b8b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions modules/gke-nodepool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,12 @@ locals {
"https://www.googleapis.com/auth/userinfo.email"
]
)
taints_windows = (
local.image.is_win
? [{
key = "node.kubernetes.io/os", value = "windows", effect = "NO_EXECUTE"
}]
: []
)
taints = merge(var.taints, !local.image.is_win ? {} : {
"node.kubernetes.io/os" = {
value = "windows"
effect = "NO_EXECUTE"
}
})
}

resource "google_service_account" "service_account" {
Expand Down Expand Up @@ -215,11 +214,11 @@ resource "google_container_node_pool" "nodepool" {
}
}
dynamic "taint" {
for_each = var.taints
for_each = local.taints
content {
key = taint.key
value = taint.value.value
effect = taint.effect
effect = taint.value.effect
}
}
dynamic "workload_metadata_config" {
Expand Down

0 comments on commit 85d2b8b

Please sign in to comment.