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

Support secondary network without IPAM #5762

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

jianjuns
Copy link
Contributor

@jianjuns jianjuns commented Nov 30, 2023

When the secondary network configuration in NetworkAttachmentDefinition does not include IPAM configuration, simply do not allocate and configure IP addresses for the secondary interfaces.

Closes: #5693

@jianjuns jianjuns added the area/secondary-network Issues or PRs related to support for secondary networks in Antrea label Nov 30, 2023
wenyingd
wenyingd previously approved these changes Dec 1, 2023
Copy link
Contributor

@wenyingd wenyingd left a comment

Choose a reason for hiding this comment

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

LGTM

antoninbas
antoninbas previously approved these changes Dec 1, 2023
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +236 to +240
if len(podCNIInfo.Interfaces) == 0 {
// Return error to requeue and retry.
return err
}
// We do not return error to retry, if at least one secondary network is configured.
Copy link
Contributor

Choose a reason for hiding this comment

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

do you remember why we have this special case?

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 think just that Arun wants to simplify the logic. We can fix in future (but I do feel there is complexity to fix partial failure or support network list update).

@@ -70,6 +70,14 @@ const (
}
}`

netAttachTemplateNoIPAM = `{
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: s/netAttachTemplateNoIPAM/netAttachNoIPAMTemplate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

When the secondary network configuration in NetworkAttachmentDefinition
does not include IPAM configuration, simply do not allocate and
configure IP addresses for the secondary interfaces.

Signed-off-by: Jianjun Shen <shenj@vmware.com>
@jianjuns
Copy link
Contributor Author

jianjuns commented Dec 1, 2023

/test-all

@jianjuns jianjuns merged commit 66973b9 into antrea-io:main Dec 1, 2023
48 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/secondary-network Issues or PRs related to support for secondary networks in Antrea
Projects
None yet
Development

Successfully merging this pull request may close these issues.

secondary bridge required for AnreaIPAM configured
3 participants