-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add e2e ci for kubernetes with kind.
- Loading branch information
1 parent
7ec7abb
commit 99542cb
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |