9
9
- ' **.yaml'
10
10
11
11
jobs :
12
- # Helm_Install_Generic_Tests:
13
- # runs-on: ubuntu-18.04
14
- # steps:
15
-
16
- # - uses: actions/checkout@v2
17
- # with:
18
- # ref: ${{ github.event.pull_request.head.sha }}
19
-
20
- # - name: Generate go binary and build docker image
21
- # run: make build-amd64
22
-
23
- # #Install and configure a kind cluster
24
- # - name: Installing KinD cluster for the test
25
- # uses: engineerd/[email protected]
26
- # with:
27
- # version: "v0.7.0"
28
- # config: "build/kind-cluster/kind-config.yaml"
29
-
30
- # - name: Configuring and testing the Installation
31
- # run: |
32
- # kubectl taint nodes kind-control-plane node-role.kubernetes.io/master-
33
- # kind get kubeconfig --internal >$HOME/.kube/config
34
- # kubectl cluster-info --context kind-kind
35
- # kubectl get nodes
36
-
37
- # - name: Load docker image
38
- # run: /usr/local/bin/kind load docker-image litmuschaos/go-runner:ci
39
-
40
- # - name: Deploy a sample application for chaos injection
41
- # run: |
42
- # kubectl apply -f https://raw.githubusercontent.com/litmuschaos/chaos-ci-lib/master/app/nginx.yml
43
- # kubectl wait --for=condition=Ready pods --all --namespace default --timeout=90s
44
-
45
- # - name: Setting up kubeconfig ENV for Github Chaos Action
46
- # run: echo ::set-env name=KUBE_CONFIG_DATA::$(base64 -w 0 ~/.kube/config)
47
- # env:
48
- # ACTIONS_ALLOW_UNSECURE_COMMANDS: true
49
-
50
- # - name: Setup Litmus
51
- # uses: litmuschaos/github-chaos-actions@master
52
- # env:
53
- # INSTALL_LITMUS: true
54
-
55
- # - name: Running Litmus pod delete chaos experiment
56
- # if: always()
57
- # uses: litmuschaos/github-chaos-actions@master
58
- # env:
59
- # EXPERIMENT_NAME: pod-delete
60
- # EXPERIMENT_IMAGE: litmuschaos/go-runner
61
- # EXPERIMENT_IMAGE_TAG: ci
62
- # IMAGE_PULL_POLICY: IfNotPresent
63
- # JOB_CLEANUP_POLICY: delete
64
-
65
- # - name: Running container kill chaos experiment
66
- # if: always()
67
- # uses: litmuschaos/github-chaos-actions@master
68
- # env:
69
- # EXPERIMENT_NAME: container-kill
70
- # EXPERIMENT_IMAGE: litmuschaos/go-runner
71
- # EXPERIMENT_IMAGE_TAG: ci
72
- # IMAGE_PULL_POLICY: IfNotPresent
73
- # JOB_CLEANUP_POLICY: delete
74
- # CONTAINER_RUNTIME: containerd
75
-
76
- # - name: Running node-cpu-hog chaos experiment
77
- # if: always()
78
- # uses: litmuschaos/github-chaos-actions@master
79
- # env:
80
- # EXPERIMENT_NAME: node-cpu-hog
81
- # EXPERIMENT_IMAGE: litmuschaos/go-runner
82
- # EXPERIMENT_IMAGE_TAG: ci
83
- # IMAGE_PULL_POLICY: IfNotPresent
84
- # JOB_CLEANUP_POLICY: delete
85
-
86
-
87
- # - name: Running node-memory-hog chaos experiment
88
- # if: always()
89
- # uses: litmuschaos/github-chaos-actions@master
90
- # env:
91
- # EXPERIMENT_NAME: node-memory-hog
92
- # EXPERIMENT_IMAGE: litmuschaos/go-runner
93
- # EXPERIMENT_IMAGE_TAG: ci
94
- # IMAGE_PULL_POLICY: IfNotPresent
95
- # JOB_CLEANUP_POLICY: delete
96
-
97
- # - name: Running pod-cpu-hog chaos experiment
98
- # if: always()
99
- # uses: litmuschaos/github-chaos-actions@master
100
- # env:
101
- # EXPERIMENT_NAME: pod-cpu-hog
102
- # EXPERIMENT_IMAGE: litmuschaos/go-runner
103
- # EXPERIMENT_IMAGE_TAG: ci
104
- # IMAGE_PULL_POLICY: IfNotPresent
105
- # JOB_CLEANUP_POLICY: delete
106
- # TARGET_CONTAINER: nginx
107
- # TOTAL_CHAOS_DURATION: 60
108
- # CPU_CORES: 1
109
-
110
- # - name: Running pod-memory-hog chaos experiment
111
- # if: always()
112
- # uses: litmuschaos/github-chaos-actions@master
113
- # env:
114
- # EXPERIMENT_NAME: pod-memory-hog
115
- # EXPERIMENT_IMAGE: litmuschaos/go-runner
116
- # EXPERIMENT_IMAGE_TAG: ci
117
- # IMAGE_PULL_POLICY: IfNotPresent
118
- # JOB_CLEANUP_POLICY: delete
119
- # TARGET_CONTAINER: nginx
120
- # TOTAL_CHAOS_DURATION: 60
121
- # MEMORY_CONSUMPTION: 500
122
-
123
- # - name: Running pod network corruption chaos experiment
124
- # if: always()
125
- # uses: litmuschaos/github-chaos-actions@master
126
- # env:
127
- # EXPERIMENT_NAME: pod-network-corruption
128
- # EXPERIMENT_IMAGE: litmuschaos/go-runner
129
- # EXPERIMENT_IMAGE_TAG: ci
130
- # IMAGE_PULL_POLICY: IfNotPresent
131
- # JOB_CLEANUP_POLICY: delete
132
- # TARGET_CONTAINER: nginx
133
- # TOTAL_CHAOS_DURATION: 60
134
- # NETWORK_INTERFACE: eth0
135
- # CONTAINER_RUNTIME: containerd
136
-
137
- # - name: Running pod network duplication chaos experiment
138
- # if: always()
139
- # uses: litmuschaos/github-chaos-actions@master
140
- # env:
141
- # EXPERIMENT_NAME: pod-network-duplication
142
- # EXPERIMENT_IMAGE: litmuschaos/go-runner
143
- # EXPERIMENT_IMAGE_TAG: ci
144
- # IMAGE_PULL_POLICY: IfNotPresent
145
- # JOB_CLEANUP_POLICY: delete
146
- # TARGET_CONTAINER: nginx
147
- # TOTAL_CHAOS_DURATION: 60
148
- # NETWORK_INTERFACE: eth0
149
- # CONTAINER_RUNTIME: containerd
150
-
151
- # - name: Running pod-network-latency chaos experiment
152
- # if: always()
153
- # uses: litmuschaos/github-chaos-actions@master
154
- # env:
155
- # EXPERIMENT_NAME: pod-network-latency
156
- # EXPERIMENT_IMAGE: litmuschaos/go-runner
157
- # EXPERIMENT_IMAGE_TAG: ci
158
- # IMAGE_PULL_POLICY: IfNotPresent
159
- # JOB_CLEANUP_POLICY: delete
160
- # TARGET_CONTAINER: nginx
161
- # TOTAL_CHAOS_DURATION: 60
162
- # NETWORK_INTERFACE: eth0
163
- # NETWORK_LATENCY: 60000
164
- # CONTAINER_RUNTIME: containerd
165
-
166
- # - name: Running pod-network-loss chaos experiment
167
- # if: always()
168
- # uses: litmuschaos/github-chaos-actions@master
169
- # env:
170
- # EXPERIMENT_NAME: pod-network-loss
171
- # EXPERIMENT_IMAGE: litmuschaos/go-runner
172
- # EXPERIMENT_IMAGE_TAG: ci
173
- # IMAGE_PULL_POLICY: IfNotPresent
174
- # JOB_CLEANUP_POLICY: delete
175
- # TARGET_CONTAINER: nginx
176
- # TOTAL_CHAOS_DURATION: 60
177
- # NETWORK_INTERFACE: eth0
178
- # NETWORK_PACKET_LOSS_PERCENTAGE: 100
179
- # CONTAINER_RUNTIME: containerd
180
-
181
- # - name: Running pod autoscaler chaos experiment
182
- # if: always()
183
- # uses: litmuschaos/github-chaos-actions@master
184
- # env:
185
- # EXPERIMENT_NAME: pod-autoscaler
186
- # EXPERIMENT_IMAGE: litmuschaos/go-runner
187
- # EXPERIMENT_IMAGE_TAG: ci
188
- # IMAGE_PULL_POLICY: IfNotPresent
189
- # JOB_CLEANUP_POLICY: delete
190
- # TOTAL_CHAOS_DURATION: 60
191
-
192
- # - name: Running node-io-stress chaos experiment
193
- # if: always()
194
- # uses: litmuschaos/github-chaos-actions@master
195
- # env:
196
- # EXPERIMENT_NAME: node-io-stress
197
- # EXPERIMENT_IMAGE: litmuschaos/go-runner
198
- # EXPERIMENT_IMAGE_TAG: ci
199
- # IMAGE_PULL_POLICY: IfNotPresent
200
- # JOB_CLEANUP_POLICY: delete
201
- # TOTAL_CHAOS_DURATION: 120
202
- # FILESYSTEM_UTILIZATION_PERCENTAGE: 10
203
-
204
- # - name: Uninstall Litmus
205
- # uses: litmuschaos/github-chaos-actions@master
206
- # env:
207
- # LITMUS_CLEANUP: true
208
-
209
- # - name: Deleting KinD cluster
210
- # if: always()
211
- # run: kind delete cluster
212
12
213
13
Pod_Level_In_Serial_Mode :
214
14
runs-on : ubuntu-latest
215
15
steps :
216
16
217
17
# Install golang
218
- - uses : actions/setup-go@v2
18
+ - uses : actions/setup-go@v5
219
19
with :
220
20
go-version : 1.18
221
21
@@ -226,15 +26,28 @@ jobs:
226
26
- name : Generating Go binary and Building docker image
227
27
run : |
228
28
make build-amd64
229
- # Install and configure a kind cluster
230
- - name : Installing Prerequisites (K3S Cluster)
231
- env :
232
- KUBECONFIG : /etc/rancher/k3s/k3s.yaml
29
+
30
+ - name : Install KinD
31
+ run : |
32
+ curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-amd64
33
+ chmod +x ./kind
34
+ mv ./kind /usr/local/bin/kind
35
+
36
+ - name : Create KinD Cluster
37
+ run : |
38
+ kind create cluster --config build/kind-cluster/kind-config.yaml
39
+
40
+ - name : Configuring and testing the Installation
233
41
run : |
234
- curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.21.11+k3s1 sh -s - --docker --write-kubeconfig-mode 664
42
+ kubectl taint nodes kind-control-plane node-role.kubernetes.io/control-plane-
43
+ kubectl cluster-info --context kind-kind
235
44
kubectl wait node --all --for condition=ready --timeout=90s
236
45
kubectl get nodes
237
-
46
+
47
+ - name : Load image on the nodes of the cluster
48
+ run : |
49
+ kind load docker-image --name=kind litmuschaos/go-runner:ci
50
+
238
51
- uses : actions/checkout@v2
239
52
with :
240
53
repository : ' litmuschaos/litmus-e2e'
@@ -244,21 +57,22 @@ jobs:
244
57
env :
245
58
GO_EXPERIMENT_IMAGE : litmuschaos/go-runner:ci
246
59
EXPERIMENT_IMAGE_PULL_POLICY : IfNotPresent
247
- KUBECONFIG : /etc/rancher/k3s/k3s.yaml
60
+ KUBECONFIG : /home/runner/.kube/config
248
61
run : |
249
62
make build-litmus
250
63
make app-deploy
251
64
make pod-affected-perc-ton-series
252
- - name : Deleting K3S cluster
65
+
66
+ - name : Deleting KinD cluster
253
67
if : always()
254
- run : /usr/local/bin/k3s-uninstall.sh
68
+ run : kind delete cluster
255
69
256
70
Pod_Level_In_Parallel_Mode :
257
71
runs-on : ubuntu-latest
258
72
steps :
259
73
260
74
# Install golang
261
- - uses : actions/setup-go@v2
75
+ - uses : actions/setup-go@v5
262
76
with :
263
77
go-version : 1.18
264
78
@@ -269,14 +83,30 @@ jobs:
269
83
- name : Generating Go binary and Building docker image
270
84
run : |
271
85
make build-amd64
272
- # Install and configure a kind cluster
273
- - name : Installing Prerequisites (K3S Cluster)
274
- env :
275
- KUBECONFIG : /etc/rancher/k3s/k3s.yaml
86
+
87
+ - name : Install KinD
88
+ run : |
89
+ curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-amd64
90
+ chmod +x ./kind
91
+ mv ./kind /usr/local/bin/kind
92
+
93
+ - name : Create KinD Cluster
94
+ run : |
95
+ kind create cluster --config build/kind-cluster/kind-config.yaml
96
+
97
+ - name : Configuring and testing the Installation
98
+ env :
99
+ KUBECONFIG : /home/runner/.kube/config
276
100
run : |
277
- curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.21.11+k3s1 sh -s - --docker --write-kubeconfig-mode 664
101
+ kubectl taint nodes kind-control-plane node-role.kubernetes.io/control-plane-
102
+ kubectl cluster-info --context kind-kind
278
103
kubectl wait node --all --for condition=ready --timeout=90s
279
104
kubectl get nodes
105
+
106
+ - name : Load image on the nodes of the cluster
107
+ run : |
108
+ kind load docker-image --name=kind litmuschaos/go-runner:ci
109
+
280
110
- uses : actions/checkout@v2
281
111
with :
282
112
repository : ' litmuschaos/litmus-e2e'
@@ -286,21 +116,22 @@ jobs:
286
116
env :
287
117
GO_EXPERIMENT_IMAGE : litmuschaos/go-runner:ci
288
118
EXPERIMENT_IMAGE_PULL_POLICY : IfNotPresent
289
- KUBECONFIG : /etc/rancher/k3s/k3s.yaml
119
+ KUBECONFIG : /home/runner/.kube/config
290
120
run : |
291
121
make build-litmus
292
122
make app-deploy
293
123
make pod-affected-perc-ton-parallel
294
- - name : Deleting K3S cluster
124
+
125
+ - name : Deleting KinD cluster
295
126
if : always()
296
- run : /usr/local/bin/k3s-uninstall.sh
127
+ run : kind delete cluster
297
128
298
129
Node_Level_Tests :
299
130
runs-on : ubuntu-latest
300
131
steps :
301
132
302
133
# Install golang
303
- - uses : actions/setup-go@v2
134
+ - uses : actions/setup-go@v5
304
135
with :
305
136
go-version : 1.18
306
137
@@ -312,8 +143,15 @@ jobs:
312
143
run : |
313
144
make build-amd64
314
145
146
+ - name : Install KinD
147
+ run : |
148
+ curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-amd64
149
+ chmod +x ./kind
150
+ mv ./kind /usr/local/bin/kind
151
+
315
152
- name : Create KinD Cluster
316
- run : kind create cluster --config build/kind-cluster/kind-config.yaml
153
+ run : |
154
+ kind create cluster --config build/kind-cluster/kind-config.yaml
317
155
318
156
- name : Configuring and testing the Installation
319
157
run : |
@@ -324,7 +162,7 @@ jobs:
324
162
325
163
- name : Load image on the nodes of the cluster
326
164
run : |
327
- kind load docker-image --name=kind litmuschaos/go-runner:ci
165
+ kind load docker-image --name=kind litmuschaos/go-runner:ci
328
166
329
167
- uses : actions/checkout@v2
330
168
with :
@@ -355,4 +193,6 @@ jobs:
355
193
356
194
- name : Deleting KinD cluster
357
195
if : always()
358
- run : kind delete cluster
196
+ run : |
197
+ kubectl get nodes
198
+ kind delete cluster
0 commit comments