diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 6f06ae8dad..cce680f5e9 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -36,7 +36,7 @@ stages: - template: windows-image.yaml - stage: build_and_test - displayName: ACN + displayName: Build ACN and Test dependsOn: - "setup" jobs: @@ -250,6 +250,16 @@ stages: clusterDefinitionCniBuildOS: "linux" clusterDefinitionCniBuildExt: ".tgz" + - template: singletenancy/aks-engine/e2e-dualstack-job-template.yaml + parameters: + name: "windows_20_04_dualstack_e2e" + displayName: "Windows 20.04 Dualstack" + pipelineBuildImage: "$(BUILD_IMAGE)" + clusterDefinition: "cniWindowsDualstack2004.json" + clusterDefinitionCniTypeKey: "azureCNIURLWindows" + clusterDefinitionCniBuildOS: "windows" + clusterDefinitionCniBuildExt: ".zip" + - stage: cleanup displayName: Cleanup dependsOn: @@ -258,6 +268,7 @@ stages: - "windows_19_03_e2e" - "windows_20_04_e2e" - "ubuntu_18_04_linux_dualstack_e2e" + - "windows_20_04_dualstack_e2e" jobs: - job: delete_remote_artifacts displayName: Delete remote artifacts diff --git a/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml b/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml index 325e6a66ce..919526bde0 100644 --- a/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml +++ b/.pipelines/singletenancy/aks-engine/e2e-dualstack-job-template.yaml @@ -85,7 +85,7 @@ stages: scriptLocation: "inlineScript" addSpnToEnvironment: true inlineScript: | - RG=kubernetes-$(echo "dualstack-e2e-`date "+%Y-%m-%d-%S"`") + RG=kubedual-$(echo "e2e-${{ parameters.clusterDefinitionCniBuildOS }}-`date "+%Y-%m-%d-%S"`") echo "##vso[task.setvariable variable=RESOURCE_GROUP;isOutput=true;]$RG" region=$(echo $(AKS_ENGINE_REGION)|cut -d',' -f1) echo "running: ./dualstack-ws/aks-engine deploy -m $(Pipeline.Workspace)/clusterDefinition.json --location $region -g $RG --subscription-id $(AKS_ENGINE_SUBSCRIPTION_ID) --client-id $servicePrincipalId --client-secret $servicePrincipalKey --output-directory ./dualstack-ws/kubeoutput" @@ -94,7 +94,7 @@ stages: name: DeployAKSEngine displayName: "Deploy aks-engine cluster" - publish: ./dualstack-ws/kubeoutput - artifact: kubeoutput + artifact: kubeoutput-${{ parameters.clusterDefinitionCniBuildOS }} - job: Build_kubernetes displayName: Build kubernetes upstream @@ -112,7 +112,7 @@ stages: make WHAT=test/e2e/e2e.test displayName: 'Build Kubernetes e2e.test' - publish: $(System.DefaultWorkingDirectory)/kubernetes/_output/local/bin/linux/amd64 - artifact: Test + artifact: Test-${{ parameters.clusterDefinitionCniBuildOS }} - job: Run_test displayName: Run upstream e2e test @@ -128,13 +128,20 @@ stages: steps: - checkout: none - download: current - artifact: Test + artifact: Test-${{ parameters.clusterDefinitionCniBuildOS }} - download: current - artifact: kubeoutput + artifact: kubeoutput-${{ parameters.clusterDefinitionCniBuildOS }} - bash: | echo "rgname is:$(RESOURCE_GROUP)" - chmod +x $(Pipeline.Workspace)/Test/e2e.test - $(Pipeline.Workspace)/Test/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="SCTP" --kubeconfig=$(Pipeline.Workspace)/kubeoutput/kubeconfig/kubeconfig.json + chmod +x $(Pipeline.Workspace)/Test-${{ parameters.clusterDefinitionCniBuildOS }}/e2e.test + echo "os: ${{ parameters.clusterDefinitionCniBuildOS }}" + if [ "${{ parameters.clusterDefinitionCniBuildOS }}" == "windows" ]; then + echo "Skip LinuxOnly Tests" + $(Pipeline.Workspace)/Test-${{ parameters.clusterDefinitionCniBuildOS }}/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="LinuxOnly" --kubeconfig=$(Pipeline.Workspace)/kubeoutput-${{ parameters.clusterDefinitionCniBuildOS }}/kubeconfig/kubeconfig.json + else + echo "Skip SCTP Tests" + $(Pipeline.Workspace)/Test-${{ parameters.clusterDefinitionCniBuildOS }}/e2e.test --provider=local --ginkgo.focus="Feature:IPv6DualStack" --ginkgo.skip="SCTP" --kubeconfig=$(Pipeline.Workspace)/kubeoutput-${{ parameters.clusterDefinitionCniBuildOS }}/kubeconfig/kubeconfig.json + fi displayName: "Run Test Suite" - task: AzureCLI@2 displayName: "Delete Test Cluster Resource Group" diff --git a/test/apimodels/cniWindowsDualstack2004.json b/test/apimodels/cniWindowsDualstack2004.json new file mode 100644 index 0000000000..0a4648a72f --- /dev/null +++ b/test/apimodels/cniWindowsDualstack2004.json @@ -0,0 +1,68 @@ +{ + "apiVersion": "vlabs", + "properties": { + "featureFlags": { + "enableIPv6DualStack": true + }, + "orchestratorProfile": { + "orchestratorType": "Kubernetes", + "orchestratorRelease": "1.21", + "kubernetesConfig": { + "loadBalancerSku": "Standard", + "excludeMasterFromStandardLB": true, + "clusterSubnet": "10.240.0.0/12,fc00::/48", + "serviceCidr": "10.0.0.0/16,fd00::/108", + "dnsServiceIP": "10.0.0.10", + "networkPlugin": "azure", + "apiServerConfig": { + "--feature-gates": "IPv6DualStack=true", + "--tls-min-version": "VersionTLS12", + "--tls-cipher-suites": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + + }, + "kubeletConfig": { + "--feature-gates": "IPv6DualStack=true" + }, + "controllerManagerConfig": { + "--feature-gates": "IPv6DualStack=true" + } + } + }, + "masterProfile": { + "count": 1, + "dnsPrefix": "windual", + "vmSize": "Standard_D2_v2" + }, + "agentPoolProfiles": [ + { + "name": "cnidualwin", + "count": 3, + "vmSize": "Standard_D2_v2", + "availabilityProfile": "AvailabilitySet", + "osType": "Windows" + } + ], + "linuxProfile": { + "adminUsername": "azureuser", + "ssh": { + "publicKeys": [ + { + "keyData":"" + } + ] + } + }, + "windowsProfile": { + "adminUsername": "azureuser", + "adminPassword": "azureTest@!", + "windowsPublisher": "MicrosoftWindowsServer", + "windowsOffer": "WindowsServer", + "windowsSku": "Datacenter-Core-2004-with-Containers-smalldisk", + "imageVersion": "latest" + }, + "servicePrincipalProfile": { + "clientId":"", + "secret":"" + } + } +}