Skip to content

Commit d82898b

Browse files
committed
ci, e2e tests: provide crio target
minikube 1.26.1 has CRI-O 1.24.X according to its release notes - [0]. [0] - https://github.com/kubernetes/minikube/releases/tag/v1.26.1 Signed-off-by: Miguel Duarte Barroso <[email protected]>
1 parent 17b3b93 commit d82898b

File tree

2 files changed

+57
-23
lines changed

2 files changed

+57
-23
lines changed

.github/workflows/e2e-crio.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: e2e tests - crio
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/setup-python@v2
14+
with:
15+
python-version: 3.x
16+
17+
- run: |
18+
pip3 install --user --upgrade j2cli
19+
j2 --version
20+
- uses: actions/checkout@v3
21+
22+
- name: Set up Go
23+
uses: actions/setup-go@v3
24+
with:
25+
go-version: 1.18
26+
27+
- name: Start minikube
28+
uses: medyagh/setup-minikube@master
29+
with:
30+
minikube-version: 1.26.1
31+
container-runtime: cri-o
32+
kubernetes-version: v1.24.3
33+
34+
- name: Deploy multus & the PRs contents
35+
run: hack/e2e-crio-cluster-setup.sh
36+
37+
- name: Test - provisioning the examples
38+
run: e2e/test-provisioning-examples.sh
39+
40+
- name: Test - execute golang based e2e tests
41+
env:
42+
KUBECONFIG: /home/runner/.kube/config
43+
run: make e2e/test
44+
45+
- name: Cleanup cluster
46+
run: |
47+
minikube delete

hack/e2e-crio-cluster-setup.sh

+10-23
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,34 @@ IMAGE_REPO=${IMG_REPO:-maiqueb}
1010
IMAGE_NAME="multus-dynamic-networks-controller"
1111
IMAGE_TAG="latest"
1212

13-
setup_cluster() {
14-
export KUBEVIRTCI_TAG=`curl -L -Ss https://storage.googleapis.com/kubevirt-prow/release/kubevirt/kubevirtci/latest`
15-
git clone https://github.com/kubevirt/kubevirtci/
16-
trap "popd" RETURN SIGINT
17-
pushd kubevirtci
18-
KUBEVIRT_PROVIDER="k8s-$K8S_VERSION" KUBEVIRT_NUM_SECONDARY_NICS=1 make cluster-up
19-
export KUBECONFIG="$(pwd)/_ci-configs/k8s-1.24/.kubeconfig"
20-
}
21-
2213
push_local_image() {
2314
OCI_BIN="$OCI_BIN" IMAGE_REGISTRY="registry:5000/$IMAGE_REPO" make manifests
2415
OCI_BIN="$OCI_BIN" IMAGE_REGISTRY="$IMG_REGISTRY" make img-build
2516
"$OCI_BIN" push --tls-verify=false "$IMG_REGISTRY/$IMAGE_NAME:$IMAGE_TAG"
2617
}
2718

28-
publish_kubeconfig() {
29-
local kube_config_dir="${HOME}/.kube/"
30-
mkdir -p "$kube_config_dir"
31-
cp kubevirtci/_ci-configs/k8s-1.24/.kubeconfig "$kube_config_dir/config"
32-
echo "###"
33-
echo " Repo kubeconfig moved to $kube_config_dir/config"
34-
echo "###"
19+
setup_registry() {
20+
# https://minikube.sigs.k8s.io/docs/handbook/registry/
21+
minikube addons enable registry
22+
"$OCI_BIN" run --rm -it --network=host alpine ash -c "apk add socat && socat TCP-LISTEN:5000,reuseaddr,fork TCP:$(minikube ip):5000"
3523
}
3624

3725
cleanup() {
38-
rm -rf kubevirtci
3926
git checkout -- manifests/
27+
echo "=============="
28+
echo " minikube logs:"
29+
echo "=============="
30+
minikube logs
4031
}
4132

4233
trap "cleanup" EXIT
43-
setup_cluster
4434

45-
registry_port=$(kubevirtci/cluster-up/cli.sh ports registry | tr -d '\r')
46-
registry="localhost:$registry_port/$IMAGE_REPO"
35+
setup_registry
4736

48-
IMG_REGISTRY="$registry" push_local_image
37+
IMG_REGISTRY="localhost:5000/$IMAGE_REPO" push_local_image
4938

5039
kubectl apply -f https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/master/deployments/multus-daemonset-thick.yml
5140
kubectl wait -nkube-system --for=condition=ready --timeout=180s -l app=multus pods
5241

53-
publish_kubeconfig
54-
5542
kubectl apply -f manifests/dynamic-networks-controller.yaml
5643
kubectl wait -nkube-system --for=condition=ready --timeout=180s -l app=dynamic-networks-controller pods

0 commit comments

Comments
 (0)