From 5858b260a1d6a9d2ee3687a08690e8932ca86af1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 28 Jun 2024 07:09:48 +0000 Subject: [PATCH] Auto update --- CHANGELOG.md | 1 + .../application_gateway_ingress/TestRecord.md | 22 +++++++++++++++++ examples/multiple_node_pools/TestRecord.md | 20 ++++++++++++++++ examples/named_cluster/TestRecord.md | 21 ++++++++++++++++ examples/startup/TestRecord.md | 21 ++++++++++++++++ examples/with_acr/TestRecord.md | 20 ++++++++++++++++ examples/without_monitor/TestRecord.md | 21 ++++++++++++++++ extra_node_pool.tf | 8 +++---- log_analytics.tf | 4 ++-- main.tf | 6 ++--- variables.tf | 24 +++++++++---------- 11 files changed, 147 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9827baa4..f669c3a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Bump github.com/hashicorp/go-getter from 1.7.4 to 1.7.5 in /test [\#569](https://github.com/Azure/terraform-azurerm-aks/pull/569) ([dependabot[bot]](https://github.com/apps/dependabot)) - Start new Changelog file for v10 [\#567](https://github.com/Azure/terraform-azurerm-aks/pull/567) ([zioproto](https://github.com/zioproto)) - fixed inaccurate variable descriptions for azure cni in overlay mode [\#566](https://github.com/Azure/terraform-azurerm-aks/pull/566) ([Xelef2000](https://github.com/Xelef2000)) +- add drain\_timeout\_in\_minutes and node\_soak\_duration\_in\_minutes [\#564](https://github.com/Azure/terraform-azurerm-aks/pull/564) ([zioproto](https://github.com/zioproto)) diff --git a/examples/application_gateway_ingress/TestRecord.md b/examples/application_gateway_ingress/TestRecord.md index bef21f26..47052d83 100644 --- a/examples/application_gateway_ingress/TestRecord.md +++ b/examples/application_gateway_ingress/TestRecord.md @@ -1,3 +1,25 @@ +## 26 Jun 24 08:55 UTC + +Success: true + +### Versions + +Terraform v1.8.3 +on linux_amd64 ++ provider registry.terraform.io/azure/azapi v1.13.1 ++ provider registry.terraform.io/hashicorp/azurerm v3.109.0 ++ provider registry.terraform.io/hashicorp/kubernetes v2.22.0 ++ provider registry.terraform.io/hashicorp/null v3.2.2 ++ provider registry.terraform.io/hashicorp/random v3.3.2 ++ provider registry.terraform.io/hashicorp/time v0.9.1 ++ provider registry.terraform.io/hashicorp/tls v4.0.5 + +### Error + + + +--- + ## 19 Jun 24 15:27 UTC Success: true diff --git a/examples/multiple_node_pools/TestRecord.md b/examples/multiple_node_pools/TestRecord.md index b1f5e1b2..f113e610 100644 --- a/examples/multiple_node_pools/TestRecord.md +++ b/examples/multiple_node_pools/TestRecord.md @@ -1,3 +1,23 @@ +## 26 Jun 24 07:49 UTC + +Success: true + +### Versions + +Terraform v1.8.3 +on linux_amd64 ++ provider registry.terraform.io/azure/azapi v1.13.1 ++ provider registry.terraform.io/hashicorp/azurerm v3.109.0 ++ provider registry.terraform.io/hashicorp/null v3.2.2 ++ provider registry.terraform.io/hashicorp/random v3.3.2 ++ provider registry.terraform.io/hashicorp/tls v4.0.5 + +### Error + + + +--- + ## 19 Jun 24 14:20 UTC Success: true diff --git a/examples/named_cluster/TestRecord.md b/examples/named_cluster/TestRecord.md index a8090ce6..1a9b416d 100644 --- a/examples/named_cluster/TestRecord.md +++ b/examples/named_cluster/TestRecord.md @@ -1,3 +1,24 @@ +## 26 Jun 24 09:50 UTC + +Success: true + +### Versions + +Terraform v1.8.3 +on linux_amd64 ++ provider registry.terraform.io/anschoewe/curl v1.0.2 ++ provider registry.terraform.io/azure/azapi v1.13.1 ++ provider registry.terraform.io/hashicorp/azurerm v3.109.0 ++ provider registry.terraform.io/hashicorp/null v3.2.2 ++ provider registry.terraform.io/hashicorp/random v3.3.2 ++ provider registry.terraform.io/hashicorp/tls v4.0.5 + +### Error + + + +--- + ## 19 Jun 24 16:21 UTC Success: true diff --git a/examples/startup/TestRecord.md b/examples/startup/TestRecord.md index a7fef169..5daa4955 100644 --- a/examples/startup/TestRecord.md +++ b/examples/startup/TestRecord.md @@ -1,3 +1,24 @@ +## 26 Jun 24 09:26 UTC + +Success: true + +### Versions + +Terraform v1.8.3 +on linux_amd64 ++ provider registry.terraform.io/anschoewe/curl v1.0.2 ++ provider registry.terraform.io/azure/azapi v1.13.1 ++ provider registry.terraform.io/hashicorp/azurerm v3.109.0 ++ provider registry.terraform.io/hashicorp/null v3.2.2 ++ provider registry.terraform.io/hashicorp/random v3.3.2 ++ provider registry.terraform.io/hashicorp/tls v4.0.5 + +### Error + + + +--- + ## 19 Jun 24 15:53 UTC Success: true diff --git a/examples/with_acr/TestRecord.md b/examples/with_acr/TestRecord.md index 7b730e59..e1931aaa 100644 --- a/examples/with_acr/TestRecord.md +++ b/examples/with_acr/TestRecord.md @@ -1,3 +1,23 @@ +## 26 Jun 24 07:42 UTC + +Success: true + +### Versions + +Terraform v1.8.3 +on linux_amd64 ++ provider registry.terraform.io/azure/azapi v1.13.1 ++ provider registry.terraform.io/hashicorp/azurerm v3.109.0 ++ provider registry.terraform.io/hashicorp/null v3.2.2 ++ provider registry.terraform.io/hashicorp/random v3.3.2 ++ provider registry.terraform.io/hashicorp/tls v4.0.5 + +### Error + + + +--- + ## 19 Jun 24 14:16 UTC Success: true diff --git a/examples/without_monitor/TestRecord.md b/examples/without_monitor/TestRecord.md index 69bc83f5..9f0ac74f 100644 --- a/examples/without_monitor/TestRecord.md +++ b/examples/without_monitor/TestRecord.md @@ -1,3 +1,24 @@ +## 26 Jun 24 09:48 UTC + +Success: true + +### Versions + +Terraform v1.8.3 +on linux_amd64 ++ provider registry.terraform.io/anschoewe/curl v1.0.2 ++ provider registry.terraform.io/azure/azapi v1.13.1 ++ provider registry.terraform.io/hashicorp/azurerm v3.109.0 ++ provider registry.terraform.io/hashicorp/null v3.2.2 ++ provider registry.terraform.io/hashicorp/random v3.3.2 ++ provider registry.terraform.io/hashicorp/tls v4.0.5 + +### Error + + + +--- + ## 19 Jun 24 16:18 UTC Success: true diff --git a/extra_node_pool.tf b/extra_node_pool.tf index 56104407..ce845eb8 100644 --- a/extra_node_pool.tf +++ b/extra_node_pool.tf @@ -46,7 +46,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "node_pool_create_before_destroy avm_git_last_modified_at = "2024-03-04 03:19:50" avm_git_org = "Azure" avm_git_repo = "terraform-azurerm-aks" - avm_yor_trace = "5d87ea04-01a9-4494-8b67-d410f03e8697" + avm_yor_trace = "dccd88d7-7157-4426-813c-bbf87a761253" } /**/ : replace(k, "avm_", var.tracing_tags_prefix) => v } : {}) /**/)) ultra_ssd_enabled = each.value.ultra_ssd_enabled vnet_subnet_id = each.value.vnet_subnet_id @@ -125,9 +125,9 @@ resource "azurerm_kubernetes_cluster_node_pool" "node_pool_create_before_destroy for_each = each.value.upgrade_settings == null ? [] : ["upgrade_settings"] content { + max_surge = each.value.upgrade_settings.max_surge drain_timeout_in_minutes = each.value.upgrade_settings.drain_timeout_in_minutes node_soak_duration_in_minutes = each.value.upgrade_settings.node_soak_duration_in_minutes - max_surge = each.value.upgrade_settings.max_surge } } dynamic "windows_profile" { @@ -206,7 +206,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "node_pool_create_after_destroy" avm_git_last_modified_at = "2024-01-11 08:26:20" avm_git_org = "Azure" avm_git_repo = "terraform-azurerm-aks" - avm_yor_trace = "f522906d-8e5b-4b29-a384-186a4a2f5a9e" + avm_yor_trace = "0cb0c39c-83ba-479d-8d5d-06a38657f5ad" } /**/ : replace(k, "avm_", var.tracing_tags_prefix) => v } : {}) /**/)) ultra_ssd_enabled = each.value.ultra_ssd_enabled vnet_subnet_id = each.value.vnet_subnet_id @@ -285,9 +285,9 @@ resource "azurerm_kubernetes_cluster_node_pool" "node_pool_create_after_destroy" for_each = each.value.upgrade_settings == null ? [] : ["upgrade_settings"] content { + max_surge = each.value.upgrade_settings.max_surge drain_timeout_in_minutes = each.value.upgrade_settings.drain_timeout_in_minutes node_soak_duration_in_minutes = each.value.upgrade_settings.node_soak_duration_in_minutes - max_surge = each.value.upgrade_settings.max_surge } } dynamic "windows_profile" { diff --git a/log_analytics.tf b/log_analytics.tf index 7ef963d6..790869f5 100644 --- a/log_analytics.tf +++ b/log_analytics.tf @@ -21,7 +21,7 @@ resource "azurerm_log_analytics_workspace" "main" { avm_git_last_modified_at = "2023-06-05 02:21:33" avm_git_org = "Azure" avm_git_repo = "terraform-azurerm-aks" - avm_yor_trace = "ec2fd284-1bc6-4800-a340-d0554d38ea7d" + avm_yor_trace = "73cae469-593d-414e-afc9-d049354e8e2c" } /**/ : replace(k, "avm_", var.tracing_tags_prefix) => v } : {}) /**/), (/**/ (var.tracing_tags_enabled ? { for k, v in /**/ { avm_yor_name = "main" } /**/ : replace(k, "avm_", var.tracing_tags_prefix) => v } : {}) /**/)) @@ -70,7 +70,7 @@ resource "azurerm_log_analytics_solution" "main" { avm_git_last_modified_at = "2023-07-20 06:04:07" avm_git_org = "Azure" avm_git_repo = "terraform-azurerm-aks" - avm_yor_trace = "6641da62-2128-47e6-9b93-3dd8150fd93b" + avm_yor_trace = "f097e0ad-44ec-45a2-a3e6-08999713407d" } /**/ : replace(k, "avm_", var.tracing_tags_prefix) => v } : {}) /**/), (/**/ (var.tracing_tags_enabled ? { for k, v in /**/ { avm_yor_name = "main" } /**/ : replace(k, "avm_", var.tracing_tags_prefix) => v } : {}) /**/)) diff --git a/main.tf b/main.tf index ff08e6ff..50a5113f 100644 --- a/main.tf +++ b/main.tf @@ -43,7 +43,7 @@ resource "azurerm_kubernetes_cluster" "main" { avm_git_last_modified_at = "2024-02-16 15:45:22" avm_git_org = "Azure" avm_git_repo = "terraform-azurerm-aks" - avm_yor_trace = "771e7cf5-6e8a-491f-8734-28b45679b999" + avm_yor_trace = "9d3072ba-5ff7-4fba-9843-de55553ff6ad" } /**/ : replace(k, "avm_", var.tracing_tags_prefix) => v } : {}) /**/), (/**/ (var.tracing_tags_enabled ? { for k, v in /**/ { avm_yor_name = "main" } /**/ : replace(k, "avm_", var.tracing_tags_prefix) => v } : {}) /**/)) @@ -146,9 +146,9 @@ resource "azurerm_kubernetes_cluster" "main" { for_each = var.agents_pool_max_surge == null ? [] : ["upgrade_settings"] content { + max_surge = var.agents_pool_max_surge drain_timeout_in_minutes = var.agents_pool_drain_timeout_in_minutes node_soak_duration_in_minutes = var.agents_pool_node_soak_duration_in_minutes - max_surge = var.agents_pool_max_surge } } } @@ -249,9 +249,9 @@ resource "azurerm_kubernetes_cluster" "main" { for_each = var.agents_pool_max_surge == null ? [] : ["upgrade_settings"] content { + max_surge = var.agents_pool_max_surge drain_timeout_in_minutes = var.agents_pool_drain_timeout_in_minutes node_soak_duration_in_minutes = var.agents_pool_node_soak_duration_in_minutes - max_surge = var.agents_pool_max_surge } } } diff --git a/variables.tf b/variables.tf index 0fe38e2e..6f94721f 100644 --- a/variables.tf +++ b/variables.tf @@ -57,6 +57,12 @@ variable "agents_min_count" { description = "Minimum number of nodes in a pool" } +variable "agents_pool_drain_timeout_in_minutes" { + type = number + default = 30 + description = "(Optional) The amount of time in minutes to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. Unsetting this after configuring it will force a new resource to be created." +} + variable "agents_pool_kubelet_configs" { type = list(object({ cpu_manager_policy = optional(string) @@ -173,18 +179,6 @@ variable "agents_pool_max_surge" { description = "The maximum number or percentage of nodes which will be added to the Default Node Pool size during an upgrade." } -variable "agents_pool_node_soak_duration_in_minutes" { - type = number - default = 0 - description = "(Optional) The amount of time in minutes to wait after draining a node and before reimaging and moving on to next node. Defaults to 0." -} - -variable "agents_pool_drain_timeout_in_minutes" { - type = number - default = 30 - description = "(Optional) The amount of time in minutes to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. Unsetting this after configuring it will force a new resource to be created." -} - variable "agents_pool_name" { type = string default = "nodepool" @@ -192,6 +186,12 @@ variable "agents_pool_name" { nullable = false } +variable "agents_pool_node_soak_duration_in_minutes" { + type = number + default = 0 + description = "(Optional) The amount of time in minutes to wait after draining a node and before reimaging and moving on to next node. Defaults to 0." +} + variable "agents_proximity_placement_group_id" { type = string default = null