Skip to content

Commit

Permalink
Network binding plugin: Address compute container resource overhead
Browse files Browse the repository at this point in the history
Signed-off-by: Orel Misan <[email protected]>
  • Loading branch information
orelmisan committed Jun 23, 2024
1 parent d1d4dd5 commit 416926c
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions design-proposals/network-binding-plugin/network-binding-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,58 @@ Cons:
- Additional point of failure.
- Additional latency when creating VMs with network binding plugins.

##### Compute Container Resource Requirements / Limits

For some plugins, such as passt, there is a need to execute an additional binary in the compute container.
Since this binary has its own CPU and memory limits, they should be somehow accounted for.

Alternatives:
1. Manually setting the VM's resources:
The user can override KubeVirt's algorithms and set resource requirements.

Pros:
- Already implemented.

Cons:
- Error prune
- The user does not take into account the overhead considerations KubeVirt takes when templating a virt-launcher pod.

2. Additional API for compute container resource overhead:

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:

```yaml
apiVersion: kubevirt.io/v1
kind: KubeVirt
metadata:
name: kubevirt
namespace: kubevirt
spec:
configuration:
network:
binding:
mynetbindingplugin:
sidecarImage: quay.io/kubevirt/mynetbindingplugin
computeContainerResourceOverhead:
requests:
cpu: 200m
memory: 20Mi
```

Pros:
- Cluster-wide definition of network binding plugin compute resource overhead per plugin.
- Additional resources could be requested other than CPU and Memory.

Cons:
- Require an API change.
- The API will probably evolve as additional plugins will be created.
- May require cluster admins to adjust plugin resources during the plugin's lifecycle.

3. Mutating for the virt-launcher pod:

Same suggestion as in the sidecar section.

The webhook will add the required resource overhead for the compute container.

#### Configure Pod netns

Expand Down

0 comments on commit 416926c

Please sign in to comment.