-
Notifications
You must be signed in to change notification settings - Fork 260
dualstack Overlay ACN pipeline #2032
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7ac3b4d
54e90e3
044f9e9
1e75bda
08eb048
4cc4e7c
61ccd32
ed5b10b
df934ec
f5f96bb
280493b
8d3ce61
f76a6ab
d7fb934
da5879a
0ca9a4b
70f355d
5f55aab
e0c112b
7994f7c
ef93c79
8a31eb0
20c0bd0
743b5d0
97a1f1e
2723a46
46c945c
19bca75
93b3e77
bb134ed
e75c993
ab611bb
943926b
3e5eb23
bec1fad
56fc1b4
975a46b
e7a7d7f
bf1be0e
878ed1c
2ec9b19
6e5b695
18bc3a5
d942050
a32e69d
5b8ae6d
892012c
0fb5594
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| parameters: | ||
| 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() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) \ | ||
paulyufan2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| --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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as mentioned above, let's move windows out of this PR
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) \ | ||
|
|
||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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/ciliumpr_pipeline(or something better)/singletenancy/azcnioverlay/v4/.yamlpr_pipeline(or something better)/multitenany/azcnioverlay/dualstack/.yamlThoughts ?