From 51e05261570f0658d57d39b4142c1997322fc374 Mon Sep 17 00:00:00 2001 From: kubevirt-bot Date: Fri, 22 Oct 2021 00:01:16 +0000 Subject: [PATCH] Bump kubevirtci [bf9b729 Upgrade SR-IOV provider nodes image to k8s-1.22](https://github.com/kubevirt/kubevirtci/pull/694) [5a10f48 Add check-cluster-up script for KinD providers](https://github.com/kubevirt/kubevirtci/pull/645) Signed-off-by: kubevirt-bot --- cluster-up-sha.txt | 2 +- cluster-up/cluster/kind-1.19-sriov/README.md | 74 ------------- .../OWNERS | 0 cluster-up/cluster/kind-1.22-sriov/README.md | 101 ++++++++++++++++++ .../TROUBLESHOOTING.md | 0 .../certcreator/certlib/selfsign.go | 0 .../certcreator/certsecret.go | 0 .../certcreator/go.mod | 0 .../certcreator/go.sum | 0 .../config_sriov_cluster.sh | 0 .../cluster/kind-1.22-sriov/conformance.json | 88 +++++++++++++++ .../manifests/network_config_policy.yaml | 0 .../provider.sh | 9 +- .../manifests/kustomization.yaml | 0 .../sriov-components/manifests/multus.yaml | 0 .../manifests/patch-node-selector.yaml.in | 0 .../patch-sriovdp-resource-prefix.yaml.in | 0 .../manifests/sriov-cni-daemonset.yaml | 0 .../sriov-components/manifests/sriov-ns.yaml | 0 .../manifests/sriovdp-config.yaml.in | 0 .../manifests/sriovdp-daemonset.yaml | 0 .../sriov-components/sriov_components.sh | 0 .../sriov-node/configure_vfs.sh | 0 .../sriov-node/node.sh | 0 .../sriov_operator.sh | 0 .../sriovdp_setup.sh | 0 cluster-up/cluster/kind/check-cluster-up.sh | 77 +++++++++++++ cluster-up/hack/common.sh | 2 +- cluster-up/version.txt | 2 +- hack/config-default.sh | 2 +- 30 files changed, 271 insertions(+), 86 deletions(-) delete mode 100644 cluster-up/cluster/kind-1.19-sriov/README.md rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/OWNERS (100%) create mode 100644 cluster-up/cluster/kind-1.22-sriov/README.md rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/TROUBLESHOOTING.md (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/certcreator/certlib/selfsign.go (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/certcreator/certsecret.go (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/certcreator/go.mod (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/certcreator/go.sum (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/config_sriov_cluster.sh (100%) create mode 100644 cluster-up/cluster/kind-1.22-sriov/conformance.json rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/manifests/network_config_policy.yaml (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/provider.sh (77%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/sriov-components/manifests/kustomization.yaml (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/sriov-components/manifests/multus.yaml (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/sriov-components/manifests/patch-node-selector.yaml.in (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/sriov-components/manifests/patch-sriovdp-resource-prefix.yaml.in (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/sriov-components/manifests/sriov-cni-daemonset.yaml (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/sriov-components/manifests/sriov-ns.yaml (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/sriov-components/manifests/sriovdp-config.yaml.in (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/sriov-components/manifests/sriovdp-daemonset.yaml (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/sriov-components/sriov_components.sh (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/sriov-node/configure_vfs.sh (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/sriov-node/node.sh (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/sriov_operator.sh (100%) rename cluster-up/cluster/{kind-1.19-sriov => kind-1.22-sriov}/sriovdp_setup.sh (100%) create mode 100755 cluster-up/cluster/kind/check-cluster-up.sh diff --git a/cluster-up-sha.txt b/cluster-up-sha.txt index 3735929c66f0..68dbc18e4295 100644 --- a/cluster-up-sha.txt +++ b/cluster-up-sha.txt @@ -1 +1 @@ -f7906a7e1dfeeb25fe3bac94f1852671aa2026b1 +14aec428e219e4e669856719a74c26abb54cd2ef diff --git a/cluster-up/cluster/kind-1.19-sriov/README.md b/cluster-up/cluster/kind-1.19-sriov/README.md deleted file mode 100644 index cb8de791a5e8..000000000000 --- a/cluster-up/cluster/kind-1.19-sriov/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# K8S 1.17.0 with sriov in a Kind cluster - -Provides a pre-deployed k8s cluster with version 1.17.0 that runs using [kind](https://github.com/kubernetes-sigs/kind) The cluster is completely ephemeral and is recreated on every cluster restart. -The KubeVirt containers are built on the local machine and are then pushed to a registry which is exposed at -`localhost:5000`. - -This version also expects to have sriov-enabled nics on the current host, and will move physical interfaces into the `kind`'s cluster worker node(s) so that they can be used through multus. - -## Bringing the cluster up - -```bash -export KUBEVIRT_PROVIDER=kind-k8s-sriov-1.17.0 -make cluster-up -``` - -The cluster can be accessed as usual: - -```bash -$ cluster-up/kubectl.sh get nodes -NAME STATUS ROLES AGE VERSION -sriov-control-plane Ready master 6m14s v1.17.0 -sriov-worker Ready worker 5m36s v1.17.0 -``` - -## Bringing the cluster down - -```bash -export KUBEVIRT_PROVIDER=kind-k8s-sriov-1.17.0 -make cluster-down -``` - -This destroys the whole cluster. - -## Setting a custom kind version - -In order to use a custom kind image / kind version, -export KIND_NODE_IMAGE, KIND_VERSION, KUBECTL_PATH before running cluster-up. -For example in order to use kind 0.9.0 (which is based on k8s-1.19.1) use: -```bash -export KIND_NODE_IMAGE="kindest/node:v1.19.1@sha256:98cf5288864662e37115e362b23e4369c8c4a408f99cbc06e58ac30ddc721600" -export KIND_VERSION="0.9.0" -export KUBECTL_PATH="/usr/bin/kubectl" -``` -This allows users to test or use custom images / different kind versions before making them official. -See https://github.com/kubernetes-sigs/kind/releases for details about node images according to the kind version. - -## Running multi sriov clusters locally -Kubevirtci sriov provider supports running two clusters side by side with few known limitations. - -General considerations: - -- A sriov PF must be available for each cluster. -In order to achieve that, there are two options: -1. Assign just one PF for each worker node of each cluster by using `export PF_COUNT_PER_NODE=1` (this is the default value). -2. Optional method: `export PF_BLACKLIST=` the non used PFs, in order to prevent them from being allocated to the current cluster. -The user can list the PFs that should not be allocated to the current cluster, keeping in mind -that at least one (or 2 in case of migration), should not be listed, so they would be allocated for the current cluster. -Note: another reason to blacklist a PF, is in case its has a defect or should be kept for other operations (for example sniffing). -- Clusters should be created one by another and not in parallel (to avoid races over SRIOV PF's). -- The cluster names must be different. -This can be achieved by setting `export CLUSTER_NAME=sriov2` on the 2nd cluster. -The default `CLUSTER_NAME` is `sriov`. -The 2nd cluster registry would be exposed at `localhost:5001` automatically, once the `CLUSTER_NAME` -is set to a non default value. -- Each cluster should be created on its own git clone folder, i.e -`/root/project/kubevirtci1` -`/root/project/kubevirtci2` -In order to switch between them, change dir to that folder and set the env variables `KUBECONFIG` and `KUBEVIRT_PROVIDER`. -- In case only one PF exists, for example if running on prow which will assign only one PF per job in its own DinD, -Kubevirtci is agnostic and nothing needs to be done, since all conditions above are met. -- Upper limit of the number of clusters that can be run on the same time equals number of PFs / number of PFs per cluster, -therefore, in case there is only one PF, only one cluster can be created. -Locally the actual limit currently supported is two clusters. -- In order to use `make cluster-down` please make sure the right `CLUSTER_NAME` is exported. diff --git a/cluster-up/cluster/kind-1.19-sriov/OWNERS b/cluster-up/cluster/kind-1.22-sriov/OWNERS similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/OWNERS rename to cluster-up/cluster/kind-1.22-sriov/OWNERS diff --git a/cluster-up/cluster/kind-1.22-sriov/README.md b/cluster-up/cluster/kind-1.22-sriov/README.md new file mode 100644 index 000000000000..1155f17892e3 --- /dev/null +++ b/cluster-up/cluster/kind-1.22-sriov/README.md @@ -0,0 +1,101 @@ +# K8S 1.22.2 with SR-IOV in a Kind cluster + +Provides a pre-deployed containerized k8s cluster with version 1.22.2 that runs +using [KinD](https://github.com/kubernetes-sigs/kind) +The cluster is completely ephemeral and is recreated on every cluster restart. The KubeVirt containers are built on the +local machine and are then pushed to a registry which is exposed at +`localhost:5000`. + +This version also expects to have SR-IOV enabled nics (SR-IOV Physical Function) on the current host, and will move +physical interfaces into the `KinD`'s cluster worker node(s) so that they can be used through multus and SR-IOV +components. + +This providers also deploys [multus](https://github.com/k8snetworkplumbingwg/multus-cni) +, [sriov-cni](https://github.com/k8snetworkplumbingwg/sriov-cni) +and [sriov-device-plugin](https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin). + +## Bringing the cluster up + +```bash +export KUBEVIRT_PROVIDER=kind-1.22-sriov +export KUBEVIRT_NUM_NODES=3 +make cluster-up + +$ cluster-up/kubectl.sh get nodes +NAME STATUS ROLES AGE VERSION +sriov-control-plane Ready control-plane,master 20h v1.22.2 +sriov-worker Ready worker 20h v1.22.2 +sriov-worker2 Ready worker 20h v1.22.2 + +$ cluster-up/kubectl.sh get pods -n kube-system -l app=multus +NAME READY STATUS RESTARTS AGE +kube-multus-ds-amd64-d45n4 1/1 Running 0 20h +kube-multus-ds-amd64-g26xh 1/1 Running 0 20h +kube-multus-ds-amd64-mfh7c 1/1 Running 0 20h + +$ cluster-up/kubectl.sh get pods -n sriov -l app=sriov-cni +NAME READY STATUS RESTARTS AGE +kube-sriov-cni-ds-amd64-fv5cr 1/1 Running 0 20h +kube-sriov-cni-ds-amd64-q95q9 1/1 Running 0 20h + +$ cluster-up/kubectl.sh get pods -n sriov -l app=sriovdp +NAME READY STATUS RESTARTS AGE +kube-sriov-device-plugin-amd64-h7h84 1/1 Running 0 20h +kube-sriov-device-plugin-amd64-xrr5z 1/1 Running 0 20h +``` + +## Bringing the cluster down + +```bash +export KUBEVIRT_PROVIDER=kind-1.22-sriov +make cluster-down +``` + +This destroys the whole cluster, and moves the SR-IOV nics to the root network namespace. + +## Setting a custom kind version + +In order to use a custom kind image / kind version, export `KIND_NODE_IMAGE`, `KIND_VERSION`, `KUBECTL_PATH` before +running cluster-up. For example in order to use kind 0.9.0 (which is based on k8s-1.19.1) use: + +```bash +export KIND_NODE_IMAGE="kindest/node:v1.19.1@sha256:98cf5288864662e37115e362b23e4369c8c4a408f99cbc06e58ac30ddc721600" +export KIND_VERSION="0.9.0" +export KUBECTL_PATH="/usr/bin/kubectl" +``` + +This allows users to test or use custom images / different kind versions before making them official. +See https://github.com/kubernetes-sigs/kind/releases for details about node images according to the kind version. + +## Running multi SR-IOV clusters locally + +Kubevirtci SR-IOV provider supports running two clusters side by side with few known limitations. + +General considerations: + +- A SR-IOV PF must be available for each cluster. In order to achieve that, there are two options: + +1. Assign just one PF for each worker node of each cluster by using `export PF_COUNT_PER_NODE=1` (this is the default + value). +2. Optional method: `export PF_BLACKLIST=` the non used PFs, in order to prevent them from being allocated to + the current cluster. The user can list the PFs that should not be allocated to the current cluster, keeping in mind + that at least one (or 2 in case of migration), should not be listed, so they would be allocated for the current + cluster. Note: another reason to blacklist a PF, is in case its has a defect or should be kept for other operations ( + for example sniffing). + +- Clusters should be created one by another and not in parallel (to avoid races over SR-IOV PF's). +- The cluster names must be different. This can be achieved by setting `export CLUSTER_NAME=sriov2` on the 2nd cluster. + The default `CLUSTER_NAME` is `sriov`. The 2nd cluster registry would be exposed at `localhost:5001` automatically, + once the `CLUSTER_NAME` + is set to a non default value. +- Each cluster should be created on its own git clone folder, i.e: + `/root/project/kubevirtci1` + `/root/project/kubevirtci2` + In order to switch between them, change dir to that folder and set the env variables `KUBECONFIG` + and `KUBEVIRT_PROVIDER`. +- In case only one PF exists, for example if running on prow which will assign only one PF per job in its own DinD, + Kubevirtci is agnostic and nothing needs to be done, since all conditions above are met. +- Upper limit of the number of clusters that can be run on the same time equals number of PFs / number of PFs per + cluster, therefore, in case there is only one PF, only one cluster can be created. Locally the actual limit currently + supported is two clusters. +- In order to use `make cluster-down` please make sure the right `CLUSTER_NAME` is exported. diff --git a/cluster-up/cluster/kind-1.19-sriov/TROUBLESHOOTING.md b/cluster-up/cluster/kind-1.22-sriov/TROUBLESHOOTING.md similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/TROUBLESHOOTING.md rename to cluster-up/cluster/kind-1.22-sriov/TROUBLESHOOTING.md diff --git a/cluster-up/cluster/kind-1.19-sriov/certcreator/certlib/selfsign.go b/cluster-up/cluster/kind-1.22-sriov/certcreator/certlib/selfsign.go similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/certcreator/certlib/selfsign.go rename to cluster-up/cluster/kind-1.22-sriov/certcreator/certlib/selfsign.go diff --git a/cluster-up/cluster/kind-1.19-sriov/certcreator/certsecret.go b/cluster-up/cluster/kind-1.22-sriov/certcreator/certsecret.go similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/certcreator/certsecret.go rename to cluster-up/cluster/kind-1.22-sriov/certcreator/certsecret.go diff --git a/cluster-up/cluster/kind-1.19-sriov/certcreator/go.mod b/cluster-up/cluster/kind-1.22-sriov/certcreator/go.mod similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/certcreator/go.mod rename to cluster-up/cluster/kind-1.22-sriov/certcreator/go.mod diff --git a/cluster-up/cluster/kind-1.19-sriov/certcreator/go.sum b/cluster-up/cluster/kind-1.22-sriov/certcreator/go.sum similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/certcreator/go.sum rename to cluster-up/cluster/kind-1.22-sriov/certcreator/go.sum diff --git a/cluster-up/cluster/kind-1.19-sriov/config_sriov_cluster.sh b/cluster-up/cluster/kind-1.22-sriov/config_sriov_cluster.sh similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/config_sriov_cluster.sh rename to cluster-up/cluster/kind-1.22-sriov/config_sriov_cluster.sh diff --git a/cluster-up/cluster/kind-1.22-sriov/conformance.json b/cluster-up/cluster/kind-1.22-sriov/conformance.json new file mode 100644 index 000000000000..c796ea1b0197 --- /dev/null +++ b/cluster-up/cluster/kind-1.22-sriov/conformance.json @@ -0,0 +1,88 @@ +{ + "Description": "DEFAULT", + "UUID": "c3bc7d76-6ce8-4c8a-8bcb-5c7ae5fb22a3", + "Version": "v0.50.0", + "ResultsDir": "/tmp/sonobuoy", + "Resources": [ + "apiservices", + "certificatesigningrequests", + "clusterrolebindings", + "clusterroles", + "componentstatuses", + "configmaps", + "controllerrevisions", + "cronjobs", + "customresourcedefinitions", + "daemonsets", + "deployments", + "endpoints", + "ingresses", + "jobs", + "leases", + "limitranges", + "mutatingwebhookconfigurations", + "namespaces", + "networkpolicies", + "nodes", + "persistentvolumeclaims", + "persistentvolumes", + "poddisruptionbudgets", + "pods", + "podlogs", + "podsecuritypolicies", + "podtemplates", + "priorityclasses", + "replicasets", + "replicationcontrollers", + "resourcequotas", + "rolebindings", + "roles", + "servergroups", + "serverversion", + "serviceaccounts", + "services", + "statefulsets", + "storageclasses", + "validatingwebhookconfigurations", + "volumeattachments" + ], + "Filters": { + "Namespaces": ".*", + "LabelSelector": "" + }, + "Limits": { + "PodLogs": { + "Namespaces": "", + "SonobuoyNamespace": true, + "FieldSelectors": [], + "LabelSelector": "", + "Previous": false, + "SinceSeconds": null, + "SinceTime": null, + "Timestamps": false, + "TailLines": null, + "LimitBytes": null, + "LimitSize": "", + "LimitTime": "" + } + }, + "QPS": 30, + "Burst": 50, + "Server": { + "bindaddress": "0.0.0.0", + "bindport": 8080, + "advertiseaddress": "", + "timeoutseconds": 10800 + }, + "Plugins": null, + "PluginSearchPath": [ + "./plugins.d", + "/etc/sonobuoy/plugins.d", + "~/sonobuoy/plugins.d" + ], + "Namespace": "sonobuoy", + "WorkerImage": "projects.registry.vmware.com/sonobuoy/sonobuoy:v0.50.0", + "ImagePullPolicy": "IfNotPresent", + "ImagePullSecrets": "", + "ProgressUpdatesPort": "8099" +} diff --git a/cluster-up/cluster/kind-1.19-sriov/manifests/network_config_policy.yaml b/cluster-up/cluster/kind-1.22-sriov/manifests/network_config_policy.yaml similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/manifests/network_config_policy.yaml rename to cluster-up/cluster/kind-1.22-sriov/manifests/network_config_policy.yaml diff --git a/cluster-up/cluster/kind-1.19-sriov/provider.sh b/cluster-up/cluster/kind-1.22-sriov/provider.sh similarity index 77% rename from cluster-up/cluster/kind-1.19-sriov/provider.sh rename to cluster-up/cluster/kind-1.22-sriov/provider.sh index 1b834f7847ad..2084f5dc6aeb 100755 --- a/cluster-up/cluster/kind-1.19-sriov/provider.sh +++ b/cluster-up/cluster/kind-1.22-sriov/provider.sh @@ -19,7 +19,7 @@ SRIOV_TESTS_NS="${SRIOV_TESTS_NS:-kubevirt-test-default1}" function set_kind_params() { export KIND_VERSION="${KIND_VERSION:-0.11.1}" - export KIND_NODE_IMAGE="${KIND_NODE_IMAGE:-quay.io/kubevirtci/kindest_node:v1.19.11@sha256:cbecc517bfad65e368cd7975d1e8a4f558d91160c051d0b1d10ff81488f5fb06}" + export KIND_NODE_IMAGE="${KIND_NODE_IMAGE:-quay.io/kubevirtci/kindest_node:v1.22.2@sha256:f638a08c1f68fe2a99e724ace6df233a546eaf6713019a0b310130a4f91ebe7f}" export KUBECTL_PATH="${KUBECTL_PATH:-/bin/kubectl}" } @@ -50,12 +50,6 @@ function up() { ${KUBEVIRTCI_PATH}/cluster/$KUBEVIRT_PROVIDER/config_sriov_cluster.sh - # In order to support live migration on containerized cluster we need to workaround - # Libvirt uuid check for source and target nodes. - # To do that we create PodPreset that mounts fake random product_uuid to virt-launcher pods, - # and kubevirt SRIOV tests namespace for the PodPrest beforhand. - podpreset::expose_unique_product_uuid_per_node "$CLUSTER_NAME" "$SRIOV_TESTS_NS" - print_sriov_data echo "$KUBEVIRT_PROVIDER cluster '$CLUSTER_NAME' is ready" } @@ -63,4 +57,3 @@ function up() { set_kind_params source ${KUBEVIRTCI_PATH}/cluster/kind/common.sh -source ${KUBEVIRTCI_PATH}/cluster/kind/podpreset.sh diff --git a/cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/kustomization.yaml b/cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/kustomization.yaml similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/kustomization.yaml rename to cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/kustomization.yaml diff --git a/cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/multus.yaml b/cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/multus.yaml similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/multus.yaml rename to cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/multus.yaml diff --git a/cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/patch-node-selector.yaml.in b/cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/patch-node-selector.yaml.in similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/patch-node-selector.yaml.in rename to cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/patch-node-selector.yaml.in diff --git a/cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/patch-sriovdp-resource-prefix.yaml.in b/cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/patch-sriovdp-resource-prefix.yaml.in similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/patch-sriovdp-resource-prefix.yaml.in rename to cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/patch-sriovdp-resource-prefix.yaml.in diff --git a/cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/sriov-cni-daemonset.yaml b/cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/sriov-cni-daemonset.yaml similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/sriov-cni-daemonset.yaml rename to cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/sriov-cni-daemonset.yaml diff --git a/cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/sriov-ns.yaml b/cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/sriov-ns.yaml similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/sriov-ns.yaml rename to cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/sriov-ns.yaml diff --git a/cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/sriovdp-config.yaml.in b/cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/sriovdp-config.yaml.in similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/sriovdp-config.yaml.in rename to cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/sriovdp-config.yaml.in diff --git a/cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/sriovdp-daemonset.yaml b/cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/sriovdp-daemonset.yaml similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/sriov-components/manifests/sriovdp-daemonset.yaml rename to cluster-up/cluster/kind-1.22-sriov/sriov-components/manifests/sriovdp-daemonset.yaml diff --git a/cluster-up/cluster/kind-1.19-sriov/sriov-components/sriov_components.sh b/cluster-up/cluster/kind-1.22-sriov/sriov-components/sriov_components.sh similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/sriov-components/sriov_components.sh rename to cluster-up/cluster/kind-1.22-sriov/sriov-components/sriov_components.sh diff --git a/cluster-up/cluster/kind-1.19-sriov/sriov-node/configure_vfs.sh b/cluster-up/cluster/kind-1.22-sriov/sriov-node/configure_vfs.sh similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/sriov-node/configure_vfs.sh rename to cluster-up/cluster/kind-1.22-sriov/sriov-node/configure_vfs.sh diff --git a/cluster-up/cluster/kind-1.19-sriov/sriov-node/node.sh b/cluster-up/cluster/kind-1.22-sriov/sriov-node/node.sh similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/sriov-node/node.sh rename to cluster-up/cluster/kind-1.22-sriov/sriov-node/node.sh diff --git a/cluster-up/cluster/kind-1.19-sriov/sriov_operator.sh b/cluster-up/cluster/kind-1.22-sriov/sriov_operator.sh similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/sriov_operator.sh rename to cluster-up/cluster/kind-1.22-sriov/sriov_operator.sh diff --git a/cluster-up/cluster/kind-1.19-sriov/sriovdp_setup.sh b/cluster-up/cluster/kind-1.22-sriov/sriovdp_setup.sh similarity index 100% rename from cluster-up/cluster/kind-1.19-sriov/sriovdp_setup.sh rename to cluster-up/cluster/kind-1.22-sriov/sriovdp_setup.sh diff --git a/cluster-up/cluster/kind/check-cluster-up.sh b/cluster-up/cluster/kind/check-cluster-up.sh new file mode 100755 index 000000000000..f73877782d67 --- /dev/null +++ b/cluster-up/cluster/kind/check-cluster-up.sh @@ -0,0 +1,77 @@ +#!/bin/bash +# +# This file is part of the KubeVirt project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Copyright 2021 Red Hat, Inc. + +set -exuo pipefail + +SCRIPT_PATH=$(dirname "$(realpath "$0")") + +kubevirtci_path="$(realpath "${SCRIPT_PATH}/../../..")/" +PROVIDER_PATH="${kubevirtci_path}/cluster-up/cluster/${KUBEVIRT_PROVIDER}" + +RUN_KUBEVIRT_CONFORMANCE=${RUN_KUBEVIRT_CONFORMANCE:-"false"} + +( + cd $kubevirtci_path + kubectl="./cluster-up/kubectl.sh" + echo "Wait for pods to be ready.." + timeout 5m bash -c "until ${kubectl} wait --for=condition=Ready pod --timeout=30s --all -A; do sleep 1; done" + timeout 5m bash -c "until ${kubectl} wait --for=condition=Ready pod --timeout=30s -n kube-system --all; do sleep 1; done" + ${kubectl} get nodes + ${kubectl} get pods -A + echo "" + + nodes=$(${kubectl} get nodes --no-headers | awk '{print $1}') + for node in $nodes; do + node_exec="docker exec ${node}" + echo "[$node] network interfaces status:" + ${node_exec} ip a + echo "" + echo "[$node] route table:" + ${node_exec} ip r + echo "" + echo "[$node] hosts file:" + ${node_exec} cat /etc/hosts + echo "" + echo "[$node] resolve config:" + ${node_exec} cat /etc/resolv.conf + echo "" + done + + if [ "$RUN_KUBEVIRT_CONFORMANCE" == "true" ]; then + nightly_build_base_url="https://storage.googleapis.com/kubevirt-prow/devel/nightly/release/kubevirt/kubevirt" + latest=$(curl -sL "${nightly_build_base_url}/latest") + + echo "Deploy latest nighly build Kubevirt" + if [ "$(kubectl get kubevirts -n kubevirt kubevirt -ojsonpath='{.status.phase}')" != "Deployed" ]; then + ${kubectl} apply -f "${nightly_build_base_url}/${latest}/kubevirt-operator.yaml" + ${kubectl} apply -f "${nightly_build_base_url}/${latest}/kubevirt-cr.yaml" + fi + ${kubectl} wait -n kubevirt kv kubevirt --for condition=Available --timeout 15m + + echo "Run latest nighly build Kubevirt conformance tests" + kubevirt_plugin="--plugin ${nightly_build_base_url}/${latest}/conformance.yaml" + SONOBUOY_EXTRA_ARGS="${SONOBUOY_EXTRA_ARGS} ${kubevirt_plugin}" + + commit=$(curl -sL "${nightly_build_base_url}/${latest}/commit") + commit="${commit:0:9}" + container_tag="--plugin-env kubevirt-conformance.CONTAINER_TAG=${latest}_${commit}" + SONOBUOY_EXTRA_ARGS="${SONOBUOY_EXTRA_ARGS} ${container_tag}" + + hack/conformance.sh ${PROVIDER_PATH}/conformance.json + fi +) diff --git a/cluster-up/hack/common.sh b/cluster-up/hack/common.sh index 00dcf30fbd53..db3712b9703e 100644 --- a/cluster-up/hack/common.sh +++ b/cluster-up/hack/common.sh @@ -40,4 +40,4 @@ provider_prefix=${JOB_NAME:-${KUBEVIRT_PROVIDER}}${EXECUTOR_NUMBER} job_prefix=${JOB_NAME:-kubevirt}${EXECUTOR_NUMBER} mkdir -p $KUBEVIRTCI_CONFIG_PATH/$KUBEVIRT_PROVIDER -KUBEVIRTCI_TAG=2110191322-87b65c3 +KUBEVIRTCI_TAG=2110210919-bf9b729 diff --git a/cluster-up/version.txt b/cluster-up/version.txt index ec89c8770661..7f93bed3fed0 100644 --- a/cluster-up/version.txt +++ b/cluster-up/version.txt @@ -1 +1 @@ -2110191322-87b65c3 +2110210919-bf9b729 diff --git a/hack/config-default.sh b/hack/config-default.sh index 90f60ee8fcea..af157ea7c305 100644 --- a/hack/config-default.sh +++ b/hack/config-default.sh @@ -11,7 +11,7 @@ cdi_namespace=cdi image_pull_policy=${IMAGE_PULL_POLICY:-IfNotPresent} verbosity=${VERBOSITY:-2} package_name=${PACKAGE_NAME:-kubevirt-dev} -kubevirtci_git_hash="2110191322-87b65c3" +kubevirtci_git_hash="2110210919-bf9b729" conn_check_ipv4_address=${CONN_CHECK_IPV4_ADDRESS:-""} conn_check_ipv6_address=${CONN_CHECK_IPV6_ADDRESS:-""} conn_check_dns=${CONN_CHECK_DNS:-""}