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 Sep 26, 2023
1 parent 0abdc9d commit 6251874
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 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.25 # 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.25 # Used only for ubuntu 18 as K8S 1.24.9, as K8S > 1.25 have Ubuntu 22
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-byocni-nokubeproxy-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster without kube-proxy
$(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-byocni-nokubeproxy-up: rg-up overlay-net-up ## Brings up an Overlay BYO

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 @@ -129,6 +137,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 @@ -142,6 +152,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 @@ -155,6 +167,8 @@ swift-byocni-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster

swift-byocni-nokubeproxy-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster without kube-proxy
$(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 @@ -169,6 +183,8 @@ swift-byocni-nokubeproxy-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI clus

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 @@ -183,6 +199,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 @@ -195,6 +213,8 @@ swift-up: rg-up swift-net-up ## Bring up a SWIFT AzCNI cluster

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 @@ -208,6 +228,8 @@ windows-cniv1-up: rg-up overlay-net-up ## Bring up a Windows CNIv1 cluster

linux-cniv1-up: rg-up overlay-net-up ## Bring up a Linux 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) \
--max-pods 250 \
Expand All @@ -222,6 +244,8 @@ linux-cniv1-up: rg-up overlay-net-up ## Bring up a Linux CNIv1 cluster

dualstack-overlay-up: rg-up overlay-net-up ## Brings up an dualstack Overlay cluster with Linux node only
$(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 @@ -236,6 +260,8 @@ dualstack-overlay-up: rg-up overlay-net-up ## Brings up an dualstack Overlay clu

dualstack-overlay-byocni-up: rg-up overlay-net-up ## Brings up an dualstack 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) \
--network-plugin none \
Expand All @@ -251,10 +277,10 @@ dualstack-overlay-byocni-up: rg-up overlay-net-up ## Brings up an dualstack Over
windows-nodepool-up: ## Add windows node pool
$(AZCLI) aks nodepool add -g $(GROUP) -n npwin \
--node-count $(NODE_COUNT) \
--node-vm-size $(VM_SIZE) \
--node-vm-size $(VM_SIZE_WIN) \
--cluster-name $(CLUSTER) \
--os-type Windows \
--os-sku $(WINDOWS_OS_SKU) \
--os-sku $(OS_SKU_WIN) \
--max-pods 250 \
--subscription $(SUB)
@$(MAKE) set-kubeconf
Expand Down

0 comments on commit 6251874

Please sign in to comment.