kubevirt / cluster-network-addons-operator

Deploy additional networking components on top of your Kubernetes cluster
Apache License 2.0
71 stars 49 forks source link

Allow configuration of Multus dynamic networking plugin #1804

Open playworker opened 4 months ago

playworker commented 4 months ago

Is your feature request related to a problem? Please describe: The default configmap for Multus dynamic networking plugin has settings which I need to change - specifically CRIO type and the CRIO socket location

Describe the solution you'd like: It would be great if those config entries could be configured in the operator config, alternatively a feature like you have for one of the other plugins (macvtap?) where you can specify an alternative ConfigMap to use would also work

Describe alternatives you've considered: Installing Multus and the dynamic network plugin manually is an option, renders this operator a bit redundant though :)

oshoval commented 1 month ago

Hi, can you please provide example of the difference you rendered manually ? Thanks

playworker commented 1 month ago

Hi, essentially I think it's the difference between these two manifests:

https://github.com/k8snetworkplumbingwg/multus-dynamic-networks-controller/blob/main/manifests/crio-dynamic-networks-controller.yaml

https://github.com/k8snetworkplumbingwg/multus-dynamic-networks-controller/blob/main/manifests/dynamic-networks-controller.yaml

64c64
<         "criSocketPath": "/host/run/containerd/containerd.sock",
---
>         "criSocketPath": "/host/run/crio/crio.sock",
131c131
<               mountPath: /host/run/containerd/containerd.sock
---
>               mountPath: /host/run/crio/crio.sock
146c146
<              path: /run/containerd/containerd.sock
---
>              path: /run/crio/crio.sock

From the Readme:

Configuration

The multus-dynamic-networks-controller configuration is encoded in JSON, and allows the following keys:

"criSocketPath": specify the path to the CRI socket. Defaults to /run/containerd/containerd.sock.
"multusSocketPath": specify the path to the multus socket. Defaults to /var/run/multus-cni/multus.sock.

The configuration is defined in a ConfigMap, which is defined in the installation manifest, and mounted into the pod.

The name of the ConfigMap is dynamic-networks-controller-config.

When I installed the plugin using this operator the CRIO version was installed, but as my cluster used containerd it didn't work, I was unable to edit the configmap mentioned in the docs as the operator just replaced it.

maiqueb commented 1 month ago

I think we can change the API to plumb a socket instead of using different atributes.