Skip to content

Commit

Permalink
Add AKS cluster maintenance window. (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghidalgo3 committed Apr 12, 2024
1 parent 877ca1b commit 6887ffc
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions deployment/terraform/resources/aks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,37 @@ resource "azurerm_kubernetes_cluster" "pc" {
azure_rbac_enabled = true
}

maintenance_window {
allowed {
day = "Saturday"
hours = [10, 11, 12, 13, 14, 15, 16, 17, 18]
}
# not_allowed {
# start = ISO8601
# end = ISO8601
# }
}

# Recommendation is to make it at least 4 hours long
# https://learn.microsoft.com/en-us/azure/aks/planned-maintenance?tabs=json-file#creating-a-maintenance-window
maintenance_window_auto_upgrade {
frequency = "Weekly"
day_of_week = "Saturday"
interval = 1
duration = 4
utc_offset = "+00:00"
start_time = "10:00" # UTC
}

maintenance_window_node_os {
frequency = "Weekly"
day_of_week = "Saturday"
interval = 1
duration = 4
utc_offset = "+00:00"
start_time = "14:00" # UTC
}

tags = {
Environment = var.environment
ManagedBy = "AI4E"
Expand Down

0 comments on commit 6887ffc

Please sign in to comment.