Or Shoval
Or Shoval
Addressed https://github.com/kubevirt/kubevirt/pull/11410#discussion_r1511101185
Extracted IPAM / `allowPersistentIPs` knob related functions to a new file Refactor the IPAM functions a bit (splitting compose logic from creation logic, allowing easier unit testing and readability)
Removed some wrong little optimization attempt
1st push Refactored `GetNetworkToIPAMClaimName` to fetch filtered network list Extracted validate IPAMClaim to a function (will also ease unit testing of it) 2nd push - rebase
1. Cherry-picked https://github.com/kubevirt/kubevirt/pull/11475 until it is merged (needed for the new unit tests that i am going to add). EDIT - already removed, disregard. 2. Removed unrequired code for migration,...
Rebased (removes https://github.com/kubevirt/kubevirt/pull/11475 cherry-pick)
addressed comments (beside the ones that have discussion) fixed small additional typos
Removed the FG boolean from the functions parameters, check it directly only on the leaf `GenerateMultusCNIAnnotationFromNameScheme` which already has the config anyhow. Do not check it at all when creating...
Addressed comments (as close as i could)
pass `networkToIPAMClaimName` to `updateMultusAnnotation` this makes the unit testing of it easier since no need to create the NADs (unit tests are not done yet)