add drain_timeout_in_minutes and node_soak_duration_in_minutes
Requires provider version v3.106.0 https://github.com/hashicorp/terraform-provider-azurerm/pull/26137
This commit is contained in:
Родитель
d92bdfc01d
Коммит
5c71566abb
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -125,7 +125,9 @@ resource "azurerm_kubernetes_cluster_node_pool" "node_pool_create_before_destroy
|
||||||
for_each = each.value.upgrade_settings == null ? [] : ["upgrade_settings"]
|
for_each = each.value.upgrade_settings == null ? [] : ["upgrade_settings"]
|
||||||
|
|
||||||
content {
|
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" {
|
dynamic "windows_profile" {
|
||||||
|
@ -283,7 +285,9 @@ resource "azurerm_kubernetes_cluster_node_pool" "node_pool_create_after_destroy"
|
||||||
for_each = each.value.upgrade_settings == null ? [] : ["upgrade_settings"]
|
for_each = each.value.upgrade_settings == null ? [] : ["upgrade_settings"]
|
||||||
|
|
||||||
content {
|
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" {
|
dynamic "windows_profile" {
|
||||||
|
|
4
main.tf
4
main.tf
|
@ -146,7 +146,9 @@ resource "azurerm_kubernetes_cluster" "main" {
|
||||||
for_each = var.agents_pool_max_surge == null ? [] : ["upgrade_settings"]
|
for_each = var.agents_pool_max_surge == null ? [] : ["upgrade_settings"]
|
||||||
|
|
||||||
content {
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
20
variables.tf
20
variables.tf
|
@ -173,6 +173,18 @@ 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."
|
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 = null
|
||||||
|
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" {
|
variable "agents_pool_name" {
|
||||||
type = string
|
type = string
|
||||||
default = "nodepool"
|
default = "nodepool"
|
||||||
|
@ -1030,7 +1042,9 @@ variable "node_pools" {
|
||||||
ultra_ssd_enabled = optional(bool)
|
ultra_ssd_enabled = optional(bool)
|
||||||
vnet_subnet_id = optional(string)
|
vnet_subnet_id = optional(string)
|
||||||
upgrade_settings = optional(object({
|
upgrade_settings = optional(object({
|
||||||
max_surge = string
|
drain_timeout_in_minutes = number
|
||||||
|
node_soak_duration_in_minutes = number
|
||||||
|
max_surge = string
|
||||||
}))
|
}))
|
||||||
windows_profile = optional(object({
|
windows_profile = optional(object({
|
||||||
outbound_nat_enabled = optional(bool, true)
|
outbound_nat_enabled = optional(bool, true)
|
||||||
|
@ -1130,7 +1144,9 @@ variable "node_pools" {
|
||||||
ultra_ssd_enabled = (Optional) Used to specify whether the UltraSSD is enabled in the Node Pool. Defaults to `false`. See [the documentation](https://docs.microsoft.com/azure/aks/use-ultra-disks) for more information. Changing this forces a new resource to be created.
|
ultra_ssd_enabled = (Optional) Used to specify whether the UltraSSD is enabled in the Node Pool. Defaults to `false`. See [the documentation](https://docs.microsoft.com/azure/aks/use-ultra-disks) for more information. Changing this forces a new resource to be created.
|
||||||
vnet_subnet_id = (Optional) The ID of the Subnet where this Node Pool should exist. Changing this forces a new resource to be created. A route table must be configured on this Subnet.
|
vnet_subnet_id = (Optional) The ID of the Subnet where this Node Pool should exist. Changing this forces a new resource to be created. A route table must be configured on this Subnet.
|
||||||
upgrade_settings = optional(object({
|
upgrade_settings = optional(object({
|
||||||
max_surge = string
|
drain_timeout_in_minutes = number
|
||||||
|
node_soak_duration_in_minutes = number
|
||||||
|
max_surge = string
|
||||||
}))
|
}))
|
||||||
windows_profile = optional(object({
|
windows_profile = optional(object({
|
||||||
outbound_nat_enabled = optional(bool, true)
|
outbound_nat_enabled = optional(bool, true)
|
||||||
|
|
|
@ -8,7 +8,7 @@ terraform {
|
||||||
}
|
}
|
||||||
azurerm = {
|
azurerm = {
|
||||||
source = "hashicorp/azurerm"
|
source = "hashicorp/azurerm"
|
||||||
version = ">= 3.84.0, < 4.0"
|
version = ">= 3.106.1, < 4.0"
|
||||||
}
|
}
|
||||||
null = {
|
null = {
|
||||||
source = "hashicorp/null"
|
source = "hashicorp/null"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче