Skip to content

Commit 42b9d33

Browse files
committed
delete kind cluster
1 parent 4c8ce39 commit 42b9d33

File tree

3 files changed

+55
-19
lines changed

3 files changed

+55
-19
lines changed

.github/workflows/run-e2e-on-pr-commits.yml

+47-17
Original file line numberDiff line numberDiff line change
@@ -226,15 +226,28 @@ jobs:
226226
- name: Generating Go binary and Building docker image
227227
run: |
228228
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
229+
230+
- name: Install KinD
231+
run: |
232+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-amd64
233+
chmod +x ./kind
234+
mv ./kind /usr/local/bin/kind
235+
236+
- name: Create KinD Cluster
237+
run: |
238+
kind create cluster --config build/kind-cluster/pod-level-kind-config.yaml
239+
240+
- name: Configuring and testing the Installation
233241
run: |
234-
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.21.11+k3s1 sh -s - --docker --write-kubeconfig-mode 664
242+
kubectl taint nodes kind-control-plane node-role.kubernetes.io/control-plane-
243+
kubectl cluster-info --context kind-kind
235244
kubectl wait node --all --for condition=ready --timeout=90s
236245
kubectl get nodes
237-
246+
247+
- name: Load image on the nodes of the cluster
248+
run: |
249+
kind load docker-image --name=kind litmuschaos/go-runner:ci
250+
238251
- uses: actions/checkout@v2
239252
with:
240253
repository: 'uditgaurav/litmus-e2e'
@@ -244,14 +257,14 @@ jobs:
244257
env:
245258
GO_EXPERIMENT_IMAGE: litmuschaos/go-runner:ci
246259
EXPERIMENT_IMAGE_PULL_POLICY: IfNotPresent
247-
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
248260
run: |
249261
make build-litmus
250262
make app-deploy
251263
make pod-affected-perc-ton-series
252-
- name: Deleting K3S cluster
264+
265+
- name: Deleting KinD cluster
253266
if: always()
254-
run: /usr/local/bin/k3s-uninstall.sh
267+
run: kind delete cluster
255268

256269
Pod_Level_In_Parallel_Mode:
257270
runs-on: ubuntu-latest
@@ -269,14 +282,30 @@ jobs:
269282
- name: Generating Go binary and Building docker image
270283
run: |
271284
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
285+
286+
- name: Install KinD
287+
run: |
288+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-amd64
289+
chmod +x ./kind
290+
mv ./kind /usr/local/bin/kind
291+
292+
- name: Create KinD Cluster
293+
run: |
294+
kind create cluster --config build/kind-cluster/pod-level-kind-config.yaml
295+
296+
- name: Configuring and testing the Installation
297+
env:
298+
KUBECONFIG: /home/runner/.kube/config
276299
run: |
277-
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.21.11+k3s1 sh -s - --docker --write-kubeconfig-mode 664
300+
kubectl taint nodes kind-control-plane node-role.kubernetes.io/control-plane-
301+
kubectl cluster-info --context kind-kind
278302
kubectl wait node --all --for condition=ready --timeout=90s
279303
kubectl get nodes
304+
305+
- name: Load image on the nodes of the cluster
306+
run: |
307+
kind load docker-image --name=kind litmuschaos/go-runner:ci
308+
280309
- uses: actions/checkout@v2
281310
with:
282311
repository: 'uditgaurav/litmus-e2e'
@@ -286,14 +315,15 @@ jobs:
286315
env:
287316
GO_EXPERIMENT_IMAGE: litmuschaos/go-runner:ci
288317
EXPERIMENT_IMAGE_PULL_POLICY: IfNotPresent
289-
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
318+
KUBECONFIG: /home/runner/.kube/config
290319
run: |
291320
make build-litmus
292321
make app-deploy
293322
make pod-affected-perc-ton-parallel
294-
- name: Deleting K3S cluster
323+
324+
- name: Deleting KinD cluster
295325
if: always()
296-
run: /usr/local/bin/k3s-uninstall.sh
326+
run: kind delete cluster
297327

298328
Node_Level_Tests:
299329
runs-on: ubuntu-latest

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ IS_DOCKER_INSTALLED = $(shell which docker >> /dev/null 2>&1; echo $$?)
99

1010
# Docker info
1111
DOCKER_REGISTRY ?= docker.io
12-
DOCKER_REPO ?= shubh214
12+
DOCKER_REPO ?= litmuschaos
1313
DOCKER_IMAGE ?= go-runner
14-
DOCKER_TAG ?= fix-sudo
14+
DOCKER_TAG ?= ci
1515

1616
.PHONY: help
1717
help:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Cluster
2+
apiVersion: kind.x-k8s.io/v1alpha4
3+
nodes:
4+
- role: control-plane
5+
- role: worker
6+
- role: worker

0 commit comments

Comments
 (0)