kubevirt / cluster-network-addons-operator

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

OVS-cni installation in OpenShift #1600

Closed ydguala closed 1 year ago

ydguala commented 1 year ago

What happened: Using de Cluster Network Addons Operator (CNAO) to install open vSwitch cni / ovs-cni is not deploying the ovs-cni deployment pods in OpenShift 4.13

What you expected to happen: ovs-cni installed

How to reproduce it (as minimally and precisely as possible): As per procedure described here, adding an empty object 'ovs' on the specs of cluster object of type NetworkAddonsConfig) is not deploying the ovs-cni pods.

apiVersion: networkaddonsoperator.network.kubevirt.io/v1
kind: NetworkAddonsConfig
metadata:
  name: cluster
spec:
  ovs: {}

Anything else we need to know?: WORKAROUND? In OpenShift 4.13 with OpenShift Virtualization, the ovs-cni installation is managed by the hyperconverged cluster operator (HCO) in an annotation in the HyperConverged objects:

https://github.com/kubevirt/hyperconverged-cluster-operator/blob/main/docs/cluster-configuration.md#ovs-opt-in-annotation

apiVersion: hco.kubevirt.io/v1beta1
kind: HyperConverged
metadata:
  annotations:
    deployOVS: "true"
...

Environment:

oshoval commented 1 year ago

Hi, Please elaborate what is not working (logs, failure messages) for example you might miss openvswitch service etc

ydguala commented 1 year ago

Hi, Please elaborate what is not working (logs, failure messages) for example you might miss openvswitch service etc

Issue description updated with more details. Please note the workaround/solution is mentioned in section "Anything else we need to know?"

oshoval commented 1 year ago

Hi, it is expected that the only method to deploy Ovs CNI is by deployOVS and not anymore as part of the NetworkAddonsConfig. Adding it via NetworkAddonsConfig is not supported anymore, the annotation way was added to still support in case it need to be deployed.

ydguala commented 1 year ago

Hi, it is expected that the only method to deploy Ovs CNI is by deployOVS and not anymore as part of the NetworkAddonsConfig. Adding it via NetworkAddonsConfig is not supported anymore, the annotation way was added to still support in case it need to be deployed.

Great, then that should be reflected in the documentation, can someone update it please?

oshoval commented 1 year ago

It is already there - when using HCO, it is according the link you mentioned

Starting from HCO version 1.3.0, OvS CNI support is disabled by default on new installations.
In order to enable the deployment of OvS CNI DaemonSet on all workload nodes, an annotation of deployOVS: true must be set on HyperConverged CR.

HCO controls CNAO CR, the CR should not be changed manually, it will be reconciled. Only feature gates and labels like this one are the user interface that affect the CR, therefore imho the current text is sufficient.

ydguala commented 1 year ago

It is already there - when using HCO, it is according the link you mentioned

Starting from HCO version 1.3.0, OvS CNI support is disabled by default on new installations.
In order to enable the deployment of OvS CNI DaemonSet on all workload nodes, an annotation of deployOVS: true must be set on HyperConverged CR.

HCO controls CNAO CR, the CR should not be changed manually, it will be reconciled. Only feature gates and labels like this one are the user interface that affect the CR, therefore imho the current text is sufficient.

Fullly agree. But, in the https://github.com/kubevirt/cluster-network-addons-operator#open-vswitch documentation there should be a link or reference to https://github.com/kubevirt/hyperconverged-cluster-operator/blob/main/docs/cluster-configuration.md#ovs-opt-in-annotation

oshoval commented 1 year ago

https://github.com/kubevirt/cluster-network-addons-operator#open-vswitch is relevant only when CNAO is deployed standalone HCO is wrapping it, and then adding the information that is relevant. when CNAO is standalone, HCO should not be mentioned imo

ydguala commented 1 year ago

Agree, thanks!