Skip to content

Commit 2c3d447

Browse files
jpayne3506rbtr
andauthored
[backport] fix: set cluster auto-upgrade and node auto-upgrade in the hackfile #2253 (#2939)
* fix: set cluster auto-upgrade and node auto-upgrade in the hackfile (#2253) Signed-off-by: Evan Baker <[email protected]> * fix: test v1.5 train on k8s 1.28 (#2564) * fix: test main/v1.5 branch on k8s 1.28 Signed-off-by: Evan Baker <[email protected]> * 1.28 ds changes * ci: specify vars for envsubst --------- Signed-off-by: Evan Baker <[email protected]> Co-authored-by: jpayne3506 <[email protected]> --------- Signed-off-by: Evan Baker <[email protected]> Co-authored-by: Evan Baker <[email protected]>
1 parent 1732057 commit 2c3d447

File tree

4 files changed

+52
-10
lines changed

4 files changed

+52
-10
lines changed

.pipelines/singletenancy/aks/e2e-job-template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ stages:
2929
clusterType: ${{ parameters.clusterType }}
3030
clusterName: ${{ parameters.clusterName }}-$(commitID)
3131
vmSize: ${{ parameters.vmSize }}
32+
vmSizeWin: ${{ parameters.vmSize }}
3233
k8sVersion: ${{ parameters.k8sVersion }}
3334
dependsOn: ${{ parameters.dependsOn }}
3435
region: $(REGION_AKS_CLUSTER_TEST)

.pipelines/templates/create-cluster.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ parameters:
55
clusterName: "" # Recommended to pass in unique identifier
66
vmSize: ""
77
k8sVersion: ""
8-
windowsOsSku: "Windows2022" # Currently we only support Windows2022
8+
osSkuWin: "Windows2022" # Currently we only support Windows2022
99
dependsOn: ""
1010
region: ""
1111

@@ -31,6 +31,13 @@ jobs:
3131
fi
3232
mkdir -p ~/.kube/
3333
make -C ./hack/aks azcfg AZCLI=az REGION=${{ parameters.region }}
34-
make -C ./hack/aks ${{ parameters.clusterType }} AZCLI=az REGION=${{ parameters.region }} SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) CLUSTER=${{ parameters.clusterName }} K8S_VER=${{ parameters.k8sVersion }} VM_SIZE=${{ parameters.vmSize }} WINDOWS_OS_SKU=${{ parameters.windowsOsSku }} WINDOWS_VM_SKU=${{ parameters.vmSize }} WINDOWS_USERNAME=${WINDOWS_USERNAME} WINDOWS_PASSWORD=${WINDOWS_PASSWORD}
34+
35+
make -C ./hack/aks ${{ parameters.clusterType }} \
36+
AZCLI=az REGION=${{ parameters.region }} SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) \
37+
CLUSTER=${{ parameters.clusterName }} \
38+
VM_SIZE=${{ parameters.vmSize }} VM_SIZE_WIN=${{ parameters.vmSizeWin }} \
39+
OS_SKU_WIN=${{ parameters.osSkuWin }} OS=${{parameters.os}} \
40+
WINDOWS_USERNAME=${WINDOWS_USERNAME} WINDOWS_PASSWORD=${WINDOWS_PASSWORD}
41+
3542
echo "Cluster successfully created"
3643
displayName: Cluster - ${{ parameters.clusterType }}

hack/aks/Makefile

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ AZIMG = mcr.microsoft.com/azure-cli
88
AZCLI ?= docker run --rm -v $(AZCFG):/root/.azure -v $(KUBECFG):/root/.kube -v $(SSH):/root/.ssh -v $(PWD):/root/tmpsrc $(AZIMG) az
99

1010
# overrideable defaults
11-
REGION ?= westus2
11+
AUTOUPGRADE ?= patch
12+
K8S_VER ?= 1.27 # Designated for Long Term Support, July 2025 | Only Ubuntu 22.04 is supported
13+
NODE_COUNT ?= 2
14+
NODEUPGRADE ?= NodeImage
1215
OS_SKU ?= Ubuntu
13-
WINDOWS_OS_SKU ?= Windows2022
16+
OS_SKU_WIN ?= Windows2022
17+
REGION ?= westus2
1418
VM_SIZE ?= Standard_B2s
15-
NODE_COUNT ?= 2
16-
K8S_VER ?= 1.27 # Designated for Long Term Support, July 2025 | Only Ubuntu 22.04 is supported
17-
WINDOWS_VM_SKU ?= Standard_B2s
19+
VM_SIZE_WIN ?= Standard_B2s
1820

1921
# overrideable variables
2022
SUB ?= $(AZURE_SUBSCRIPTION)
@@ -88,6 +90,9 @@ up: swift-up ## Alias to swift-up
8890

8991
overlay-byocni-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster
9092
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
93+
--auto-upgrade-channel $(AUTOUPGRADE) \
94+
--node-os-upgrade-channel $(NODEUPGRADE) \
95+
--kubernetes-version $(K8S_VER) \
9196
--node-count $(NODE_COUNT) \
9297
--node-vm-size $(VM_SIZE) \
9398
--load-balancer-sku basic \
@@ -101,6 +106,9 @@ overlay-byocni-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster
101106

102107
overlay-cilium-up: rg-up overlay-net-up ## Brings up an Overlay Cilium cluster
103108
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
109+
--auto-upgrade-channel $(AUTOUPGRADE) \
110+
--node-os-upgrade-channel $(NODEUPGRADE) \
111+
--kubernetes-version $(K8S_VER) \
104112
--node-count $(NODE_COUNT) \
105113
--node-vm-size $(VM_SIZE) \
106114
--load-balancer-sku basic \
@@ -115,6 +123,9 @@ overlay-cilium-up: rg-up overlay-net-up ## Brings up an Overlay Cilium cluster
115123

116124
overlay-up: rg-up overlay-net-up ## Brings up an Overlay AzCNI cluster
117125
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
126+
--auto-upgrade-channel $(AUTOUPGRADE) \
127+
--node-os-upgrade-channel $(NODEUPGRADE) \
128+
--kubernetes-version $(K8S_VER) \
118129
--node-count $(NODE_COUNT) \
119130
--node-vm-size $(VM_SIZE) \
120131
--load-balancer-sku basic \
@@ -128,6 +139,9 @@ overlay-up: rg-up overlay-net-up ## Brings up an Overlay AzCNI cluster
128139

129140
swift-byocni-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster
130141
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
142+
--auto-upgrade-channel $(AUTOUPGRADE) \
143+
--node-os-upgrade-channel $(NODEUPGRADE) \
144+
--kubernetes-version $(K8S_VER) \
131145
--node-count $(NODE_COUNT) \
132146
--node-vm-size $(VM_SIZE) \
133147
--load-balancer-sku basic \
@@ -142,6 +156,9 @@ swift-byocni-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster
142156

143157
swift-cilium-up: rg-up swift-net-up ## Bring up a SWIFT Cilium cluster
144158
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
159+
--auto-upgrade-channel $(AUTOUPGRADE) \
160+
--node-os-upgrade-channel $(NODEUPGRADE) \
161+
--kubernetes-version $(K8S_VER) \
145162
--node-count $(NODE_COUNT) \
146163
--node-vm-size $(VM_SIZE) \
147164
--load-balancer-sku basic \
@@ -156,6 +173,9 @@ swift-cilium-up: rg-up swift-net-up ## Bring up a SWIFT Cilium cluster
156173

157174
swift-up: rg-up swift-net-up ## Bring up a SWIFT AzCNI cluster
158175
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
176+
--auto-upgrade-channel $(AUTOUPGRADE) \
177+
--node-os-upgrade-channel $(NODEUPGRADE) \
178+
--kubernetes-version $(K8S_VER) \
159179
--node-count $(NODE_COUNT) \
160180
--node-vm-size $(VM_SIZE) \
161181
--load-balancer-sku basic \
@@ -168,6 +188,9 @@ swift-up: rg-up swift-net-up ## Bring up a SWIFT AzCNI cluster
168188

169189
cilium-overlay-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster without kube-proxy for Cilium
170190
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
191+
--auto-upgrade-channel $(AUTOUPGRADE) \
192+
--node-os-upgrade-channel $(NODEUPGRADE) \
193+
--kubernetes-version $(K8S_VER) \
171194
--node-count $(NODE_COUNT) \
172195
--node-vm-size $(VM_SIZE) \
173196
--load-balancer-sku basic \
@@ -182,6 +205,9 @@ cilium-overlay-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster
182205

183206
cilium-podsubnet-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster without kube-proxy for Cilium
184207
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
208+
--auto-upgrade-channel $(AUTOUPGRADE) \
209+
--node-os-upgrade-channel $(NODEUPGRADE) \
210+
--kubernetes-version $(K8S_VER) \
185211
--node-count $(NODE_COUNT) \
186212
--node-vm-size $(VM_SIZE) \
187213
--load-balancer-sku basic \
@@ -196,6 +222,9 @@ cilium-podsubnet-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster with
196222

197223
windows-cniv1-up: rg-up overlay-net-up ## Bring up a Windows CNIv1 cluster
198224
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
225+
--auto-upgrade-channel $(AUTOUPGRADE) \
226+
--node-os-upgrade-channel $(NODEUPGRADE) \
227+
--kubernetes-version $(K8S_VER) \
199228
--node-count $(NODE_COUNT) \
200229
--node-vm-size $(VM_SIZE) \
201230
--network-plugin azure \
@@ -207,16 +236,19 @@ windows-cniv1-up: rg-up overlay-net-up ## Bring up a Windows CNIv1 cluster
207236

208237
$(AZCLI) aks nodepool add --resource-group $(GROUP) --cluster-name $(CLUSTER) \
209238
--os-type Windows \
210-
--os-sku $(WINDOWS_OS_SKU) \
239+
--os-sku $(OS_SKU_WIN) \
211240
--max-pods 250 \
212241
--name npwin \
213242
--node-count $(NODE_COUNT) \
214-
-s $(WINDOWS_VM_SKU)
243+
-s $(VM_SIZE_WIN)
215244

216245
@$(MAKE) set-kubeconf
217246

218247
linux-cniv1-up: rg-up overlay-net-up
219248
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
249+
--auto-upgrade-channel $(AUTOUPGRADE) \
250+
--node-os-upgrade-channel $(NODEUPGRADE) \
251+
--kubernetes-version $(K8S_VER) \
220252
--node-count $(NODE_COUNT) \
221253
--node-vm-size $(VM_SIZE) \
222254
--max-pods 250 \
@@ -225,7 +257,6 @@ linux-cniv1-up: rg-up overlay-net-up
225257
--os-sku $(OS_SKU) \
226258
--no-ssh-key \
227259
--yes
228-
229260
@$(MAKE) set-kubeconf
230261

231262
down: ## Delete the cluster

test/integration/manifests/cni/cni-installer-v1-windows.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ spec:
6565
- azure-vnet-telemetry.config
6666
- -o
6767
- /k/azurecni/bin/azure-vnet-telemetry.config
68+
env:
69+
- name: PATHEXT
70+
value: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL;;
6871
volumeMounts:
6972
- name: cni-bin
7073
mountPath: /k/azurecni/bin/

0 commit comments

Comments
 (0)