diff --git a/hack/aks/Makefile b/hack/aks/Makefile index 98933efd1d..d580d12d21 100644 --- a/hack/aks/Makefile +++ b/hack/aks/Makefile @@ -17,6 +17,7 @@ OS_SKU_WIN ?= Windows2022 REGION ?= westus2 VM_SIZE ?= Standard_B2s VM_SIZE_WIN ?= Standard_B2s +LTS ?= true # overrideable variables SUB ?= $(AZURE_SUBSCRIPTION) @@ -24,6 +25,13 @@ CLUSTER ?= $(USER)-$(REGION) GROUP ?= $(CLUSTER) VNET ?= $(CLUSTER) +# Long Term Support (LTS) +ifeq ($(LTS),true) + LTS = --k8s-support-plan AKSLongTermSupport --tier premium +else + LTS = +endif + ##@ Help help: ## Display this help @@ -62,6 +70,7 @@ vars: ## Show the input vars configured for the cluster commands @echo VM_SIZE=$(VM_SIZE) @echo NODE_COUNT=$(NODE_COUNT) @echo VMSS_NAME=$(VMSS_NAME) + @echo LTS=$(if $(LTS),$(LTS),empty) ##@ SWIFT Infra @@ -95,13 +104,12 @@ overlay-byocni-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster --kubernetes-version $(K8S_VER) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ - --k8s-support-plan AKSLongTermSupport \ - --tier premium \ --network-plugin none \ --network-plugin-mode overlay \ --pod-cidr 192.168.0.0/16 \ --vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \ --no-ssh-key \ + $(LTS) \ --yes @$(MAKE) set-kubeconf @@ -112,14 +120,13 @@ overlay-cilium-up: rg-up overlay-net-up ## Brings up an Overlay Cilium cluster --kubernetes-version $(K8S_VER) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ - --k8s-support-plan AKSLongTermSupport \ - --tier premium \ --network-plugin azure \ --network-dataplane cilium \ --network-plugin-mode overlay \ --pod-cidr 192.168.0.0/16 \ --vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \ --no-ssh-key \ + $(LTS) \ --yes @$(MAKE) set-kubeconf @@ -130,13 +137,12 @@ overlay-up: rg-up overlay-net-up ## Brings up an Overlay AzCNI cluster --kubernetes-version $(K8S_VER) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ - --k8s-support-plan AKSLongTermSupport \ - --tier premium \ --network-plugin azure \ --network-plugin-mode overlay \ --pod-cidr 192.168.0.0/16 \ --vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \ --no-ssh-key \ + $(LTS) \ --yes @$(MAKE) set-kubeconf @@ -147,13 +153,12 @@ swift-byocni-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster --kubernetes-version $(K8S_VER) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ - --k8s-support-plan AKSLongTermSupport \ - --tier premium \ --network-plugin none \ --vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \ --pod-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/podnet \ --no-ssh-key \ --os-sku $(OS_SKU) \ + $(LTS) \ --yes @$(MAKE) set-kubeconf @@ -165,14 +170,13 @@ swift-cilium-up: rg-up swift-net-up ## Bring up a SWIFT Cilium cluster --kubernetes-version $(K8S_VER) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ - --k8s-support-plan AKSLongTermSupport \ - --tier premium \ --network-plugin azure \ --network-dataplane cilium \ --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CiliumDataplanePreview \ --vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \ --pod-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/podnet \ --no-ssh-key \ + $(LTS) \ --yes @$(MAKE) set-kubeconf @@ -183,12 +187,11 @@ swift-up: rg-up swift-net-up ## Bring up a SWIFT AzCNI cluster --kubernetes-version $(K8S_VER) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ - --k8s-support-plan AKSLongTermSupport \ - --tier premium \ --network-plugin azure \ --vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \ --pod-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/podnet \ --no-ssh-key \ + $(LTS) \ --yes @$(MAKE) set-kubeconf @@ -199,14 +202,13 @@ cilium-overlay-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster --kubernetes-version $(K8S_VER) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ - --k8s-support-plan AKSLongTermSupport \ - --tier premium \ --network-plugin none \ --network-plugin-mode overlay \ --pod-cidr 192.168.0.0/16 \ --vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \ --no-ssh-key \ --kube-proxy-config ./kube-proxy.json \ + $(LTS) \ --yes @$(MAKE) set-kubeconf @@ -217,14 +219,13 @@ cilium-podsubnet-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster with --kubernetes-version $(K8S_VER) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ - --k8s-support-plan AKSLongTermSupport \ - --tier premium \ --network-plugin none \ --vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \ --pod-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/podnet \ --no-ssh-key \ --os-sku $(OS_SKU) \ --kube-proxy-config ./kube-proxy.json \ + $(LTS) \ --yes @$(MAKE) set-kubeconf @@ -235,13 +236,12 @@ windows-cniv1-up: rg-up overlay-net-up ## Bring up a Windows CNIv1 cluster --kubernetes-version $(K8S_VER) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ - --k8s-support-plan AKSLongTermSupport \ - --tier premium \ --network-plugin azure \ --windows-admin-password $(WINDOWS_PASSWORD) \ --windows-admin-username $(WINDOWS_USERNAME) \ --vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \ --no-ssh-key \ + $(LTS) \ --yes $(AZCLI) aks nodepool add --resource-group $(GROUP) --cluster-name $(CLUSTER) \ @@ -261,13 +261,12 @@ linux-cniv1-up: rg-up overlay-net-up --kubernetes-version $(K8S_VER) \ --node-count $(NODE_COUNT) \ --node-vm-size $(VM_SIZE) \ - --k8s-support-plan AKSLongTermSupport \ - --tier premium \ --max-pods 250 \ --network-plugin azure \ --vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \ --os-sku $(OS_SKU) \ --no-ssh-key \ + $(LTS) \ --yes @$(MAKE) set-kubeconf