Skip to content
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

Initial work to support dynamic multiple CNI configurations #113

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MikeZappa87
Copy link
Contributor

@MikeZappa87 MikeZappa87 commented Aug 2, 2023

This PR will enable dynamic multiple cni networks to be executed. A large effort is happening in the K8s ecosystem referred to as 'Multi-Network' this will support that. Multiple PR's will follow in containerd to upddate go-cni and provide the code to enable this in the cri containerd plugin.

@MikeZappa87 MikeZappa87 force-pushed the issue/multi-network-support branch 3 times, most recently from 87621fe to 196f34f Compare August 2, 2023 03:31
@MikeZappa87 MikeZappa87 marked this pull request as ready for review August 2, 2023 03:33
cni.go Outdated Show resolved Hide resolved
@MikeZappa87 MikeZappa87 marked this pull request as draft August 2, 2023 16:33
@MikeZappa87 MikeZappa87 marked this pull request as ready for review August 2, 2023 17:53
@AkihiroSuda
Copy link
Member

Please squash commits

@MikeZappa87 MikeZappa87 force-pushed the issue/multi-network-support branch from cdadd4a to 46c60c5 Compare August 2, 2023 18:06
@MikeZappa87
Copy link
Contributor Author

I am going to run a few more tests with this code in containerd. As of now all tests have been successful.

@MikeZappa87 MikeZappa87 marked this pull request as draft August 5, 2023 03:39
@MikeZappa87 MikeZappa87 force-pushed the issue/multi-network-support branch from 985ec85 to e4fd289 Compare August 6, 2023 03:13
@MikeZappa87 MikeZappa87 force-pushed the issue/multi-network-support branch from 1d661df to 89f6935 Compare August 6, 2023 03:19
@MikeZappa87 MikeZappa87 marked this pull request as ready for review August 6, 2023 03:21
@MikeZappa87
Copy link
Contributor Author

@AkihiroSuda I made a few updates. I have squashed the commits.

@@ -83,6 +89,11 @@ type libcni struct {
sync.RWMutex
}

type NetworkInterface struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking through this type. It works in the current however give me some time to debate. If anyone likes the current state lmk

name := ""
for _, v := range networkNames {
if net, ok := config[v.NetworkName]; ok {
if v.InterfaceName == "" {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if a network has two or more interfaces?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants