Skip to content

Commit

Permalink
Merge branch 'AZ-1355-auto-upgrade' into 'master'
Browse files Browse the repository at this point in the history
AZ-1355: Add autoupgrade setting

Closes AZ-1355

See merge request claranet/projects/cloud/azure/terraform/modules/aks-light!13
  • Loading branch information
Laurent Piroelle committed Feb 23, 2024
2 parents 55a6808 + 04a29b8 commit d7af80a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ module "aks" {
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| aci\_subnet\_id | ID of the Subnet for ACI virtual-nodes. | `string` | `null` | no |
| aks\_automatic\_channel\_upgrade | The upgrade channel for this Kubernetes Cluster. Possible values are `patch`, `rapid`, `node-image` and `stable`. Setting this field to `null` sets this value to none. | `string` | `"patch"` | no |
| aks\_http\_proxy\_settings | Azure Kubernetes Service HTTP proxy settings. URLs must be in format `http(s)://fqdn:port/`. When setting the `no_proxy_list` parameter, the AKS Private Endpoint domain name and the AKS VNet CIDR (or Subnet CIDRs) must be added to the list. | <pre>object({<br> https_proxy_url = optional(string)<br> http_proxy_url = optional(string)<br> trusted_ca = optional(string)<br> no_proxy_list = optional(list(string), [])<br> })</pre> | `null` | no |
| aks\_network\_mode | Azure Kubernetes Service network mode to use. Only available with Azure CNI. | `string` | `null` | no |
| aks\_network\_plugin | Azure Kubernetes Service network plugin to use. Possible names are `azure` and `kubenet`. Possible CNI modes are `None`, `Overlay` and `Cilium` for Azure CNI and `None` for Kubenet. Changing this forces a new resource to be created. | <pre>object({<br> name = optional(string, "azure")<br> cni_mode = optional(string, "overlay")<br> })</pre> | `{}` | no |
Expand Down
1 change: 1 addition & 0 deletions r-aks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ resource "azurerm_kubernetes_cluster" "aks" {

# Cluster config
kubernetes_version = coalesce(var.kubernetes_version, data.azurerm_kubernetes_service_versions.versions.latest_version)
automatic_channel_upgrade = var.aks_automatic_channel_upgrade
sku_tier = var.aks_sku_tier
node_resource_group = local.aks_nodes_rg_name
http_application_routing_enabled = var.http_application_routing_enabled
Expand Down
10 changes: 10 additions & 0 deletions variables-aks-light.tf
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,13 @@ variable "vnet_integration" {
error_message = "var.vnet_integration.subnet_id must be set when VNet integration is enabled."
}
}

variable "aks_automatic_channel_upgrade" {
description = "The upgrade channel for this Kubernetes Cluster. Possible values are `patch`, `rapid`, `node-image` and `stable`. Setting this field to `null` sets this value to none."
type = string
default = "patch"
validation {
condition = try(contains(["patch", "rapid", "node-image", "stable"], var.aks_automatic_channel_upgrade), false) || var.aks_automatic_channel_upgrade == null
error_message = "The upgrade channel must be one of the following values: patch, rapid, node-image, stable or null."
}
}

0 comments on commit d7af80a

Please sign in to comment.