Skip to content

Commit

Permalink
Merge pull request #27 from avinor/change-upgrade-default-values
Browse files Browse the repository at this point in the history
Change upgrade default values and upgrade providers
  • Loading branch information
emilkor1-avinor authored Oct 4, 2023
2 parents 66d4aec + 2c0dbe4 commit 8093279
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 72 deletions.
84 changes: 42 additions & 42 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ This example deploys a simple cluster with one node pool.
```terraform
module "simple" {
source = "avinor/kubernetes/azurerm"
version = "6.0.0"
version = "6.0.1"
name = "simple"
resource_group_name = "simple-aks-rg"
location = "westeurope"
service_cidr = "10.0.0.0/24"
kubernetes_version = "1.15.5"
kubernetes_version = "1.27.3"
agent_pools = [
{
Expand Down
4 changes: 2 additions & 2 deletions examples/addons/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ module "addon" {
resource_group_name = "addons-aks-rg"
location = "westeurope"
service_cidr = "10.241.0.0/24"
kubernetes_version = "1.23.8"
kubernetes_version = "1.27.3"

agent_pools = [
{
name = "linux"
orchestrator_version = "1.18.14"
orchestrator_version = "1.27.3"
vnet_subnet_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysub"
},
]
Expand Down
4 changes: 2 additions & 2 deletions examples/diagnostics/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ module "diagnostics" {
resource_group_name = "diagnostics-aks-rg"
location = "westeurope"
service_cidr = "10.241.0.0/24"
kubernetes_version = "1.18.14"
kubernetes_version = "1.27.3"

agent_pools = [
{
name = "linux"
orchestrator_version = "1.18.14"
orchestrator_version = "1.27.3"
vnet_subnet_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysub"
},
]
Expand Down
4 changes: 2 additions & 2 deletions examples/rbac/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ module "rbac" {
resource_group_name = "rbac-aks-rg"
location = "norwayeast"
service_cidr = "10.241.0.0/24"
kubernetes_version = "1.18.14"
kubernetes_version = "1.27.3"
azure_rbac_enabled = true

agent_pools = [
{
name = "linux"
orchestrator_version = "1.25.6"
orchestrator_version = "1.27.3"
vnet_subnet_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysub"
},
]
Expand Down
4 changes: 2 additions & 2 deletions examples/simple/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ module "simple" {
resource_group_name = "simple-aks-rg"
location = "westeurope"
service_cidr = "10.241.0.0/24"
kubernetes_version = "1.18.14"
kubernetes_version = "1.27.3"

agent_pools = [
{
name = "linux"
orchestrator_version = "1.18.14"
orchestrator_version = "1.27.3"
vnet_subnet_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysub"
},
]
Expand Down
12 changes: 2 additions & 10 deletions examples/upgrade/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,13 @@ module "upgrade" {
resource_group_name = "upgrade-aks-rg"
location = "westeurope"
service_cidr = "10.241.0.0/24"
kubernetes_version = "1.18.14"
kubernetes_version = "1.27.3"
node_os_channel_upgrade = "Unmanaged"

maintenance_window_node_os = {
frequency = "Weekly"
interval = 1
duration = 4
day_of_week = "Sunday"
start_time = "01:00"
}

agent_pools = [
{
name = "linux"
orchestrator_version = "1.18.14"
orchestrator_version = "1.27.3"
vnet_subnet_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysub"
},
]
Expand Down
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ terraform {
required_providers {
kubernetes = {
source = "hashicorp/kubernetes"
version = "~> 2.16.0"
version = "~> 2.23.0"
}
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.72.0"
version = "~> 3.75.0"
}
azuread = {
source = "hashicorp/azuread"
version = "~> 2.39.0"
version = "~> 2.43.0"
}
}
}
Expand Down
9 changes: 2 additions & 7 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variable "kubernetes_version" {

variable "node_os_channel_upgrade" {
description = "The upgrade channel for this Kubernetes Cluster Nodes' OS Image."
default = "Unmanaged"
default = "NodeImage"
}

variable "maintenance_window_node_os" {
Expand All @@ -32,12 +32,7 @@ variable "maintenance_window_node_os" {
day_of_week = optional(string) # Required if frequency is weekly.
start_time = optional(string)
})
default = {
frequency = "Daily"
interval = 1
duration = 4
start_time = "00:00" # UTC
}
default = null
}

variable "node_resource_group" {
Expand Down

0 comments on commit 8093279

Please sign in to comment.