Skip to content

Commit ed97ca9

Browse files
committed
Network binding plugin: Support memory overhead
Currently, the passt network binding plugin requires the execution of a dedicated `passt` binary inside the compute container of the virt-launcher pod. This binary requires additional memory overhead to be requested for the virt-launcher pod. The deprecated passt binding used to require additional 800Mi of memory when forwarding all ports [1] before it was finally removed in [2]. Add additional field to the network binding plugin API in the KubeVirt CR that will enable the user to specify how much additional memory (if any) to request for the compute container in the virt-launcher pod. [1] https://github.com/kubevirt/kubevirt/blob/1732a6d12839836ca65241722c3ecfe14df480fd/pkg/virt-controller/services/renderresources.go#L395 [2] kubevirt/kubevirt#11915 Signed-off-by: Orel Misan <[email protected]>
1 parent 49fa6c5 commit ed97ca9

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

design-proposals/network-binding-plugin/network-binding-plugin.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ the binding is referenced by name with optional additional arguments.
189189
- domainAttachment (a standard domain definition that exists in
190190
the core . E.g `tap`, `sriov`).
191191
- downwardAPI (E.g `device-info`)
192+
- resourceOverhead (currently only additional memory overhead request for the compute container in the virt-launcher pod is supported)
192193
- VMI Specification CR:
193194
- Define a new binding subtree under spec-domain-devices-interfaces.
194195
Each interface has a binding subtree that contains a required name
@@ -387,6 +388,11 @@ Alternatives passing the domain attachment to sync VMI:
387388
Both of the options are not perfect, but the `virt-handler.SyncVMI`
388389
has fewer cons. Therefore, it was chosen.
389390

391+
#### Additional resource requests for the virt-launcher compute container
392+
Some binding plugins may require an additional binary to be shipped inside the virt-launcher compute image.
393+
This binary requires additional resources that have to be explicitly stated.
394+
Currently, the API will only support requesting additional memory overhead for the compute container.
395+
390396
### Planning
391397

392398
- Collect scenarios from the community contributors & users.
@@ -1173,7 +1179,8 @@ point, considering the option suggested in the
11731179
### Kubevirt CR Specification
11741180

11751181
The passt-binding is registered to the Kubevirt CR, including the
1176-
reference to the network-attachment-definition and the sidecar image.
1182+
reference to the network-attachment-definition, the sidecar image
1183+
and the memory overhead it requires for the compute container.
11771184
The plugin is then referenced by name from the VM Specification.
11781185

11791186
```yaml
@@ -1191,6 +1198,8 @@ spec:
11911198
sidecarImage: quay.io/kubevirt/network-passt-binding
11921199
migration:
11931200
method: link-refresh
1201+
resourceOverhead:
1202+
memory: 800Mi
11941203
```
11951204

11961205
### VM Specification
@@ -1261,6 +1270,10 @@ metadata:
12611270
k8s.v1.cni.cncf.io/networks: '[{"name":"netbindingpasst","namespace":"mynamespace","cni-args":{"logicNetworkName":"default"}}]'
12621271
spec:
12631272
containers:
1273+
- name: compute
1274+
resources:
1275+
requests:
1276+
memory: <some_value> + <overhead>
12641277
- name: hook-sidecar-0
12651278
image: quay.io/kubevirt/network-passt-binding
12661279
```

0 commit comments

Comments
 (0)