-
Notifications
You must be signed in to change notification settings - Fork 242
/
Copy pathk8s-e2e-job-template.yaml
143 lines (137 loc) · 6.45 KB
/
k8s-e2e-job-template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
parameters:
clusterName: ""
os: ""
dependsOn: ""
sub: ""
cni: cni
jobs:
- job: CNI_${{ parameters.os }}
displayName: CNI k8s E2E ${{ parameters.os }}
dependsOn: ${{ parameters.dependsOn }}
pool:
name: $(BUILD_POOL_NAME_DEFAULT)
steps:
- task: AzureCLI@1
inputs:
azureSubscription: ${{ parameters.sub }}
scriptLocation: "inlineScript"
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
set -e
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
# sig-release provides test suite tarball(s) per k8s release. Just need to provide k8s version "v1.xx.xx"
# pulling k8s version from AKS.
eval k8sVersion="v"$( az aks show -g ${{ parameters.clusterName }} -n ${{ parameters.clusterName }} --query "currentKubernetesVersion")
echo $k8sVersion
curl -L https://dl.k8s.io/$k8sVersion/kubernetes-test-linux-amd64.tar.gz -o ./kubernetes-test-linux-amd64.tar.gz
# 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
# explictly unzip and strip directories from ginkgo and e2e.test
tar -xvzf kubernetes-test-linux-amd64.tar.gz --strip-components=3 kubernetes/test/bin/ginkgo kubernetes/test/bin/e2e.test
displayName: "Setup Environment"
- ${{ if contains(parameters.os, 'windows') }}:
- script: |
set -e
kubectl apply -f test/integration/manifests/load/privileged-daemonset-windows.yaml
kubectl rollout status -n kube-system ds privileged-daemonset
kubectl get pod -n kube-system -l app=privileged-daemonset,os=windows -owide
pods=`kubectl get pod -n kube-system -l app=privileged-daemonset,os=windows --no-headers | awk '{print $1}'`
for pod in $pods; do
kubectl exec -i -n kube-system $pod -- powershell "Restart-Service kubeproxy"
kubectl exec -i -n kube-system $pod -- powershell "Get-Service kubeproxy"
done
name: kubeproxy
displayName: Restart Kubeproxy on Windows nodes
retryCountOnTaskFailure: 3
- ${{ if eq(parameters.datapath, true) }}:
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: Datapath
name: datapath
ginkgoFocus: '(.*).Networking.should|(.*).Networking.Granular|(.*)kubernetes.api'
ginkgoSkip: 'SCTP|Disruptive|Slow|hostNetwork|kube-proxy|IPv6'
os: ${{ parameters.os }}
processes: 8
attempts: 10
- ${{ if eq(parameters.dns, true) }}:
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: DNS
name: dns
ginkgoFocus: '\[sig-network\].DNS.should'
ginkgoSkip: 'resolv|256 search'
os: ${{ parameters.os }}
processes: 8
attempts: 3
- ${{ if eq(parameters.portforward, true) }}:
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: Kubectl Portforward
name: portforward
ginkgoFocus: '\[sig-cli\].Kubectl.Port'
ginkgoSkip: ''
os: ${{ parameters.os }}
processes: 8
attempts: 3
- ${{ if and( eq(parameters.service, true), contains(parameters.cni, 'cni') ) }}:
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: Service Conformance
name: service
ginkgoFocus: 'Services.*\[Conformance\].*'
ginkgoSkip: ''
os: ${{ parameters.os }}
processes: 8
attempts: 3
- ${{ if and( eq(parameters.service, true), contains(parameters.cni, 'cilium') ) }}:
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: Service Conformance|Cilium
name: service
ginkgoFocus: 'Services.*\[Conformance\].*'
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
os: ${{ parameters.os }}
processes: 8
attempts: 3
- ${{ if eq(parameters.hostport, true) }}:
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: Host Port
name: hostport
ginkgoFocus: '\[sig-network\](.*)HostPort|\[sig-scheduling\](.*)hostPort'
ginkgoSkip: 'SCTP|exists conflict' # Skip slow 5 minute test
os: ${{ parameters.os }}
processes: 1 # Has a short serial test
attempts: 3
- ${{ if and(eq(parameters.hybridWin, true), eq(parameters.os, 'windows')) }}:
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: Hybrid Network
name: hybrid
ginkgoFocus: '\[sig-windows\].Hybrid'
ginkgoSkip: ''
os: ${{ parameters.os }}
processes: 8
attempts: 3
- ${{ if and( eq(parameters.dualstack, true), eq(contains(parameters.cni, 'cilium'), false) ) }}:
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: DualStack Test
name: DualStack
clusterName: ${{ parameters.clusterName }}
ginkgoFocus: '\[Feature:IPv6DualStack\]'
ginkgoSkip: 'SCTP|session affinity'
os: ${{ parameters.os }}
processes: 8
attempts: 3
- ${{ if and( eq(parameters.dualstack, true), contains(parameters.cni, 'cilium') ) }}:
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: DualStack Test|Cilium
name: DualStack
clusterName: ${{ parameters.clusterName }}
ginkgoFocus: '\[Feature:IPv6DualStack\]'
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
os: ${{ parameters.os }}
processes: 8
attempts: 3