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 PrefixesWithCommunity #20

Merged
merged 3 commits into from
Jul 19, 2023
Merged

Conversation

oribon
Copy link
Member

@oribon oribon commented Jul 13, 2023

Support parsing community prefixes

@oribon oribon force-pushed the parse_communities branch 5 times, most recently from 5684302 to a1d12c6 Compare July 17, 2023 11:12
@oribon oribon changed the title WIP: Support PrefixesWithCommunity Support PrefixesWithCommunity Jul 17, 2023
advs[p] = &frr.AdvertisementConfig{Prefix: p, IPFamily: family}
}

prefixToCommunities := map[string]sets.Set[string]{}
Copy link
Member

Choose a reason for hiding this comment

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

communitiesForPrefix*

Copy link
Member Author

Choose a reason for hiding this comment

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

done

internal/controller/api_to_config.go Show resolved Hide resolved
}
}
},
validate: func(ppV4 []config.Peer, ppV6 []config.Peer, nodes []v1.Node) {
Copy link
Member

Choose a reason for hiding this comment

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

can you add

  • a test where we have explicit prefixes, only one with community?
  • a test where we have large communities
  • a test where we have one address with multiple communities

Copy link
Member Author

Choose a reason for hiding this comment

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

done, turns out we didn't have the code to support large communities, added a new commit (copy from MetalLB)

@oribon oribon force-pushed the parse_communities branch 4 times, most recently from 35126e5 to e9e24bb Compare July 17, 2023 16:30
Copy of the relevant parts from MetalLB

Signed-off-by: Ori Braunshtein <[email protected]>
@fedepaol fedepaol added this pull request to the merge queue Jul 19, 2023
Merged via the queue into metallb:main with commit 7012984 Jul 19, 2023
8 checks passed
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