ovn-org / ovn-kubernetes

A robust Kubernetes networking platform
https://ovn-kubernetes.io/
Apache License 2.0
767 stars 333 forks source link

NAD controller refactor #4461

Closed jcaamano closed 1 day ago

jcaamano commented 1 week ago

Splits the controller in two, one level driven controller for NADs as before, plus another level driven controller for networks.

Allows to independently track networks from NADs. Facilitates creating networks from sources other than NADs in the future. Solves problems deleting networks that were referenced from NADs that later on reference a different network. Allows NAD update handling.

Controllers implementation is based on the controller util.

coveralls commented 1 week ago

Coverage Status

coverage: 52.757% (+0.01%) from 52.747% when pulling ae93d4693693c2b549ba43f5cad3643fd4b02a66 on jcaamano:nad-controller-refactor into afd362fc240c75decc6b915ba3c211734afe541d on ovn-org:master.

coveralls commented 1 week ago

Coverage Status

coverage: 52.73% (-0.02%) from 52.747% when pulling 596bf5de87db54473715dee42d11f87092e51a0f on jcaamano:nad-controller-refactor into afd362fc240c75decc6b915ba3c211734afe541d on ovn-org:master.

coveralls commented 1 week ago

Coverage Status

coverage: 52.735% (-0.01%) from 52.747% when pulling 21b5de0c03ff2aa29ca34d98a398f6d1861fa9dd on jcaamano:nad-controller-refactor into afd362fc240c75decc6b915ba3c211734afe541d on ovn-org:master.

coveralls commented 1 week ago

Coverage Status

coverage: 52.723% (-0.02%) from 52.747% when pulling 3911d4686ea955da1bf6a3cd7b49108a9957be2e on jcaamano:nad-controller-refactor into afd362fc240c75decc6b915ba3c211734afe541d on ovn-org:master.

jcaamano commented 1 week ago

You are introducing NAD updates; how does that reflect on the network to which the NAD grants access to ?

If the NAD is updated pointing to a new network, the NAD reference is removed from the old network (deleted if no longer referenced) and added to the new network (if compatible, or created if new).

This is just equivalent to deleting the NAD and creating it again with a different config.

jcaamano commented 1 week ago

You are introducing NAD updates; how does that reflect on the network to which the NAD grants access to ?

If the NAD is updated pointing to a new network, the NAD reference is removed from the old network (deleted if no longer referenced) and added to the new network (if compatible, or created if new).

This is just equivalent to deleting the NAD and creating it again with a different config.

I have tweaked the logic a bit but that's the general idea: NAD update is equivalent to deleting the NAD and creating it again.

coveralls commented 1 week ago

Coverage Status

coverage: 52.747%. remained the same when pulling 08e7f5ef5cf784e48546a6e420a5abb00990e808 on jcaamano:nad-controller-refactor into afd362fc240c75decc6b915ba3c211734afe541d on ovn-org:master.

coveralls commented 4 days ago

Coverage Status

coverage: 52.668% (-0.08%) from 52.747% when pulling a6184975380b8ab53a1f06fe1a3546372f61d959 on jcaamano:nad-controller-refactor into afd362fc240c75decc6b915ba3c211734afe541d on ovn-org:master.

coveralls commented 4 days ago

Coverage Status

coverage: 52.631% (-0.08%) from 52.707% when pulling 14d05db97bc743201c3009f41f4a0c0df9ad82e3 on jcaamano:nad-controller-refactor into ebf2c6849cbd2f5164b9f062892a7b8483892ea4 on ovn-org:master.

coveralls commented 4 days ago

Coverage Status

coverage: 52.631% (-0.08%) from 52.707% when pulling 3ea959c66f59579d985e9783c8f87af41dac25a3 on jcaamano:nad-controller-refactor into ebf2c6849cbd2f5164b9f062892a7b8483892ea4 on ovn-org:master.

coveralls commented 4 days ago

Coverage Status

coverage: 52.7% (-0.007%) from 52.707% when pulling 735a0ead6f2088c01f6ad468705cf6c5a83e6bf1 on jcaamano:nad-controller-refactor into ebf2c6849cbd2f5164b9f062892a7b8483892ea4 on ovn-org:master.

coveralls commented 3 days ago

Coverage Status

Changes unknown when pulling 72e54ec2d2261bb90a1e241204d8a24824230490 on jcaamano:nad-controller-refactor into on ovn-org:master.

jcaamano commented 3 days ago

rebased and resolved conflicts for factory.go

jcaamano commented 2 days ago

For run https://github.com/ovn-org/ovn-kubernetes/actions/runs/9667215971/job/26703058720?pr=4461

  [FAIL] e2e egress IP validation [OVN network] Using different methods to disable a node's availability for egress Should validate the egress IP functionality against remote hosts [It] disabling egress nodes impeding GRCP health check

known flake https://github.com/ovn-org/ovn-kubernetes/issues/4144

For run https://github.com/ovn-org/ovn-kubernetes/actions/runs/9667215971/job/26703057307?pr=4461

 [FAIL] External Gateway With Admin Policy Based External Route CRs e2e non-vxlan external gateway through a gateway pod Should validate ICMP connectivity to an external gateway's loopback address via a gateway pod [It] ipv4

registered new flake https://github.com/ovn-org/ovn-kubernetes/issues/4474 but probably related to https://github.com/ovn-org/ovn-kubernetes/issues/4432 and/or https://github.com/ovn-org/ovn-kubernetes/issues/4139

Rerunning...