-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hotplug feature: add pod networks annotation controller #777
hotplug feature: add pod networks annotation controller #777
Conversation
2434098
to
f99f08e
Compare
This forced push features:
|
Pull Request Test Coverage Report for Build 1993977572
💛 - Coveralls |
c99daa7
to
df801b2
Compare
@s1061123 I think the approach you shared offline is in line w/ this commit: df801b2 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 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. |
249a538
to
3d4cb6d
Compare
Multus is refactored as a thick plugin, featuring 2 main components: - a server listening to a unix domain socket, running in a pod - a shim, a binary on the host that will send JSON requests built from its environment / stdin values to the aforementioned server. The pod where the multus daemon is running must share the host's PID namespace. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Without this patch, we're blindly trusting anything sent by the server. This way, we assure the requests arriving at the multus controller are valid before hand. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Also add a new command line parameter on the multus controller, pointing it to the server configuration. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
CNI is already filling the args structure; we should consume that rather than rely on the environment variables. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Refactor multus as a thick plugin
setenv refers environment variables, which is unique in process, not unique to go routine. Hence it may causes some issue in multi threaded case, hence it is replaced with libcni's runtimeConfig value set to set these variables at libcni side, after process fork.
This change make binary file and directory name consistent. In addition, change the package name cni to server because cni is a bit umbiguous for cni plugin's repository.
To simplify multus unit tests, split it into several files, based on testing CNI version.
…lumbingwg#798) * multus: entrypoint: disallow incompatible cni versions When top level CNI version is 0.4.0 or more, nested CNI version can't be less than 0.4.0 since these are incompatible. This closes issue k8snetworkplumbingwg#737. Signed-off-by: Balazs Nemeth <[email protected]> * multus: thick: disallow incompatible cni versions Similarly to disallowing incompatible versions in entrypoint.sh, add the same logic in go for the thick plugin. Signed-off-by: Balazs Nemeth <[email protected]> * multus: add unit test for incompatible cni versions Signed-off-by: Balazs Nemeth <[email protected]> Co-authored-by: Balazs Nemeth <[email protected]>
…multus_ut Split multus unit tests into several files
Support CNI 1.0.0
d742b2e
to
7c8c099
Compare
Signed-off-by: Miguel Duarte Barroso <[email protected]>
A follow-up PR will add the cri-o runtime. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Introduce tests to check: - hotplug a new interface - remove an old interface Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
This commit defines the controller constructor: - use informer factories instead of passing the client - inject the container runtime into the controller Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
By using the queue, we can re-queue when the request fails, which makes the solution more robust. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
7c8c099
to
a8ce32c
Compare
64b08ca
to
bf4d6c7
Compare
runtime = newDummyCrioRuntime(fake.WithCachedContainer(containerID, netnsPath)) | ||
}) | ||
|
||
It("cannot extract the network namespace of a container", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the it clause description is wrong, probably a copy paste error.
/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. |
Features:
TODO: