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

e2e aap for security group #3459

Merged
merged 1 commit into from
Dec 5, 2023
Merged

Conversation

zhaocongqi
Copy link
Member

@zhaocongqi zhaocongqi commented Nov 27, 2023

Pull Request

What type of this PR

Examples of user facing changes:

  • Tests

This feature was introduced in v1.13

Which issue(s) this PR fixes

WHAT

🤖[deprecated] Generated by Copilot at 4141519

This pull request enhances the e2e tests for the vip feature of kube-ovn by adding security group support and testing scenarios with AAP pods. It also adds a new file test/e2e/framework/security-group.go to provide a common interface for creating and managing security groups in the tests. Additionally, it fixes a typo in an error message in test/e2e/framework/vip.go.

🤖[deprecated] Generated by Copilot at 4141519

Oh we are the kube-ovn testers, and we work on the code
We create and delete security groups and vips as we go
We heave and haul and sync and wait, and fix the typos too
And we sing this shanty chorus as we push the changes through

HOW

🤖[deprecated] Generated by Copilot at 4141519

  • Add a new file test/e2e/framework/security-group.go that defines a SecurityGroupClient struct and its methods for managing security groups, and a helper function MakeSecurityGroup to create a security group object (F0)
  • Fix a typo in the error message of the DeleteSync method of the VipClient struct in test/e2e/framework/vip.go (link)
  • Add a function MakeSecurityGroup to the vip package in test/e2e/vip/e2e_test.go that wraps the framework function and returns a kubeovnv1.SecurityGroup object (link)
  • Add and initialize a variable securityGroupClient of type *framework.SecurityGroupClient to the vip package in test/e2e/vip/e2e_test.go to create and manage security groups in the vip e2e tests (link, link)
  • Add and initialize two variables aapPodName3 and securityGroupName of type string to the vip package in test/e2e/vip/e2e_test.go to store the names of a third AAP pod and a security group for testing the connectivity of AAP pods (link, link)
  • Delete the aapPodName3 pod in the AfterEach block of the vip e2e tests to clean up the resources (link)
  • Assign the return value of the CreateSync method to the aapPod1 and aapPod2 variables in the It block of the vip e2e tests to store the updated pod objects with annotations (link)
    • Create a security group object with the MakeSecurityGroup function and the securityGroupName variable (link)

@zhaocongqi zhaocongqi force-pushed the e2e-aap-sg branch 2 times, most recently from f3610b1 to e6f7274 Compare November 29, 2023 04:19
@zhaocongqi zhaocongqi marked this pull request as ready for review November 29, 2023 07:22
allowAddress := aapPod1.Annotations[util.IPAddressAnnotation]
routes := make([]*apiv1.SgRule, 0, 2)
// gateway should be added for pinger
routes = append(routes, &apiv1.SgRule{
Copy link
Collaborator

Choose a reason for hiding this comment

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

rename

@oilbeater oilbeater merged commit be73019 into kubeovn:master Dec 5, 2023
59 checks passed
zbb88888 pushed a commit that referenced this pull request Dec 5, 2023
Signed-off-by: zcq98 <[email protected]>
Co-authored-by: zcq98 <[email protected]>
@zhaocongqi zhaocongqi deleted the e2e-aap-sg branch December 6, 2023 00:59
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.

3 participants