Skip to content

Commit 416926c

Browse files
committed
Network binding plugin: Address compute container resource overhead
Signed-off-by: Orel Misan <[email protected]>
1 parent d1d4dd5 commit 416926c

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

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

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,58 @@ Cons:
303303
- Additional point of failure.
304304
- Additional latency when creating VMs with network binding plugins.
305305

306+
##### Compute Container Resource Requirements / Limits
307+
308+
For some plugins, such as passt, there is a need to execute an additional binary in the compute container.
309+
Since this binary has its own CPU and memory limits, they should be somehow accounted for.
310+
311+
Alternatives:
312+
1. Manually setting the VM's resources:
313+
The user can override KubeVirt's algorithms and set resource requirements.
314+
315+
Pros:
316+
- Already implemented.
317+
318+
Cons:
319+
- Error prune
320+
- The user does not take into account the overhead considerations KubeVirt takes when templating a virt-launcher pod.
321+
322+
2. Additional API for compute container resource overhead:
323+
324+
The network binding plugin API in the KubeVirt CR could receive an additional input field to specify the resource requirements overhead for the compute container:
325+
326+
```yaml
327+
apiVersion: kubevirt.io/v1
328+
kind: KubeVirt
329+
metadata:
330+
name: kubevirt
331+
namespace: kubevirt
332+
spec:
333+
configuration:
334+
network:
335+
binding:
336+
mynetbindingplugin:
337+
sidecarImage: quay.io/kubevirt/mynetbindingplugin
338+
computeContainerResourceOverhead:
339+
requests:
340+
cpu: 200m
341+
memory: 20Mi
342+
```
343+
344+
Pros:
345+
- Cluster-wide definition of network binding plugin compute resource overhead per plugin.
346+
- Additional resources could be requested other than CPU and Memory.
347+
348+
Cons:
349+
- Require an API change.
350+
- The API will probably evolve as additional plugins will be created.
351+
- May require cluster admins to adjust plugin resources during the plugin's lifecycle.
352+
353+
3. Mutating for the virt-launcher pod:
354+
355+
Same suggestion as in the sidecar section.
356+
357+
The webhook will add the required resource overhead for the compute container.
306358

307359
#### Configure Pod netns
308360

0 commit comments

Comments
 (0)