-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update kubevirtci, 1.30 lanes (#3343)
* Bump kvci to latest Signed-off-by: Alex Kalenyuk <[email protected]> * Switch testing lanes to 1.30/1.29 Signed-off-by: Alex Kalenyuk <[email protected]> * Revert "Add W/A for NFS OOMKills" kubevirt/kubevirt#10822 (comment) This reverts commit aba7803. Signed-off-by: Alex Kalenyuk <[email protected]> --------- Signed-off-by: Alex Kalenyuk <[email protected]>
- Loading branch information
Showing
28 changed files
with
407 additions
and
33 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
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
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
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
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
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
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
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
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
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
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
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
File renamed without changes.
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
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
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,19 @@ | ||
#!/bin/bash | ||
|
||
[ $(id -u) -ne 0 ] && echo "FATAL: this script requires sudo privileges" >&2 && exit 1 | ||
|
||
set -xe | ||
|
||
SCRIPT_PATH=$(dirname "$(realpath "$0")") | ||
|
||
source ${SCRIPT_PATH}/vgpu-node/node.sh | ||
echo "_kubectl: " ${_kubectl} | ||
echo "KUBEVIRTCI_PATH: " ${KUBEVIRTCI_PATH} | ||
source ${KUBEVIRTCI_PATH}/cluster/kind/common.sh | ||
echo "_kubectl: " ${_kubectl} | ||
|
||
nodes=($(_kubectl get nodes -o custom-columns=:.metadata.name --no-headers)) | ||
node::remount_sysfs "${nodes[*]}" | ||
node::discover_host_gpus | ||
|
||
_kubectl get nodes |
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,47 @@ | ||
{ | ||
"Description": "DEFAULT", | ||
"UUID": "", | ||
"Version": "v0.56.9", | ||
"ResultsDir": "/tmp/sonobuoy/results", | ||
"Resources": null, | ||
"Filters": { | ||
"Namespaces": ".*", | ||
"LabelSelector": "" | ||
}, | ||
"Limits": { | ||
"PodLogs": { | ||
"Namespaces": "kube-system", | ||
"SonobuoyNamespace": true, | ||
"FieldSelectors": [], | ||
"LabelSelector": "", | ||
"Previous": false, | ||
"SinceSeconds": null, | ||
"SinceTime": null, | ||
"Timestamps": false, | ||
"TailLines": null, | ||
"LimitBytes": null | ||
} | ||
}, | ||
"QPS": 30, | ||
"Burst": 50, | ||
"Server": { | ||
"bindaddress": "0.0.0.0", | ||
"bindport": 8080, | ||
"advertiseaddress": "", | ||
"timeoutseconds": 21600 | ||
}, | ||
"Plugins": null, | ||
"PluginSearchPath": [ | ||
"./plugins.d", | ||
"/etc/sonobuoy/plugins.d", | ||
"~/sonobuoy/plugins.d" | ||
], | ||
"Namespace": "sonobuoy", | ||
"WorkerImage": "sonobuoy/sonobuoy:v0.56.9", | ||
"ImagePullPolicy": "IfNotPresent", | ||
"ImagePullSecrets": "", | ||
"AggregatorPermissions": "clusterAdmin", | ||
"ServiceAccountName": "sonobuoy-serviceaccount", | ||
"ProgressUpdatesPort": "8099", | ||
"SecurityContextMode": "nonroot" | ||
} |
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 @@ | ||
kindest/node:v1.30.0@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e |
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,58 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
DEFAULT_CLUSTER_NAME="vgpu" | ||
DEFAULT_HOST_PORT=5000 | ||
ALTERNATE_HOST_PORT=5001 | ||
export CLUSTER_NAME=${CLUSTER_NAME:-$DEFAULT_CLUSTER_NAME} | ||
|
||
if [ $CLUSTER_NAME == $DEFAULT_CLUSTER_NAME ]; then | ||
export HOST_PORT=$DEFAULT_HOST_PORT | ||
else | ||
export HOST_PORT=$ALTERNATE_HOST_PORT | ||
fi | ||
|
||
function set_kind_params() { | ||
version=$(cat cluster-up/cluster/$KUBEVIRT_PROVIDER/version) | ||
export KIND_VERSION="${KIND_VERSION:-$version}" | ||
|
||
image=$(cat cluster-up/cluster/$KUBEVIRT_PROVIDER/image) | ||
export KIND_NODE_IMAGE="${KIND_NODE_IMAGE:-$image}" | ||
} | ||
|
||
function configure_registry_proxy() { | ||
[ "$CI" != "true" ] && return | ||
|
||
echo "Configuring cluster nodes to work with CI mirror-proxy..." | ||
|
||
local -r ci_proxy_hostname="docker-mirror-proxy.kubevirt-prow.svc" | ||
local -r kind_binary_path="${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/.kind" | ||
local -r configure_registry_proxy_script="${KUBEVIRTCI_PATH}/cluster/kind/configure-registry-proxy.sh" | ||
|
||
KIND_BIN="$kind_binary_path" PROXY_HOSTNAME="$ci_proxy_hostname" $configure_registry_proxy_script | ||
} | ||
|
||
function up() { | ||
# print hardware info for easier debugging based on logs | ||
echo 'Available cards' | ||
${CRI_BIN} run --rm --cap-add=SYS_RAWIO quay.io/phoracek/lspci@sha256:0f3cacf7098202ef284308c64e3fc0ba441871a846022bb87d65ff130c79adb1 sh -c "lspci -k | grep -EA2 'VGA|3D'" | ||
echo "" | ||
|
||
cp $KIND_MANIFESTS_DIR/kind.yaml ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml | ||
_add_extra_mounts | ||
kind_up | ||
|
||
configure_registry_proxy | ||
|
||
# remove the rancher.io kind default storageClass | ||
_kubectl delete sc standard | ||
|
||
${KUBEVIRTCI_PATH}/cluster/$KUBEVIRT_PROVIDER/config_vgpu_cluster.sh | ||
|
||
echo "$KUBEVIRT_PROVIDER cluster '$CLUSTER_NAME' is ready" | ||
} | ||
|
||
set_kind_params | ||
|
||
source ${KUBEVIRTCI_PATH}/cluster/kind/common.sh |
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 @@ | ||
0.23.0 |
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,32 @@ | ||
#!/bin/bash | ||
|
||
function node::discover_host_gpus() { | ||
local -r gpu_types=( $(find /sys/class/mdev_bus/*/mdev_supported_types) ) | ||
[ "${#gpu_types[@]}" -eq 0 ] && echo "FATAL: Could not find available GPUs on host" >&2 && return 1 | ||
|
||
local gpu_addr | ||
local gpu_addresses=() | ||
for path in "${gpu_types}"; do | ||
gpu_addr="${gpu_types#/sys/class/mdev_bus/}" | ||
gpu_addr=${gpu_addr%/*} | ||
|
||
gpu_addresses+=( $gpu_addr ) | ||
done | ||
|
||
echo "${gpu_addresses[@]}" | ||
} | ||
|
||
function node::remount_sysfs() { | ||
local -r nodes_array=($1) | ||
local node_exec | ||
|
||
for node in "${nodes_array[@]}"; do | ||
|
||
# KIND mounts sysfs as read-only by default, remount as R/W" | ||
node_exec="${CRI_BIN} exec $node" | ||
$node_exec mount -o remount,rw /sys | ||
$node_exec chmod 666 /dev/vfio/vfio | ||
|
||
done | ||
} | ||
|
Oops, something went wrong.