Skip to content

Commit

Permalink
Support multiple SR-IOV networks
Browse files Browse the repository at this point in the history
This patch adopts changes from the latest SR-IOV device plugin master [1] that
allow us to attach a VMI to multiple SR-IOV Multus networks. (Before the
change, devices allocated for multiple networks could end up in different boot
order than configured.)

Among other things, this patch adds read access to network attachment
definitions to virt-controller role. This is to allow the controller to fetch
network CRD objects and determine their respective resource names. For this
same reason, it extends KubevirtClient object to include NetworkClient().

We do *not* maintain backwards compatibility with older SR-IOV device plugin
releases. This is as intended because SR-IOV support is still considered
experimental, and there is no good reason for us to support the device plugin
release that does not support multiple networks.

Updated documentation to reflect the fact that kubevirt is now compatible with
device plugin master (and *not* compatible with v1.0).

todo: get rid of vendor/* change

[1] k8snetworkplumbingwg/sriov-network-device-plugin#26
  • Loading branch information
booxter authored and Greg Bock committed Nov 30, 2018
1 parent 8b56df2 commit ce024de
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/virt-controller/services/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import (
. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
networkv1 "github.com/phoracek/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1"
fakenetworkclient "github.com/phoracek/network-attachment-definition-client/pkg/client/clientset/versioned/fake"
kubev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
1 change: 1 addition & 0 deletions pkg/virt-controller/watch/migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
fakenetworkclient "github.com/phoracek/network-attachment-definition-client/pkg/client/clientset/versioned/fake"
k8sv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ce024de

Please sign in to comment.