Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
7ac3b4d
add Linux test cases for connectivity
paulyufan2 Jun 22, 2023
54e90e3
datapath linux acn pipeline
paulyufan2 Jun 24, 2023
044f9e9
acn datapath linux
paulyufan2 Jun 24, 2023
1e75bda
add linux acn control plane test cases
paulyufan2 Jun 24, 2023
08eb048
add validateDualStack test case
paulyufan2 Jun 24, 2023
4cc4e7c
fix issues
paulyufan2 Jun 24, 2023
61ccd32
fix linter issues
paulyufan2 Jun 24, 2023
ed5b10b
fix linter issues
paulyufan2 Jun 24, 2023
df934ec
fix minor issues
paulyufan2 Jun 25, 2023
f5f96bb
change file name
paulyufan2 Jun 27, 2023
280493b
fix conflicts
paulyufan2 Jun 28, 2023
8d3ce61
fix conflicts
paulyufan2 Jun 28, 2023
f76a6ab
fix conflicts
paulyufan2 Jun 28, 2023
d7fb934
Merge branch 'master' into datapath_Linux_acn
paulyufan2 Jun 28, 2023
da5879a
integrate #1980 to one PR
paulyufan2 Jun 29, 2023
0ca9a4b
fix conflicts
paulyufan2 Jun 29, 2023
70f355d
add windows properties check
paulyufan2 Jun 30, 2023
5f55aab
add windows dualstack hns test cases
paulyufan2 Jun 30, 2023
e0c112b
dualstack overlay ipv6 windows connectivity tests
paulyufan2 Jul 5, 2023
7994f7c
fix a minor issue
paulyufan2 Jul 5, 2023
ef93c79
add dualstack test cases to pipeline
paulyufan2 Jul 5, 2023
8a31eb0
remove an echo
paulyufan2 Jul 5, 2023
20c0bd0
correct aks path
paulyufan2 Jul 5, 2023
743b5d0
fix minor issues
paulyufan2 Jul 6, 2023
97a1f1e
remove yes
paulyufan2 Jul 6, 2023
2723a46
add AzureCLI for windows nodepool
paulyufan2 Jul 6, 2023
46c945c
remove ssh key check
paulyufan2 Jul 6, 2023
19bca75
change the Linux test cases sequence
paulyufan2 Jul 6, 2023
93b3e77
add byo-cni
paulyufan2 Jul 7, 2023
bb134ed
remove ns-load ns
paulyufan2 Jul 7, 2023
e75c993
remove ns-load ns
paulyufan2 Jul 7, 2023
ab611bb
Merge branch 'master' into datapath_Linux_acn
paulyufan2 Jul 7, 2023
943926b
fix deployment files
paulyufan2 Jul 7, 2023
3e5eb23
windows ipv6 invoke-webrequest test case
paulyufan2 Jul 10, 2023
bec1fad
fix issues
paulyufan2 Jul 11, 2023
56fc1b4
Merge branch 'master' into datapath_Linux_acn
paulyufan2 Jul 17, 2023
975a46b
fix ipv6 command
paulyufan2 Jul 17, 2023
e7a7d7f
fix windows ipv6 command
paulyufan2 Jul 17, 2023
bf1be0e
test v6 curl
paulyufan2 Jul 17, 2023
878ed1c
install linux cns and cni
paulyufan2 Jul 17, 2023
2ec9b19
add aks-custom-headers
paulyufan2 Jul 18, 2023
6e5b695
add aks-custom-headers
paulyufan2 Jul 18, 2023
18bc3a5
add install azure-vnet
paulyufan2 Jul 18, 2023
d942050
install kube
paulyufan2 Jul 19, 2023
a32e69d
disable cleaning up dualstack overlay cluster
paulyufan2 Jul 19, 2023
5b8ae6d
fix dualstack overlay linux dropgz conflist file
paulyufan2 Jul 20, 2023
892012c
fix dropgz image
paulyufan2 Jul 20, 2023
0fb5594
add sudo to run test cases
paulyufan2 Jul 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .pipelines/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,14 @@ stages:
testDropgz: ""
clusterName: "overlaye2e"

- template: singletenancy/dualstack-overlay/dualstackoverlay-e2e-job-template.yaml
parameters:
name: "dualstackoverlay_e2e"
displayName: AKS DualStack Overlay
pipelineBuildImage: "$(BUILD_IMAGE)"
testDropgz: ""
clusterName: "dualstackoverlaye2e"

- template: singletenancy/aks-swift/e2e-job-template.yaml
parameters:
name: "aks_swift_e2e"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
parameters:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, existing
.pipeline/singletenancy/overlay/* should be moved to cilium folder. Cilium folder can have overlay folder if needed. @tamilmani1989 @vipul-21
We should create
.pipeline/singletenancy/azcnioverlay/v4/.yaml
.pipeline/singletenancy/azcnioverlay/dualstack/
.yaml

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea was to keep the singletenancy folder as it is. Maybe add a parent to it which tells us that this is PR pipeline code and under that we can have different folder structure like:
pr_pipeline(or something better)/singletenancy/azcnioverlay/cilium
pr_pipeline(or something better)/singletenancy/azcnioverlay/v4/.yaml
pr_pipeline(or something better)/multitenany/azcnioverlay/dualstack/.yaml

Thoughts ?

name: ""
displayName: ""
pipelineBuildImage: "$(BUILD_IMAGE)"
testDropgz: ""
clusterName: ""

stages:
- stage: ${{ parameters.name }}
displayName: E2E - ${{ parameters.displayName }}
dependsOn:
- setup
- publish
jobs:
- job: ${{ parameters.name }}
displayName: DualStack Overlay Test Suite - (${{ parameters.name }})
timeoutInMinutes: 120
pool:
name: $(BUILD_POOL_NAME_DEFAULT)
demands:
- Role -equals $(CUSTOM_E2E_ROLE)
variables:
GOPATH: "$(Agent.TempDirectory)/go" # Go workspace path
GOBIN: "$(GOPATH)/bin" # Go binaries path
modulePath: "$(GOPATH)/src/github.com/Azure/azure-container-networking"
steps:
- template: dualstackoverlay-e2e-step-template.yaml
parameters:
name: ${{ parameters.name }}
testDropgz: ${{ parameters.testDropgz }}
clusterName: ${{ parameters.clusterName }}

Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
parameters:
name: ""
testDropgz: ""
clusterName: ""

steps:
- bash: |
echo $UID
sudo rm -rf $(System.DefaultWorkingDirectory)/*
displayName: "Set up OS environment"
- checkout: self

- bash: |
go version
go env
mkdir -p '$(GOBIN)'
mkdir -p '$(GOPATH)/pkg'
mkdir -p '$(modulePath)'
echo '##vso[task.prependpath]$(GOBIN)'
echo '##vso[task.prependpath]$(GOROOT)/bin'
name: "GoEnv"
displayName: "Set up the Go environment"
- task: AzureCLI@2
inputs:
azureSubscription: $(AZURE_TEST_AGENT_SERVICE_CONNECTION)
scriptLocation: "inlineScript"
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
echo "Check az version"
az version
echo "Install az cli extension preview"
az extension add --name aks-preview
az extension update --name aks-preview
mkdir -p ~/.kube/
echo "Create AKS DualStack Overlay cluster"
make -C ./hack/aks azcfg AZCLI=az REGION=$(REGION_OVERLAY_CLUSTER_TEST)
make -C ./hack/aks dualstack-overlay-byocni-up AZCLI=az REGION=$(REGION_OVERLAY_CLUSTER_TEST) VM_SIZE=$(VM_SIZE) NODE_COUNT=$(NODE_COUNT) SUB=$(SUB_AZURE_NETWORK_AGENT_TEST) CLUSTER=${{ parameters.clusterName }}-$(make revision)
echo "Dualstack Overlay Cluster is successfully created"
displayName: Create DualStackOverlay cluster
condition: succeeded()

- script: |
ls -lah
pwd
echo "installing kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl cluster-info
kubectl get node
kubectl get po -owide -A
sudo -E env "PATH=$PATH" make install-azure-images CNS_VERSION=$(make cns-version) CNI_DROPGZ_VERSION=$(make cni-dropgz-version) INSTALL_CNS=true INSTALL_AZURE_VNET=true INSTALL_DUALSTACK_OVERLAY=true TEST_DROPGZ=${{ parameters.testDropgz }}
kubectl get po -owide -A
retryCountOnTaskFailure: 3
name: "installKubectl"
displayName: "Install kubectl on AKS dualstack overlay cluster"

- script: |
cd test/integration/load
sudo go test -timeout 30m -tags load -run ^TestLoad$ -tags=load
echo "DualStack Overlay Linux control plane CNS validation test"
sudo go test -timeout 30m -tags load -cni cniv2 -run ^TestValidateState$ -tags=load
echo "DualStack Overlay Linux control plane Node properties test"
sudo go test -timeout 30m -tags load -run ^TestDualStackProperties$ -tags=load
echo "DualStack Overlay Linux datapath test"
cd ../datapath
sudo go test -count=1 datapath_linux_test.go -timeout 1m -tags connection -run ^TestDatapathLinux$ -tags=connection,integration
echo "Delete Linux load-test namespace"
kubectl delete ns load-test
name: "DualStack_Overlay_Linux_tests"
displayName: "DualStack Overlay Linux Tests"

# - task: AzureCLI@2
# inputs:
# azureSubscription: $(AZURE_TEST_AGENT_SERVICE_CONNECTION)
# scriptLocation: "inlineScript"
# scriptType: "bash"
# addSpnToEnvironment: true
# inlineScript: |
# make -C ./hack/aks dualstack-windows-byocni-up AZCLI=az VM_SIZE=$(VM_SIZE) NODE_COUNT=$(NODE_COUNT) SUB=$(SUB_AZURE_NETWORK_AGENT_TEST) CLUSTER=${{ parameters.clusterName }}-$(make revision)
# echo "Windows node are successfully added to Dualstack Overlay Cluster"
# kubectl cluster-info
# kubectl get node
# kubectl get po -owide -A
# name: "Add_Windows_Node"
# displayName: "Add windows node on DualStackOverlay cluster"

# - script: |
# pwd
# cd test/integration/load
# go test -timeout 30m -tags load -run ^TestLoad$ -tags=load -os=windows
# echo "DualStack Overlay Windows control plane CNS validation test"
# go test -timeout 30m -tags load -run ^TestDualStackProperties$ -tags=load -os=windows -cni cniv2
# echo "DualStack Overlay Windows control plane Node properties test"
# go test -timeout 30m -tags load -cni cniv2 -run ^TestValidateState$ -tags=load -os=windows
# echo "DualStack Overlay Windows datapath test"
# cd ../datapath
# go test -count=1 datapath_windows_test.go -timeout 3m -tags connection -run ^TestDatapathWin$ -tags=connection
# name: "DualStack_Overlay_Windows_tests"
# displayName: "DualStack Overlay Windows Tests"

# - task: AzureCLI@2
# inputs:
# azureSubscription: $(AZURE_TEST_AGENT_SERVICE_CONNECTION)
# scriptLocation: "inlineScript"
# scriptType: "bash"
# addSpnToEnvironment: true
# inlineScript: |
# echo "Deleting cluster"
# make -C ./hack/aks azcfg AZCLI=az
# make -C ./hack/aks down SUB=$(SUB_AZURE_NETWORK_AGENT_TEST) AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(make revision)
# echo "Cluster and resources down"
# name: "CleanupDualStackOverlaycluster"
# displayName: "Cleanup DualStack Overlay Cluster"
# condition: always()
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,11 @@ test-azure-ipam: ## run the unit test for azure-ipam
kind:
kind create cluster --config ./test/kind/kind.yaml

# install azure Linux CNS and CNI dropgz images
install-azure-images:
Copy link
Collaborator

@rbtr rbtr Jul 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we're going to create standalone tooling for installing our components, let's fully commit to it and write some small kustomize payloads for them instead of hacking it with the integration test like this.

CNI_DROPGZ_VERSION=$(CNI_DROPGZ_VERSION) \
CNS_VERSION=$(CNS_VERSION) \
go test -mod=readonly -buildvcs=false -timeout 1h -coverpkg=./... -race -covermode atomic -coverprofile=coverage.out -tags=integration ./test/integration/setup_test.go

##@ Utilities

Expand Down
48 changes: 48 additions & 0 deletions hack/aks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,54 @@ windows-cniv1-up: rg-up overlay-net-up ## Bring up a Windows CNIv1 cluster

@$(MAKE) set-kubeconf

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) \
--kubernetes-version 1.26.3 \
--node-count $(NODE_COUNT) \
--node-vm-size $(VM_SIZE) \
--network-plugin azure \
--ip-families ipv4,ipv6 \
--network-plugin-mode overlay \
--subscription $(SUB) \
--no-ssh-key \
--yes
@$(MAKE) set-kubeconf

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) \
--kubernetes-version 1.26.3 \
--node-count $(NODE_COUNT) \
--node-vm-size $(VM_SIZE) \
--network-plugin none \
--network-plugin-mode overlay \
--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureOverlayDualStackPreview \
--ip-families ipv4,ipv6 \
--subscription $(SUB) \
--no-ssh-key \
--yes
@$(MAKE) set-kubeconf

dualstack-windows-up: ## Brings up windows nodes on dualstack overlay cluster
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as mentioned above, let's move windows out of this PR

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these make targets are misleading, they do not bring up a cluster, or (as far as I can tell) do anything dualstack-specific. it adds a windows nodepool. it should just be called add windows nodepool.

$(AZCLI) aks nodepool add -g $(GROUP) -n npwin \
--cluster-name $(CLUSTER) \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: indentation is not aligned with the other attributes.

--node-count $(NODE_COUNT) \
--node-vm-size $(VM_SIZE) \
--os-type Windows \
--os-sku Windows2022 \
--subscription $(SUB)
@$(MAKE) set-kubeconf

dualstack-windows-byocni-up: ## Brings up windows nodes on dualstack overlay cluster without CNS and CNI installed
$(AZCLI) aks nodepool add -g $(GROUP) -n npwin \
--cluster-name $(CLUSTER) \
--node-count $(NODE_COUNT) \
--node-vm-size $(VM_SIZE) \
--network-plugin none \
--os-type Windows \
--os-sku Windows2022 \
--subscription $(SUB)
@$(MAKE) set-kubeconf

linux-cniv1-up: rg-up overlay-net-up
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
--node-count $(NODE_COUNT) \
Expand Down
24 changes: 14 additions & 10 deletions hack/aks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ SWIFT Infra
net-up Create required swift vnet/subnets

AKS Clusters
byocni-up Alias to swift-byocni-up
cilium-up Alias to swift-cilium-up
up Alias to swift-up
overlay-up Brings up an Overlay AzCNI cluster
swift-byocni-up Bring up a SWIFT BYO CNI cluster
swift-cilium-up Bring up a SWIFT Cilium cluster
swift-up Bring up a SWIFT AzCNI cluster
windows-cniv1-up Bring up a Windows AzCNIv1 cluster
down Delete the cluster
vmss-restart Restart the nodes of the cluster
byocni-up Alias to swift-byocni-up
cilium-up Alias to swift-cilium-up
up Alias to swift-up
overlay-up Brings up an Overlay AzCNI cluster
swift-byocni-up Bring up a SWIFT BYO CNI cluster
swift-cilium-up Bring up a SWIFT Cilium cluster
swift-up Bring up a SWIFT AzCNI cluster
windows-cniv1-up Bring up a Windows AzCNIv1 cluster
dualstack-overlay-up Brings up an dualstack overlay cluster
dualstack-overlay-byocni-up Brings up an dualstack overlay cluster without CNS and CNI installed
dualstack-windows-up Brings up windows nodes on dualstack overlay cluster
dualstack-windows--byocni-up Brings up windows nodes on dualstack overlay cluster without CNS and CNI installed
down Delete the cluster
vmss-restart Restart the nodes of the cluster
```
Loading