Skip to content

Commit

Permalink
add e2e ci for kubernetes with kind.
Browse files Browse the repository at this point in the history
  • Loading branch information
liangyuanpeng committed Jul 28, 2023
1 parent 7ec7abb commit 99542cb
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/kube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: e2e

on:
schedule:
- cron: "00 19 * * *" # run ci periodically at 3 am
push: #work for test

env:
CI_RUST_TOOLCHAIN: 1.70.0

jobs:
kube:
name: e2e_kube
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: work with kubernetes
run: |
wget https://github.com/kubernetes-sigs/kind/releases/download/v0.20.0/kind-linux-amd64
chmod +x kind-linux-amd64
mv kind-linux-amd64 /usr/local/bin/kind
cat << EOF >> config.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.27.0
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
etcd:
external:
endpoints:
- http://xline:2379
EOF
docker network create kind
docker run --network kind -e RUST_LOG=debug -it -d --name xline datenlord/xline:latest xline --name node1 --members node1=0.0.0.0:2379 --data-dir /tmp/xline --storage-engine rocksdb
kind create cluster --config config.yaml
kubectl wait node --all --for condition=ready

0 comments on commit 99542cb

Please sign in to comment.