From 6e35be6f2483bc914798cf104663c1d72e9fc44a Mon Sep 17 00:00:00 2001 From: Charles CAPORALI Date: Thu, 14 Nov 2024 16:51:53 +0100 Subject: [PATCH] Updating the README for the lxn-bridge option --- README.md | 29 +++++++++++++++++++++++++++++ cmd/k8s-netperf/k8s-netperf.go | 1 - 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6fa1d79..90caffe 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,35 @@ If the two above are in place, users can orhestrate k8s-netperf to launch VMs by `k8s-netperf --vm` +### Using a linux bridge interface +When using `--bridge`, a NetworkAttachmentDefinition defining a bridge interface is attached to the VMs and is used for the test. It requires the name of the bridge as it is defined in the NetworkNodeConfigurationPolicy, NMstate operator is required. For example: +```yaml +apiVersion: nmstate.io/v1alpha1 +kind: NodeNetworkConfigurationPolicy +metadata: + name: br0-eth1 +spec: + desiredState: + interfaces: + - name: br0 + description: Linux bridge with eno2 as a port + type: linux-bridge + state: up + ipv4: + dhcp: true + enabled: true + bridge: + options: + stp: + enabled: false + port: + - name: eno2 +``` +Then you can launch a test using the bridge interface: +``` +./bin/amd64/k8s-netperf --vm --bridge br0 +``` + ### Config file #### Config File v2 The v2 config file will be executed in the order the tests are presented in the config file. diff --git a/cmd/k8s-netperf/k8s-netperf.go b/cmd/k8s-netperf/k8s-netperf.go index b454e90..fd25445 100644 --- a/cmd/k8s-netperf/k8s-netperf.go +++ b/cmd/k8s-netperf/k8s-netperf.go @@ -183,7 +183,6 @@ var rootCmd = &cobra.Command{ log.Error(err) } s.KClient = kclient - s.DClient = dynClient if len(bridge) > 0 { err := k8s.DeployNADBridge(s.DClient, bridge) if err != nil {