Skip to content

Commit a3e8ffb

Browse files
committed
kind-sriov: Allow to use DRA
In order to allow using DRA driver, export KUBEVIRT_USE_DRA=true. It will skip installing the DP and CNI, DRA (and the included CNI) will need to be installed manually for now. We still create VFs, and unbind them. It suits vfio driver of DRA. Signed-off-by: Or Shoval <[email protected]>
1 parent 748176b commit a3e8ffb

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

cluster-up/cluster/kind-sriov/config_sriov_cluster.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set -xe
66

77
PF_COUNT_PER_NODE=${PF_COUNT_PER_NODE:-1}
88
[ $PF_COUNT_PER_NODE -le 0 ] && echo "FATAL: PF_COUNT_PER_NODE must be a positive integer" >&2 && exit 1
9+
KUBEVIRT_USE_DRA=${KUBEVIRT_USE_DRA:-false}
910

1011
SCRIPT_PATH=$(dirname "$(realpath "$0")")
1112

@@ -59,14 +60,18 @@ node::configure_sriov_vfs "${worker_nodes[*]}" "$VFS_DRIVER" "$VFS_DRIVER_KMODUL
5960

6061
## Deploy Multus and SRIOV components
6162
sriov_components::deploy_multus
62-
sriov_components::deploy \
63+
64+
if [[ "$KUBEVIRT_USE_DRA" != "true" ]]; then
65+
sriov_components::deploy \
6366
"$PFS_IN_USE" \
6467
"$VFS_DRIVER" \
6568
"$SRIOVDP_RESOURCE_PREFIX" "$SRIOVDP_RESOURCE_NAME" \
6669
"$SRIOV_NODE_LABEL_KEY" "$SRIOV_NODE_LABEL_VALUE"
6770

68-
# Verify that each sriov capable node has sriov VFs allocatable resource
69-
validate_nodes_sriov_allocatable_resource
71+
# Verify that each sriov capable node has sriov VFs allocatable resource
72+
validate_nodes_sriov_allocatable_resource
73+
fi
74+
7075
sriov_components::wait_pods_ready
7176

7277
_kubectl get nodes

0 commit comments

Comments
 (0)