Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Cache images for E2E test #77

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,54 @@ e2e: kind kubectl cmctl skaffold kuttl e2e-image
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) virt-daemon:e2e
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) virt-prerunner:e2e

docker pull docker.io/calico/cni:v3.23.5
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) docker.io/calico/cni:v3.23.5
docker pull docker.io/calico/node:v3.23.5
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) docker.io/calico/node:v3.23.5
docker pull docker.io/calico/kube-controllers:v3.23.5
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) docker.io/calico/kube-controllers:v3.23.5
KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(KUBECTL) apply -f https://projectcalico.docs.tigera.io/archive/v3.23/manifests/calico.yaml
KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(KUBECTL) wait -n kube-system deployment calico-kube-controllers --for condition=Available --timeout -1s

docker pull quay.io/jetstack/cert-manager-controller:v1.8.2
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) quay.io/jetstack/cert-manager-controller:v1.8.2
docker pull quay.io/jetstack/cert-manager-cainjector:v1.8.2
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) quay.io/jetstack/cert-manager-cainjector:v1.8.2
docker pull quay.io/jetstack/cert-manager-webhook:v1.8.2
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) quay.io/jetstack/cert-manager-webhook:v1.8.2
KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(KUBECTL) apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.2/cert-manager.yaml
KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(CMCTL) check api --wait=10m

docker pull quay.io/kubevirt/cdi-operator:v1.53.0
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) quay.io/kubevirt/cdi-operator:v1.53.0
docker pull quay.io/kubevirt/cdi-apiserver:v1.53.0
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) quay.io/kubevirt/cdi-apiserver:v1.53.0
docker pull quay.io/kubevirt/cdi-controller:v1.53.0
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) quay.io/kubevirt/cdi-controller:v1.53.0
docker pull quay.io/kubevirt/cdi-uploadproxy:v1.53.0
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) quay.io/kubevirt/cdi-uploadproxy:v1.53.0
docker pull quay.io/kubevirt/cdi-importer:v1.53.0
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) quay.io/kubevirt/cdi-importer:v1.53.0
KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(KUBECTL) apply -f https://github.com/kubevirt/containerized-data-importer/releases/download/v1.53.0/cdi-operator.yaml
KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(KUBECTL) wait -n cdi deployment cdi-operator --for condition=Available --timeout -1s
KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(KUBECTL) apply -f https://github.com/kubevirt/containerized-data-importer/releases/download/v1.53.0/cdi-cr.yaml
KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(KUBECTL) wait cdi.cdi.kubevirt.io cdi --for condition=Available --timeout -1s

docker pull rook/nfs:master
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) rook/nfs:master
KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(KUBECTL) apply -f test/e2e/config/rook-nfs/crds.yaml
KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(KUBECTL) wait crd nfsservers.nfs.rook.io --for condition=Established
KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(KUBECTL) apply -f test/e2e/config/rook-nfs/

PATH=$(LOCALBIN):$(PATH) $(SKAFFOLD) render --offline=true --default-repo="" --digest-source=tag --images virt-controller:e2e,virt-daemon:e2e | KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(KUBECTL) apply -f -
KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(KUBECTL) wait -n virtink-system deployment virt-controller --for condition=Available --timeout -1s

docker pull smartxworks/virtink-kernel-5.15.12
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) smartxworks/virtink-kernel-5.15.12
docker pull smartxworks/virtink-container-disk-ubuntu
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) smartxworks/virtink-container-disk-ubuntu
docker pull smartxworks/virtink-container-rootfs-ubuntu
$(KIND) load docker-image --name $(E2E_KIND_CLUSTER_NAME) smartxworks/virtink-container-rootfs-ubuntu
KUBECONFIG=$(E2E_KIND_CLUSTER_KUBECONFIG) $(KUTTL) test --config test/e2e/kuttl-test.yaml

$(KIND) delete cluster --name $(E2E_KIND_CLUSTER_NAME)
1 change: 1 addition & 0 deletions test/e2e/create-container-disk-vm/00-create-vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
- name: ubuntu
containerDisk:
image: smartxworks/virtink-container-disk-ubuntu
imagePullPolicy: IfNotPresent
- name: cloud-init
cloudInit:
userData: |-
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/create-container-rootfs-vm/00-create-vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ spec:
size: 1Gi
kernel:
image: smartxworks/virtink-kernel-5.15.12
imagePullPolicy: IfNotPresent
cmdline: "console=ttyS0 root=/dev/vda rw"
disks:
- name: ubuntu
Expand All @@ -18,6 +19,7 @@ spec:
- name: ubuntu
containerRootfs:
image: smartxworks/virtink-container-rootfs-ubuntu
imagePullPolicy: IfNotPresent
size: 4Gi
- name: cloud-init
cloudInit:
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/migrate-vm/00-create-vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ metadata:
name: ubuntu
spec:
source:
http:
#url: https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
url: http://192.168.17.20/kubrid/images/jammy-server-cloudimg-amd64.img
http:
#url: https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
url: http://192.168.17.20/kubrid/images/jammy-server-cloudimg-amd64.img
pvc:
storageClassName: rook-nfs-share1
accessModes:
Expand Down