multus-cni
multus-cni copied to clipboard
hotplug feature: add pod networks annotation controller
Features:
- a very opinionated refactor of multus, allowing its delegate handling functions to be called outside the package
- a controller listening to multus annotations. When the multus annotations changes, it will invoke the corresponding delegate
- e2e tests
- two runtimes (required to read to network namespace of the pod being updated - which is a CNI parameter)
- containerd
- crio
- unit tests of every new package
TODO:
- figure out what is holding this PR
- act upon revive's comments
This forced push features:
- removed the status condition updates
- fixed revive's comments (causing the unit test jobs to fail).
Pull Request Test Coverage Report for Build 1993977572
- 59 of 165 (35.76%) changed or added relevant lines in 5 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-2.3%) to 64.81%
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
---|---|---|---|
pkg/types/conf.go | 0 | 3 | 0.0% |
pkg/k8sclient/k8sclient.go | 16 | 21 | 76.19% |
pkg/multus/multus.go | 39 | 52 | 75.0% |
pkg/types/extractors.go | 0 | 85 | 0.0% |
<!-- | Total: | 59 | 165 |
Totals | |
---|---|
Change from base Build 1952559576: | -2.3% |
Covered Lines: | 1722 |
Relevant Lines: | 2657 |
💛 - Coveralls
@s1061123 I think the approach you shared offline is in line w/ this commit: https://github.com/k8snetworkplumbingwg/multus-cni/pull/777/commits/df801b2e92860769fe18b2b429bf33d1ec995a82
I would appreciate if you'd help me understand how to build the missing data on the controller.
Furthermore, a logic split is required on the multus CmdAdd
function.
If we take this route, when the time comes to handle the default route update, another serious refactor on the multus pkg will be required.
/assign @martinkennelly
This is being implemented in https://github.com/maiqueb/multus-dynamic-networks-controller/, now that a 3rd party controller with access to the multus thick-plugin socket can trigger delegate add / delete.