Skip to content

Commit

Permalink
E2E: bump k8s to 1.30 (#113)
Browse files Browse the repository at this point in the history
Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
  • Loading branch information
nunnatsa authored May 29, 2024
1 parent a3a9957 commit 906c86e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
14 changes: 13 additions & 1 deletion e2e/create-pvc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,16 @@ var _ = Describe("CreatePVC", func() {
tenantPVC = nil
}
if tenantPV != nil {
err := tenantClient.CoreV1().PersistentVolumes().Delete(context.Background(), tenantPV.Name, metav1.DeleteOptions{})
By("Ensuring volume attachments associated with the PV are deleted")
attachments, err := tenantClient.StorageV1().VolumeAttachments().List(context.Background(), metav1.ListOptions{})
Expect(err).ToNot(HaveOccurred())
for _, attachment := range attachments.Items {
if attachment.Spec.Source.PersistentVolumeName != nil && *attachment.Spec.Source.PersistentVolumeName == tenantPV.Name {
err = tenantClient.StorageV1().VolumeAttachments().Delete(context.Background(), attachment.Name, metav1.DeleteOptions{})
Expect(err).ToNot(HaveOccurred())
}
}
err = tenantClient.CoreV1().PersistentVolumes().Delete(context.Background(), tenantPV.Name, metav1.DeleteOptions{})
Expect(err).ToNot(HaveOccurred())
// For some reason this takes about 2 minutes.
Eventually(func() bool {
Expand Down Expand Up @@ -540,6 +549,9 @@ var _ = Describe("CreatePVC", func() {
tenantPV = &k8sv1.PersistentVolume{
ObjectMeta: metav1.ObjectMeta{
Name: "tenant-pv",
Annotations: map[string]string{
"pv.kubernetes.io/provisioned-by": "csi.kubevirt.io",
},
},
Spec: k8sv1.PersistentVolumeSpec{
AccessModes: []k8sv1.PersistentVolumeAccessMode{k8sv1.ReadWriteOnce},
Expand Down
1 change: 1 addition & 0 deletions hack/run-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ VIRTCTL_PATH=${TOOLS_DIR}/bin/virtctl
DUMP_VERSION=$(curl -L https://storage.googleapis.com/kubevirt-prow/devel/nightly/release/kubevirt/kubevirt/latest)
DUMP_PATH=${TOOLS_DIR}/bin/kubevirt-${DUMP_VERSION}-dump
TEST_WORKING_DIR=${TOOLS_DIR}/e2e-test-workingdir
BIN_DIR=${BIN_DIR:-bin}
export ARTIFACTS=${ARTIFACTS:-k8s-reporter}
export KUBECONFIG=$(./kubevirtci kubeconfig)
export INFRA_CLUSTER_NAMESPACE=${INFRA_CLUSTER_NAMESPACE:-kvcluster}
Expand Down
7 changes: 4 additions & 3 deletions hack/run-k8s-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
set -e
export TENANT_CLUSTER_NAME=${TENANT_CLUSTER_NAME:-kvcluster}
export TENANT_CLUSTER_NAMESPACE=${TENANT_CLUSTER_NAMESPACE:-kvcluster}
export KUBEVIRTCI_TAG=${KUBEVIRTCI_TAG:-2309141019-029e67a}
export KUBEVIRTCI_TAG=${KUBEVIRTCI_TAG:-2405151527-09bcd71}

test_pod=${TENANT_CLUSTER_NAME}-k8s-e2e-suite-runnner
test_driver_cm=${TENANT_CLUSTER_NAME}-test-driver
Expand Down Expand Up @@ -95,9 +95,9 @@ spec:
- -c
- |
cd /tmp
curl --location https://dl.k8s.io/v1.26.0/kubernetes-test-linux-amd64.tar.gz | tar --strip-components=3 -zxf - kubernetes/test/bin/e2e.test kubernetes/test/bin/ginkgo
curl --location https://dl.k8s.io/v1.30.1/kubernetes-test-linux-amd64.tar.gz | tar --strip-components=3 -zxf - kubernetes/test/bin/e2e.test kubernetes/test/bin/ginkgo
chmod +x e2e.test
curl -LO "https://dl.k8s.io/release/v1.26.0/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/v1.30.1/bin/linux/amd64/kubectl"
chmod +x kubectl
echo \${TEST_DRIVER_PATH}
./e2e.test -kubeconfig \${KUBECONFIG} \
Expand All @@ -107,6 +107,7 @@ spec:
-ginkgo.focus='External.Storage.*csi.kubevirt.io.*' \
-ginkgo.skip='CSI Ephemeral-volume*' \
-ginkgo.skip='SELinuxMountReadWriteOncePod.*' \
-ginkgo.skip='should provision correct filesystem size when restoring snapshot to larger size pvc' \
-storage.testdriver=\${TEST_DRIVER_PATH}/test-driver.yaml \
-provider=local -report-dir=/tmp
ret1=\$?
Expand Down
8 changes: 4 additions & 4 deletions kubevirtci
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

set -e

export KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER:-k8s-1.28}
export CAPK_GUEST_K8S_VERSION=${CAPK_GUEST_K8S_VERSION:-v1.26.0}
export KUBEVIRTCI_TAG=${KUBEVIRTCI_TAG:-2309141019-029e67a}
export KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER:-k8s-1.30}
export CAPK_GUEST_K8S_VERSION=${CAPK_GUEST_K8S_VERSION:-v1.30.1}
export KUBEVIRTCI_TAG=${KUBEVIRTCI_TAG:-2405151527-09bcd71}
export KUBECONFIG=$(cluster-up/cluster-up/kubeconfig.sh)
export KUBEVIRT_DEPLOY_PROMETHEUS=false
export KUBEVIRT_NUM_NODES=${KUBEVIRT_NUM_NODES:-1}
Expand All @@ -15,7 +15,7 @@ export CAPK_RELEASE_VERSION="v0.1.8"
export CLUSTERCTL_VERSION="v1.6.1"
export CALICO_VERSION="v3.27.0"
export KUBEVIRT_VERSION="v1.1.1"
export NODE_VM_IMAGE_TEMPLATE=${NODE_VM_IMAGE_TEMPLATE:-quay.io/capk/ubuntu-2004-container-disk:v1.26.0}
export NODE_VM_IMAGE_TEMPLATE=${NODE_VM_IMAGE_TEMPLATE:-quay.io/capk/ubuntu-2204-container-disk:v1.30.1}

_default_bin_path=./hack/tools/bin
_default_tmp_path=./hack/tools/bin/tmp
Expand Down

0 comments on commit 906c86e

Please sign in to comment.