Skip to content

Commit

Permalink
fix: set cluster auto-upgrade and node auto-upgrade in the hackfile (#…
Browse files Browse the repository at this point in the history
…2253)

Signed-off-by: Evan Baker <[email protected]>
  • Loading branch information
rbtr authored and jpayne3506 committed Aug 20, 2024
1 parent 1732057 commit 78bf146
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions hack/aks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand Down

0 comments on commit 78bf146

Please sign in to comment.