-
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.
Signed-off-by: Lan Liang <[email protected]>
- Loading branch information
1 parent
7ec7abb
commit ecdc88d
Showing
4 changed files
with
94 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,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
|
||
wget -q 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 | ||
|
||
K8SVERSION=${K8SVERSION:-"v1.25.3"} | ||
WORKSPACE=$PWD | ||
|
||
sed -i 's/K8SVERSION/'$K8SVERSION'/g' $WORKSPACE/.github/scripts/kind.yaml | ||
sed -i 's#WORKSPACE#'$WORKSPACE'#g' $WORKSPACE/.github/scripts/kind.yaml | ||
kind create cluster --config $WORKSPACE/.github/scripts/kind.yaml | ||
kubectl wait node --all --for condition=ready |
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,17 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
nodes: | ||
- role: control-plane | ||
image: kindest/node:K8SVERSION | ||
extraMounts: | ||
- hostPath: /tmp/kind | ||
containerPath: /var/log | ||
- hostPath: WORKSPACE/.github/scripts/xline.yaml | ||
containerPath: /etc/kubernetes/manifests/xline.yaml | ||
kubeadmConfigPatches: | ||
- | | ||
kind: ClusterConfiguration | ||
etcd: | ||
external: | ||
endpoints: | ||
- http://xline:2379 |
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,20 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
creationTimestamp: null | ||
name: xline | ||
namespace: kube-system | ||
spec: | ||
containers: | ||
- name: xline | ||
image: datenlord/xline:latest | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
- name: RUST_LOG | ||
value: debug | ||
command: | ||
- /bin/sh | ||
- -c | ||
- xline --name node1 --members node1=172.18.0.2:12379 --data-dir /tmp/xline --storage-engine rocksdb | ||
hostNetwork: true | ||
status: {} |
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,40 @@ | ||
name: e2e | ||
|
||
on: | ||
schedule: | ||
- cron: "00 * * * *" # run ci periodically at 3 am | ||
push: #enabled after the API is stable | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
kube: | ||
name: e2e_kube | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
k8s: | ||
- v1.25.3 | ||
- v1.26.0 | ||
- v1.27.3 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: work with kubernetes | ||
env: | ||
K8SVERSION: ${{ matrix.k8s }} | ||
run: | | ||
./.github/scripts/kind.sh | ||
- name: chmod | ||
if: always() | ||
run: | | ||
sudo chmod -R 777 /tmp/kind | ||
ls /tmp/kind | ||
- name: upload kind logs | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: xline_kind_log_${{ matrix.k8s }} | ||
path: /tmp/kind/ |