From 96f3a734e297a5a861839f38d0e26fbca5890a65 Mon Sep 17 00:00:00 2001 From: nellyk <3062772+nellyk@users.noreply.github.com> Date: Thu, 10 Oct 2024 18:37:29 +0100 Subject: [PATCH] fix node taints --- README.md | 6 +++--- locals.tf | 2 +- main.tf | 2 +- variables.tf | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1f2abff..3eb0c07 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ map(object({ os\_disk\_size\_gb = (Optional) The Agent Operating System disk size in GB. Changing this forces a new resource to be created. tags = (Optional) A mapping of tags to assign to the resource. At this time there's a bug in the AKS API where Tags for a Node Pool are not stored in the correct case - you [may wish to use Terraform's `ignore_changes` functionality to ignore changes to the casing](https://www.terraform.io/language/meta-arguments/lifecycle#ignore_changess) until this is fixed in the AKS API. labels = (Optional) A map of Kubernetes labels which should be applied to nodes in this Node Pool. - taints = (Optional) A list of the taints added to new nodes during node pool create and scale. + node\_taints = (Optional) A list of the taints added to new nodes during node pool create and scale. })) Example input: @@ -269,7 +269,7 @@ map(object({ os_disk_size_gb = optional(number, null) tags = optional(map(string), {}) labels = optional(map(string), {}) - taints = list(string) + node_taints = optional(list(string), null) })) ``` @@ -281,7 +281,7 @@ Description: (Optional) A list of the taints added to new nodes during node pool Type: `list(string)` -Default: `{}` +Default: `null` ### [orchestrator\_version](#input\_orchestrator\_version) diff --git a/locals.tf b/locals.tf index 2b821da..2b1c99c 100644 --- a/locals.tf +++ b/locals.tf @@ -39,7 +39,7 @@ locals { max_count = pool.max_count min_count = pool.min_count labels = pool.labels - taint = pool.taints + node_taints = pool.node_taints os_sku = pool.os_sku mode = pool.mode os_disk_size_gb = pool.os_disk_size_gb diff --git a/main.tf b/main.tf index 667272c..9314318 100644 --- a/main.tf +++ b/main.tf @@ -259,7 +259,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "this" { max_count = each.value.max_count min_count = each.value.min_count node_labels = each.value.labels - node_taints = each.value.taints + node_taints = each.value.node_taints orchestrator_version = each.value.orchestrator_version os_disk_size_gb = each.value.os_disk_size_gb os_sku = each.value.os_sku diff --git a/variables.tf b/variables.tf index 2a79ddf..b83ab55 100644 --- a/variables.tf +++ b/variables.tf @@ -133,7 +133,7 @@ variable "node_pools" { os_disk_size_gb = optional(number, null) tags = optional(map(string), {}) labels = optional(map(string), {}) - taints = list(string) + node_taints = optional(list(string), null) })) default = {} description = <<-EOT @@ -149,7 +149,7 @@ map(object({ os_disk_size_gb = (Optional) The Agent Operating System disk size in GB. Changing this forces a new resource to be created. tags = (Optional) A mapping of tags to assign to the resource. At this time there's a bug in the AKS API where Tags for a Node Pool are not stored in the correct case - you [may wish to use Terraform's `ignore_changes` functionality to ignore changes to the casing](https://www.terraform.io/language/meta-arguments/lifecycle#ignore_changess) until this is fixed in the AKS API. labels = (Optional) A map of Kubernetes labels which should be applied to nodes in this Node Pool. - taints = (Optional) A list of the taints added to new nodes during node pool create and scale. + node_taints = (Optional) A list of the taints added to new nodes during node pool create and scale. })) Example input: @@ -186,7 +186,7 @@ EOT variable "node_taints" { type = list(string) - default = {} + default = null description = "(Optional) A list of the taints added to new nodes during node pool create and scale. Changing this forces a new resource to be created." }