Skip to content

Commit 73f6733

Browse files
authored
ci: add cilium ebpf e2e overlay and podsubnet test (#4073)
* add initial ebpf overlay modifications * hardcode values for testing * add depends to delete * make ebpf use cilium v1.17 * hardcode cluster name for testing * export makefile variables * add container for cilium command * add default os sku without the default value for osSKU, it is set to the empty string which is not "undefined", and so the the makefile's ?= default value is not used either, leading to the os SKU in the makefile being "" * move pod cidr to variable * add ccnp to deploys to block wireserver * amend ccnp to not block imds yet * Revert "hardcode cluster name for testing" This reverts commit 5945c63. * Revert "hardcode values for testing" This reverts commit f3ddf71. * rename targets and files * apply crd before custom resource * test ebpf with test iptables monitor and merger images * begin templating- previous commit passed * remove hubble and nightly copied code * remove unused vars and rename target (noop) * test ebpf podsubnet * reuse existing template the only difference between the two is overlay has check that deletes the cilium test namespace and validates the state-- otherwise the cilium tests template is identical previous commit passed * increase timeout to 20 minutes * swap podsubnet to ubuntu 24 * register ubuntu 2404 preview feature
1 parent 350e2c1 commit 73f6733

20 files changed

+9077
-8
lines changed

.pipelines/pipeline.yaml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,18 @@ stages:
278278
vmSize: Standard_B2ms
279279
k8sVersion: ""
280280
dependsOn: ["test"]
281+
282+
# Cilium EBPF Podsubnet E2E tests
283+
- template: singletenancy/cilium-ebpf/cilium-e2e-job-template.yaml
284+
parameters:
285+
name: "cilium_ebpf_podsubnet_e2e"
286+
displayName: Cilium EBPF Podsubnet Ubuntu 24
287+
clusterType: swift-byocni-nokubeproxy-up
288+
clusterName: "cilbpfpode2e"
289+
vmSize: Standard_B2ms
290+
k8sVersion: ""
291+
dependsOn: ["test"]
281292

282-
283293
# Cilium Nodesubnet E2E tests
284294
- template: singletenancy/cilium-nodesubnet/cilium-nodesubnet-e2e-job-template.yaml
285295
parameters:
@@ -313,8 +323,19 @@ stages:
313323
vmSize: Standard_B2ms
314324
k8sVersion: ""
315325
dependsOn: ["test"]
326+
327+
# Cilium EBPF Overlay E2E tests
328+
- template: singletenancy/cilium-overlay-ebpf/cilium-overlay-e2e-job-template.yaml
329+
parameters:
330+
name: "cilium_ebpf_overlay_e2e"
331+
displayName: Cilium EBPF on AKS Overlay Azure Linux
332+
clusterType: overlay-byocni-nokubeproxy-up
333+
clusterName: "cilbpfovere2e"
334+
vmSize: Standard_B2ms
335+
k8sVersion: ""
336+
dependsOn: ["test"]
316337

317-
# Cilium Overlay with hubble E2E tests
338+
# Cilium Overlay with hubble E2E tests
318339
- template: singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-job-template.yaml
319340
parameters:
320341
name: "cilium_h_overlay_e2e"
@@ -447,8 +468,10 @@ stages:
447468
- aks_swift_e2e
448469
- cilium_e2e
449470
- cilium_vnetscale_e2e
471+
- cilium_ebpf_podsubnet_e2e
450472
- cilium_nodesubnet_e2e
451473
- cilium_overlay_e2e
474+
- cilium_ebpf_overlay_e2e
452475
- cilium_h_overlay_e2e
453476
- aks_ubuntu_22_linux_e2e
454477
- aks_swift_vnetscale_e2e
@@ -473,6 +496,10 @@ stages:
473496
name: cilium_vnetscale_e2e
474497
clusterName: "ciliumvscalee2e"
475498
region: $(REGION_AKS_CLUSTER_TEST)
499+
cilium_ebpf_podsubnet_e2e:
500+
name: cilium_ebpf_podsubnet_e2e
501+
clusterName: "cilbpfpode2e"
502+
region: $(REGION_AKS_CLUSTER_TEST)
476503
cilium_nodesubnet_e2e:
477504
name: cilium_nodesubnet_e2e
478505
clusterName: "cilndsubnete2e"
@@ -481,6 +508,10 @@ stages:
481508
name: cilium_overlay_e2e
482509
clusterName: "cilovere2e"
483510
region: $(REGION_AKS_CLUSTER_TEST)
511+
cilium_ebpf_overlay_e2e:
512+
name: cilium_ebpf_overlay_e2e
513+
clusterName: "cilbpfovere2e"
514+
region: $(REGION_AKS_CLUSTER_TEST)
484515
cilium_h_overlay_e2e:
485516
name: cilium_h_overlay_e2e
486517
clusterName: "cilwhleovere2e"
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
parameters:
2+
name: ""
3+
displayName: ""
4+
clusterType: ""
5+
clusterName: ""
6+
vmSize: ""
7+
k8sVersion: ""
8+
dependsOn: ""
9+
os: "linux"
10+
11+
stages:
12+
- stage: ${{ parameters.clusterName }}
13+
displayName: Create Cluster - ${{ parameters.displayName }}
14+
dependsOn:
15+
- ${{ parameters.dependsOn }}
16+
- setup
17+
pool:
18+
name: $(BUILD_POOL_NAME_DEFAULT)
19+
variables:
20+
commitID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.commitID'] ]
21+
jobs:
22+
- template: ../../templates/create-cluster.yaml
23+
parameters:
24+
name: ${{ parameters.name }}
25+
displayName: ${{ parameters.displayName }}
26+
clusterType: ${{ parameters.clusterType }}
27+
clusterName: ${{ parameters.clusterName }}-$(commitID)
28+
vmSize: ${{ parameters.vmSize }}
29+
k8sVersion: ${{ parameters.k8sVersion }}
30+
dependsOn: ${{ parameters.dependsOn }}
31+
osSKU: "Ubuntu2404"
32+
region: $(REGION_AKS_CLUSTER_TEST)
33+
34+
- stage: ${{ parameters.name }}
35+
displayName: E2E - ${{ parameters.displayName }}
36+
dependsOn:
37+
- setup
38+
- publish
39+
- ${{ parameters.clusterName }}
40+
variables:
41+
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
42+
CURRENT_VERSION: $[ stagedependencies.containerize.check_tag.outputs['CurrentTagManifests.currentTagManifests'] ]
43+
commitID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.commitID'] ]
44+
GOPATH: "$(Agent.TempDirectory)/go" # Go workspace path
45+
GOBIN: "$(GOPATH)/bin" # Go binaries path
46+
modulePath: "$(GOPATH)/src/github.com/Azure/azure-container-networking"
47+
condition: and(succeeded(), eq(variables.TAG, variables.CURRENT_VERSION))
48+
pool:
49+
name: $(BUILD_POOL_NAME_DEFAULT)
50+
jobs:
51+
- job: ${{ parameters.name }}
52+
displayName: Cilium Test Suite - (${{ parameters.name }})
53+
timeoutInMinutes: 120
54+
pool:
55+
name: $(BUILD_POOL_NAME_DEFAULT)
56+
demands:
57+
- agent.os -equals Linux
58+
- Role -equals $(CUSTOM_E2E_ROLE)
59+
steps:
60+
- template: cilium-e2e-step-template.yaml
61+
parameters:
62+
name: ${{ parameters.name }}
63+
clusterName: ${{ parameters.clusterName }}-$(commitID)
64+
scaleup: 50
65+
66+
- template: ../../cni/k8s-e2e/k8s-e2e-job-template.yaml
67+
parameters:
68+
sub: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
69+
clusterName: ${{ parameters.clusterName }}-$(commitID)
70+
os: ${{ parameters.os }}
71+
cni: cilium
72+
dependsOn: ${{ parameters.name }}
73+
datapath: true
74+
dns: true
75+
portforward: true
76+
service: true
77+
78+
- job: failedE2ELogs
79+
displayName: "Failure Logs"
80+
dependsOn:
81+
- ${{ parameters.name }}
82+
- cni_${{ parameters.os }}
83+
condition: failed()
84+
steps:
85+
- template: ../../templates/log-template.yaml
86+
parameters:
87+
clusterName: ${{ parameters.clusterName }}-$(commitID)
88+
os: ${{ parameters.os }}
89+
cni: cilium
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
parameters:
2+
name: ""
3+
clusterName: ""
4+
scaleup: ""
5+
6+
steps:
7+
- template: ../../templates/setup-environment.yaml
8+
9+
- task: AzureCLI@2
10+
inputs:
11+
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
12+
scriptLocation: "inlineScript"
13+
scriptType: "bash"
14+
addSpnToEnvironment: true
15+
inlineScript: |
16+
set -e
17+
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
18+
ls -lah
19+
pwd
20+
kubectl cluster-info
21+
kubectl get pods -Aowide
22+
23+
# see makefile
24+
export AZURE_IPTABLES_MONITOR_IMAGE_REGISTRY=acnpublic.azurecr.io
25+
export AZURE_IPTABLES_MONITOR_TAG=$(make azure-iptables-monitor-version)
26+
make -C ./hack/aks deploy-ebpf-podsubnet-cilium
27+
28+
kubectl get pods -Aowide
29+
name: "installCilium"
30+
displayName: "Install EBPF Podsubnet Cilium"
31+
32+
- template: ../../templates/cilium-cli.yaml
33+
34+
- script: |
35+
echo "Start Azilium E2E Tests"
36+
kubectl get po -owide -A
37+
sudo -E env "PATH=$PATH" make test-load SCALE_UP=32 OS_TYPE=linux VALIDATE_STATEFILE=true INSTALL_CNS=true INSTALL_AZILIUM=true AZURE_IPAM_VERSION=$(make azure-ipam-version) CNS_VERSION=$(make cns-version) CLEANUP=true
38+
retryCountOnTaskFailure: 3
39+
name: "aziliumTest"
40+
displayName: "Run Azilium E2E"
41+
42+
- template: ../../templates/cilium-tests.yaml
43+
parameters:
44+
clusterName: ${{ parameters.clusterName }}
45+
scaleup: ${{ parameters.scaleup }}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
parameters:
2+
name: ""
3+
displayName: ""
4+
clusterType: ""
5+
clusterName: ""
6+
vmSize: ""
7+
k8sVersion: ""
8+
dependsOn: ""
9+
os: "linux"
10+
11+
stages:
12+
- stage: ${{ parameters.clusterName }}
13+
displayName: Create Cluster - ${{ parameters.displayName }}
14+
dependsOn:
15+
- ${{ parameters.dependsOn }}
16+
- setup
17+
pool:
18+
name: $(BUILD_POOL_NAME_DEFAULT)
19+
variables:
20+
commitID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.commitID'] ]
21+
jobs:
22+
- template: ../../templates/create-cluster.yaml
23+
parameters:
24+
name: ${{ parameters.name }}
25+
displayName: ${{ parameters.displayName }}
26+
clusterType: ${{ parameters.clusterType }}
27+
clusterName: ${{ parameters.clusterName }}-$(commitID)
28+
vmSize: ${{ parameters.vmSize }}
29+
k8sVersion: ${{ parameters.k8sVersion }}
30+
dependsOn: ${{ parameters.dependsOn }}
31+
osSKU: "AzureLinux"
32+
region: $(REGION_AKS_CLUSTER_TEST)
33+
34+
- stage: ${{ parameters.name }}
35+
displayName: E2E - ${{ parameters.displayName }}
36+
dependsOn:
37+
- setup
38+
- publish
39+
- ${{ parameters.clusterName }}
40+
variables:
41+
commitID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.commitID'] ]
42+
GOPATH: "$(Agent.TempDirectory)/go" # Go workspace path
43+
GOBIN: "$(GOPATH)/bin" # Go binaries path
44+
modulePath: "$(GOPATH)/src/github.com/Azure/azure-container-networking"
45+
pool:
46+
name: $(BUILD_POOL_NAME_DEFAULT)
47+
jobs:
48+
- job: ${{ parameters.name }}
49+
displayName: Cilium EBPF Overlay Test Suite - (${{ parameters.name }})
50+
timeoutInMinutes: 120
51+
pool:
52+
name: $(BUILD_POOL_NAME_DEFAULT)
53+
demands:
54+
- agent.os -equals Linux
55+
- Role -equals $(CUSTOM_E2E_ROLE)
56+
steps:
57+
- template: cilium-overlay-e2e-step-template.yaml
58+
parameters:
59+
name: ${{ parameters.name }}
60+
clusterName: ${{ parameters.clusterName }}-$(commitID)
61+
scaleup: 50
62+
63+
- template: ../../cni/k8s-e2e/k8s-e2e-job-template.yaml
64+
parameters:
65+
sub: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
66+
clusterName: ${{ parameters.clusterName }}-$(commitID)
67+
os: ${{ parameters.os }}
68+
cni: cilium
69+
dependsOn: ${{ parameters.name }}
70+
datapath: true
71+
dns: true
72+
portforward: true
73+
service: true
74+
75+
- job: failedE2ELogs
76+
displayName: "Failure Logs"
77+
dependsOn:
78+
- ${{ parameters.name }}
79+
- cni_${{ parameters.os }}
80+
condition: failed()
81+
steps:
82+
- template: ../../templates/log-template.yaml
83+
parameters:
84+
clusterName: ${{ parameters.clusterName }}-$(commitID)
85+
os: ${{ parameters.os }}
86+
cni: cilium
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
parameters:
2+
name: ""
3+
clusterName: ""
4+
scaleup: ""
5+
6+
7+
steps:
8+
- template: ../../templates/setup-environment.yaml
9+
10+
- task: AzureCLI@2
11+
inputs:
12+
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
13+
scriptLocation: "inlineScript"
14+
scriptType: "bash"
15+
addSpnToEnvironment: true
16+
inlineScript: |
17+
set -e
18+
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
19+
ls -lah
20+
pwd
21+
kubectl cluster-info
22+
kubectl get pods -Aowide
23+
24+
# see makefile
25+
export AZURE_IPTABLES_MONITOR_IMAGE_REGISTRY=acnpublic.azurecr.io
26+
export AZURE_IPTABLES_MONITOR_TAG=$(make azure-iptables-monitor-version)
27+
export AZURE_IP_MASQ_MERGER_IMAGE_REGISTRY=acnpublic.azurecr.io
28+
export AZURE_IP_MASQ_MERGER_TAG=$(make azure-ip-masq-merger-version)
29+
make -C ./hack/aks deploy-ebpf-overlay-cilium
30+
31+
kubectl get pods -Aowide
32+
name: "installCilium"
33+
displayName: "Install Cilium EBPF on AKS Overlay"
34+
35+
- template: ../../templates/cilium-cli.yaml
36+
37+
- script: |
38+
CNS=$(make cns-version) IPAM=$(make azure-ipam-version)
39+
kubectl get pods -Aowide
40+
sudo -E env "PATH=$PATH" make test-load SCALE_UP=32 OS_TYPE=linux VALIDATE_STATEFILE=true INSTALL_CNS=true INSTALL_OVERLAY=true AZURE_IPAM_VERSION=${IPAM} CNS_VERSION=${CNS} CLEANUP=true
41+
retryCountOnTaskFailure: 3
42+
name: "aziliumTest"
43+
displayName: "Deploy CNS and Run Azilium E2E on AKS Overlay"
44+
45+
- template: ../../templates/cilium-tests.yaml
46+
parameters:
47+
clusterName: ${{ parameters.clusterName }}
48+
scaleup: ${{ parameters.scaleup }}

.pipelines/templates/create-cluster.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ parameters:
77
vmSizeWin: ""
88
k8sVersion: ""
99
osSkuWin: "Windows2022" # Currently we only support Windows2022
10+
osSKU: "Ubuntu"
1011
dependsOn: ""
1112
region: ""
1213
os: linux
@@ -44,7 +45,7 @@ jobs:
4445
AZCLI=az REGION=${{ parameters.region }} SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) \
4546
CLUSTER=${{ parameters.clusterName }} \
4647
VM_SIZE=${{ parameters.vmSize }} VM_SIZE_WIN=${{ parameters.vmSizeWin }} \
47-
OS_SKU_WIN=${{ parameters.osSkuWin }} OS=${{ parameters.os }}
48+
OS_SKU_WIN=${{ parameters.osSkuWin }} OS=${{ parameters.os }} OS_SKU=${{ parameters.osSKU }}
4849
4950
echo "Cluster successfully created"
5051
displayName: Cluster - ${{ parameters.clusterType }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
steps:
2+
- bash: |
3+
echo $UID
4+
sudo rm -rf $(System.DefaultWorkingDirectory)/*
5+
displayName: "Set up OS environment"
6+
7+
- checkout: self
8+
9+
- bash: |
10+
go version
11+
go env
12+
mkdir -p '$(GOBIN)'
13+
mkdir -p '$(GOPATH)/pkg'
14+
mkdir -p '$(modulePath)'
15+
echo '##vso[task.prependpath]$(GOBIN)'
16+
echo '##vso[task.prependpath]$(GOROOT)/bin'
17+
name: "GoEnv"
18+
displayName: "Set up the Go environment"
19+
20+
- task: KubectlInstaller@0
21+
inputs:
22+
kubectlVersion: latest

0 commit comments

Comments
 (0)