diff --git a/hack/aks/Makefile b/hack/aks/Makefile index 5c3306af95..4aae6f5783 100644 --- a/hack/aks/Makefile +++ b/hack/aks/Makefile @@ -8,13 +8,15 @@ AZIMG = mcr.microsoft.com/azure-cli AZCLI ?= docker run --rm -v $(AZCFG):/root/.azure -v $(KUBECFG):/root/.kube -v $(SSH):/root/.ssh -v $(PWD):/root/tmpsrc $(AZIMG) az # overrideable defaults -REGION ?= westus2 +AUTOUPGRADE ?= patch +K8S_VER ?= 1.27 # Used only for ubuntu 18 as K8S 1.24.9, as K8S > 1.25 have Ubuntu 22 +NODE_COUNT ?= 2 +NODEUPGRADE ?= NodeImage OS_SKU ?= Ubuntu -WINDOWS_OS_SKU ?= Windows2022 +OS_SKU_WIN ?= Windows2022 +REGION ?= westus2 VM_SIZE ?= Standard_B2s -NODE_COUNT ?= 2 -K8S_VER ?= 1.27 # Designated for Long Term Support, July 2025 | Only Ubuntu 22.04 is supported -WINDOWS_VM_SKU ?= Standard_B2s +VM_SIZE_WIN ?= Standard_B2s # overrideable variables SUB ?= $(AZURE_SUBSCRIPTION) @@ -88,6 +90,8 @@ up: swift-up ## Alias to swift-up overlay-byocni-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster $(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \ + --auto-upgrade-channel $(AUTOUPGRADE) \ + --node-os-upgrade-channel $(NODEUPGRADE) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ --load-balancer-sku basic \ @@ -101,6 +105,8 @@ overlay-byocni-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster overlay-cilium-up: rg-up overlay-net-up ## Brings up an Overlay Cilium cluster $(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \ + --auto-upgrade-channel $(AUTOUPGRADE) \ + --node-os-upgrade-channel $(NODEUPGRADE) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ --load-balancer-sku basic \ @@ -115,6 +121,8 @@ overlay-cilium-up: rg-up overlay-net-up ## Brings up an Overlay Cilium cluster overlay-up: rg-up overlay-net-up ## Brings up an Overlay AzCNI cluster $(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \ + --auto-upgrade-channel $(AUTOUPGRADE) \ + --node-os-upgrade-channel $(NODEUPGRADE) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ --load-balancer-sku basic \ @@ -128,6 +136,8 @@ overlay-up: rg-up overlay-net-up ## Brings up an Overlay AzCNI cluster swift-byocni-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster $(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \ + --auto-upgrade-channel $(AUTOUPGRADE) \ + --node-os-upgrade-channel $(NODEUPGRADE) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ --load-balancer-sku basic \ @@ -142,6 +152,8 @@ swift-byocni-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster swift-cilium-up: rg-up swift-net-up ## Bring up a SWIFT Cilium cluster $(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \ + --auto-upgrade-channel $(AUTOUPGRADE) \ + --node-os-upgrade-channel $(NODEUPGRADE) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ --load-balancer-sku basic \ @@ -156,6 +168,8 @@ swift-cilium-up: rg-up swift-net-up ## Bring up a SWIFT Cilium cluster swift-up: rg-up swift-net-up ## Bring up a SWIFT AzCNI cluster $(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \ + --auto-upgrade-channel $(AUTOUPGRADE) \ + --node-os-upgrade-channel $(NODEUPGRADE) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ --load-balancer-sku basic \ @@ -168,6 +182,8 @@ swift-up: rg-up swift-net-up ## Bring up a SWIFT AzCNI cluster cilium-overlay-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster without kube-proxy for Cilium $(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \ + --auto-upgrade-channel $(AUTOUPGRADE) \ + --node-os-upgrade-channel $(NODEUPGRADE) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ --load-balancer-sku basic \ @@ -182,6 +198,8 @@ cilium-overlay-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster cilium-podsubnet-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster without kube-proxy for Cilium $(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \ + --auto-upgrade-channel $(AUTOUPGRADE) \ + --node-os-upgrade-channel $(NODEUPGRADE) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ --load-balancer-sku basic \ @@ -196,6 +214,8 @@ cilium-podsubnet-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster with windows-cniv1-up: rg-up overlay-net-up ## Bring up a Windows CNIv1 cluster $(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \ + --auto-upgrade-channel $(AUTOUPGRADE) \ + --node-os-upgrade-channel $(NODEUPGRADE) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ --network-plugin azure \ @@ -207,16 +227,18 @@ windows-cniv1-up: rg-up overlay-net-up ## Bring up a Windows CNIv1 cluster $(AZCLI) aks nodepool add --resource-group $(GROUP) --cluster-name $(CLUSTER) \ --os-type Windows \ - --os-sku $(WINDOWS_OS_SKU) \ + --os-sku $(OS_SKU_WIN) \ --max-pods 250 \ --name npwin \ --node-count $(NODE_COUNT) \ - -s $(WINDOWS_VM_SKU) + -s $(VM_SIZE_WIN) @$(MAKE) set-kubeconf linux-cniv1-up: rg-up overlay-net-up $(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \ + --auto-upgrade-channel $(AUTOUPGRADE) \ + --node-os-upgrade-channel $(NODEUPGRADE) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ --max-pods 250 \