|
| 1 | +parameters: |
| 2 | + clusterName: "" |
| 3 | + os: "" |
| 4 | + dependsOn: "" |
| 5 | + sub: "" |
| 6 | + cni: cni |
| 7 | + |
| 8 | + |
| 9 | +jobs: |
| 10 | + - job: CNI_${{ parameters.os }} |
| 11 | + condition: and( not(canceled()), not(failed()) ) |
| 12 | + displayName: CNI k8s E2E ${{ parameters.os }} |
| 13 | + dependsOn: ${{ parameters.dependsOn }} |
| 14 | + pool: |
| 15 | + isCustom: true |
| 16 | + type: linux |
| 17 | + name: $(BUILD_POOL_NAME_DEFAULT) |
| 18 | + variables: |
| 19 | + ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output |
| 20 | + ob_git_checkout: true |
| 21 | + steps: |
| 22 | + - checkout: ACNReviewChanges |
| 23 | + clean: true |
| 24 | + |
| 25 | + - task: AzureCLI@2 |
| 26 | + inputs: |
| 27 | + azureSubscription: ${{ parameters.sub }} |
| 28 | + scriptLocation: "inlineScript" |
| 29 | + scriptType: "bash" |
| 30 | + workingDirectory: $(ACN_DIR) |
| 31 | + addSpnToEnvironment: true |
| 32 | + inlineScript: | |
| 33 | + set -e |
| 34 | + make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }} |
| 35 | +
|
| 36 | + # sig-release provides test suite tarball(s) per k8s release. Just need to provide k8s version "v1.xx.xx" |
| 37 | + # pulling k8s version from AKS. |
| 38 | + eval k8sVersion="v"$( az aks show -g ${{ parameters.clusterName }} -n ${{ parameters.clusterName }} --query "currentKubernetesVersion") |
| 39 | + echo $k8sVersion |
| 40 | + curl -L https://dl.k8s.io/$k8sVersion/kubernetes-test-linux-amd64.tar.gz -o ./kubernetes-test-linux-amd64.tar.gz |
| 41 | +
|
| 42 | + # https://github.com/kubernetes/sig-release/blob/master/release-engineering/artifacts.md#content-of-kubernetes-test-system-archtargz-on-example-of-kubernetes-test-linux-amd64targz-directories-removed-from-list |
| 43 | + # explictly unzip and strip directories from ginkgo and e2e.test |
| 44 | + tar -xvzf kubernetes-test-linux-amd64.tar.gz --strip-components=3 kubernetes/test/bin/ginkgo kubernetes/test/bin/e2e.test |
| 45 | + displayName: "Setup Environment" |
| 46 | + retryCountOnTaskFailure: 5 |
| 47 | + |
| 48 | + - ${{ if contains(parameters.os, 'windows') }}: |
| 49 | + - script: | |
| 50 | + set -e |
| 51 | + kubectl apply -f test/integration/manifests/load/privileged-daemonset-windows.yaml |
| 52 | + kubectl rollout status -n kube-system ds privileged-daemonset |
| 53 | +
|
| 54 | + kubectl get pod -n kube-system -l app=privileged-daemonset,os=windows -owide |
| 55 | + pods=`kubectl get pod -n kube-system -l app=privileged-daemonset,os=windows --no-headers | awk '{print $1}'` |
| 56 | + for pod in $pods; do |
| 57 | + kubectl exec -i -n kube-system $pod -- powershell "Restart-Service kubeproxy" |
| 58 | + kubectl exec -i -n kube-system $pod -- powershell "Get-Service kubeproxy" |
| 59 | + done |
| 60 | + workingDirectory: $(ACN_DIR) |
| 61 | + name: kubeproxy |
| 62 | + displayName: Restart Kubeproxy on Windows nodes |
| 63 | + retryCountOnTaskFailure: 3 |
| 64 | +
|
| 65 | + - ${{ if eq(parameters.datapath, true) }}: |
| 66 | + - template: k8s-e2e.steps.yaml@ACNTools |
| 67 | + parameters: |
| 68 | + testName: Datapath |
| 69 | + name: datapath |
| 70 | + ginkgoFocus: '(.*).Networking.should|(.*).Networking.Granular|(.*)kubernetes.api' |
| 71 | + ginkgoSkip: 'SCTP|Disruptive|Slow|hostNetwork|kube-proxy|IPv6' |
| 72 | + os: ${{ parameters.os }} |
| 73 | + processes: 8 |
| 74 | + attempts: 10 |
| 75 | + |
| 76 | + - ${{ if eq(parameters.dns, true) }}: |
| 77 | + - template: k8s-e2e.steps.yaml@ACNTools |
| 78 | + parameters: |
| 79 | + testName: DNS |
| 80 | + name: dns |
| 81 | + ginkgoFocus: '\[sig-network\].DNS.should' |
| 82 | + ginkgoSkip: 'resolv|256 search' |
| 83 | + os: ${{ parameters.os }} |
| 84 | + processes: 8 |
| 85 | + attempts: 3 |
| 86 | + |
| 87 | + - ${{ if eq(parameters.portforward, true) }}: |
| 88 | + - template: k8s-e2e.steps.yaml@ACNTools |
| 89 | + parameters: |
| 90 | + testName: Kubectl Portforward |
| 91 | + name: portforward |
| 92 | + ginkgoFocus: '\[sig-cli\].Kubectl.Port' |
| 93 | + ginkgoSkip: '' |
| 94 | + os: ${{ parameters.os }} |
| 95 | + processes: 8 |
| 96 | + attempts: 3 |
| 97 | + |
| 98 | + - ${{ if and( eq(parameters.service, true), contains(parameters.cni, 'cni') ) }}: |
| 99 | + - template: k8s-e2e.steps.yaml@ACNTools |
| 100 | + parameters: |
| 101 | + testName: Service Conformance |
| 102 | + name: service |
| 103 | + ginkgoFocus: 'Services.*\[Conformance\].*' |
| 104 | + ginkgoSkip: '' |
| 105 | + os: ${{ parameters.os }} |
| 106 | + processes: 8 |
| 107 | + attempts: 3 |
| 108 | + |
| 109 | + - ${{ if and( eq(parameters.service, true), contains(parameters.cni, 'cilium') ) }}: |
| 110 | + - template: k8s-e2e.steps.yaml@ACNTools |
| 111 | + parameters: |
| 112 | + testName: Service Conformance|Cilium |
| 113 | + name: service |
| 114 | + ginkgoFocus: 'Services.*\[Conformance\].*' |
| 115 | + ginkgoSkip: 'should serve endpoints on same port and different protocols' # Cilium does not support this feature. For more info on test: https://github.com/kubernetes/kubernetes/blame/e602e9e03cd744c23dde9fee09396812dd7bdd93/test/conformance/testdata/conformance.yaml#L1780-L1788 |
| 116 | + os: ${{ parameters.os }} |
| 117 | + processes: 8 |
| 118 | + attempts: 3 |
| 119 | + |
| 120 | + - ${{ if eq(parameters.hostport, true) }}: |
| 121 | + - template: k8s-e2e.steps.yaml@ACNTools |
| 122 | + parameters: |
| 123 | + testName: Host Port |
| 124 | + name: hostport |
| 125 | + ginkgoFocus: '\[sig-network\](.*)HostPort|\[sig-scheduling\](.*)hostPort' |
| 126 | + ginkgoSkip: 'SCTP|exists conflict' # Skip slow 5 minute test |
| 127 | + os: ${{ parameters.os }} |
| 128 | + processes: 1 # Has a short serial test |
| 129 | + attempts: 3 |
| 130 | + |
| 131 | + - ${{ if and(eq(parameters.hybridWin, true), eq(parameters.os, 'windows')) }}: |
| 132 | + - template: k8s-e2e.steps.yaml@ACNTools |
| 133 | + parameters: |
| 134 | + testName: Hybrid Network |
| 135 | + name: hybrid |
| 136 | + ginkgoFocus: '\[sig-windows\].Hybrid' |
| 137 | + ginkgoSkip: '' |
| 138 | + os: ${{ parameters.os }} |
| 139 | + processes: 8 |
| 140 | + attempts: 3 |
| 141 | + |
| 142 | + - ${{ if and( eq(parameters.dualstack, true), eq(contains(parameters.cni, 'cilium'), false) ) }}: |
| 143 | + - template: k8s-e2e.steps.yaml@ACNTools |
| 144 | + parameters: |
| 145 | + testName: DualStack Test |
| 146 | + name: DualStack |
| 147 | + clusterName: ${{ parameters.clusterName }} |
| 148 | + ginkgoFocus: '\[Feature:IPv6DualStack\]' |
| 149 | + ginkgoSkip: 'SCTP|session affinity' |
| 150 | + os: ${{ parameters.os }} |
| 151 | + processes: 8 |
| 152 | + attempts: 3 |
| 153 | + |
| 154 | + - ${{ if and( eq(parameters.dualstack, true), contains(parameters.cni, 'cilium') ) }}: |
| 155 | + - template: k8s-e2e.steps.yaml@ACNTools |
| 156 | + parameters: |
| 157 | + testName: DualStack Test|Cilium |
| 158 | + name: DualStack |
| 159 | + clusterName: ${{ parameters.clusterName }} |
| 160 | + ginkgoFocus: '\[Feature:IPv6DualStack\]' |
| 161 | + ginkgoSkip: 'SCTP|session affinity|should function for service endpoints using hostNetwork' # Cilium dualstack has a known issue with this test https://github.com/cilium/cilium/issues/25135 |
| 162 | + os: ${{ parameters.os }} |
| 163 | + processes: 8 |
| 164 | + attempts: 3 |
| 165 | + |
0 commit comments