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

Refactor CIDR manipulation code from globalnet to cidr module #3212

Merged
merged 3 commits into from
Sep 9, 2024

Conversation

tpantelis
Copy link
Contributor

...for reuse with the clusterset IP functionality.

@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr3212/tpantelis/refactor_gn_cidr
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

binary.BigEndian.PutUint32(netIP, ip)

return netIP
return cidr.Allocate(&globalnetInfo.Info) //nolint:wrapcheck // No need to wrap
}

func GetValidClusterSize(cidrRange string, clusterSize uint) (uint, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This can also move to cidr/cidr.go as this will also get reused in clusersetip. But I can do that as part of my changes to add clustersetip code. I'd rather have this merged first.

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 didn't move this b/c I didn't think we were going to make cluster/allocation size configurable for clustersetip.

@submariner-bot submariner-bot added the ready-to-test When a PR is ready for full E2E testing label Sep 9, 2024
@aswinsuryan aswinsuryan enabled auto-merge (rebase) September 9, 2024 16:10
@aswinsuryan aswinsuryan merged commit ee76b52 into submariner-io:devel Sep 9, 2024
35 checks passed
@submariner-bot
Copy link
Contributor

🤖 Closed branches: [z_pr3212/tpantelis/refactor_gn_cidr]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-test When a PR is ready for full E2E testing
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants