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

IPPool: fix missing support for CIDR #2982

Merged
merged 1 commit into from
Jun 30, 2023
Merged

Conversation

zhangzujian
Copy link
Member

@zhangzujian zhangzujian commented Jun 26, 2023

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes:

Fixes #(issue-number)

WHAT

🤖 Generated by Copilot at 0558014

This pull request adds new features and tests for the IPPool and QoS functionalities of the kube-ovn project. It also improves the ipam package and the framework package with new methods, functions, and imports. It updates some existing method calls and test cases to match the new changes. The affected files are pkg/internal/big_int.go, pkg/ipam/ip_range_list.go, pkg/ipam/ip_range.go, test/e2e/framework/deployment.go, test/e2e/framework/util.go, test/e2e/kube-ovn/ipam/ipam.go, test/unittest/ipam/ip_range_list.go, test/unittest/ipam/ip_range.go, pkg/ipam/ip.go, test/e2e/framework/ippool.go, test/e2e/framework/namespace.go, test/e2e/framework/pod.go, test/e2e/kube-ovn/qos/qos.go, and test/unittest/ipam/ip.go.

🤖 Generated by Copilot at 0558014

The kube-ovn project is great
It lets users customize their network state
With IPPool and QoS
And some ipam tests
It patches and validates at a fast rate

HOW

🤖 Generated by Copilot at 0558014

  • Add and modify methods for the BigInt type in the internal package to compare with int64 values and implement the fmt.Stringer interface (link,link)
  • Add a new function NewIPRangeFromCIDR to the ipam package to create an IPRange value from a CIDR notation (link,link)
  • Modify the existing function NewIPRangeListFrom in the ipam package to support CIDR notation and single IP addresses as inputs (link,link,link)
  • Add a new method Clone to the IP type in the ipam package to create a copy of the IP value (link)
  • Add new methods Patch and PatchSync to the DeploymentClient type in the framework package to patch a deployment object using a merge patch and wait for its rollout status (link,link,link,link,link)
  • Add a new method RolloutStatus to the DeploymentClient type in the framework package to wait for a deployment to be rolled out and get the updated deployment object (link)
  • Add a new type IPPoolClient and its methods to the framework package to create, update, delete, and validate IPPool objects (link)
  • Add a new type NamespaceClient and its methods to the framework package to create, update, delete, and validate Namespace objects (link)
  • Rename the existing method PatchPod of the PodClient type in the framework package to Patch to improve the naming consistency of the framework methods (link)
  • Modify the existing function RandomIPPool in the framework package to use a set instead of a slice for deduplication and randomization of the IP addresses (link,link)
  • Add a new test case to the ipam package in the test/e2e/kube-ovn/ipam/ipam.go file to test the IPPool feature of the kube-ovn project (link,link,link,link,link,link)
  • Modify the existing method call in the qos package in the test/e2e/kube-ovn/qos/qos.go file to use the new name of the Patch method of the PodClient type (link)
  • Add a new function ipv4ToUint32 to the ipam package in the test/unittest/ipam/ip.go file to convert IPv4 addresses to uint32 values (link)
  • Add new test cases to the ipam package in the test/unittest/ipam/ip_range.go file to test the NewIPRangeFromCIDR function with IPv4 and IPv6 addresses (link,link,link)
  • Modify the existing test case in the ipam package in the test/unittest/ipam/ip_range_list.go file to support the CIDR notation as an input and use the - separator for IP ranges (link,link,link,link)

@zhangzujian zhangzujian marked this pull request as ready for review June 26, 2023 08:06
@zhangzujian zhangzujian marked this pull request as draft June 26, 2023 08:57
@zhangzujian zhangzujian force-pushed the ippool branch 4 times, most recently from e08294e to fca73d3 Compare June 29, 2023 06:41
@zhangzujian zhangzujian marked this pull request as ready for review June 29, 2023 06:41
@zhangzujian zhangzujian force-pushed the ippool branch 3 times, most recently from e4393c4 to ed51216 Compare June 29, 2023 08:02
@zhangzujian zhangzujian requested a review from oilbeater June 29, 2023 08:35
@zhangzujian zhangzujian force-pushed the ippool branch 2 times, most recently from 3a70281 to 3702381 Compare June 29, 2023 13:51
@zhangzujian zhangzujian merged commit 5c45549 into kubeovn:master Jun 30, 2023
@zhangzujian zhangzujian deleted the ippool branch June 30, 2023 06:52
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