Skip to content

Commit

Permalink
Add Auto-Upgrades to AKS Template
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmanuelthiel committed Dec 6, 2023
1 parent 015118a commit e9fd7fc
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions src/terraform-aks/templates/azure_aks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,30 @@ resource "azurerm_kubernetes_cluster" "default" {
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
dns_prefix = "${local.prefix}aks"
kubernetes_version = var.kubernetes_version
automatic_channel_upgrade = "patch"
kubernetes_version = var.kubernetes_version
sku_tier = "Standard"
automatic_channel_upgrade = "stable"
node_os_channel_upgrade = "Unmanaged"

# Upgrade the cluster every first Sunday of a month at 1:00 am UTC for 8 hours
maintenance_window_auto_upgrade {
frequency = "RelativeMonthly"
interval = 1
day_of_week = "Sunday"
week_index = "First"
duration = 8
start_time = "01:00"
}

# Upgrade the Node OS image every first Sunday of a month at 1:00 am UTC for 8 hours
maintenance_window_node_os {
frequency = "RelativeMonthly"
interval = 1
day_of_week = "Sunday"
week_index = "First"
duration = 8
start_time = "01:00"
}

default_node_pool {
name = "system"
Expand Down

0 comments on commit e9fd7fc

Please sign in to comment.