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

feat: support viploadbalancer controller #2036

Closed
wants to merge 16 commits into from

Conversation

wangxye
Copy link
Member

@wangxye wangxye commented Apr 27, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

As the second-level controller for the multi-region load balancer, It is used to support the control of high availability of virtual IP based edge services, monitor poolservice changes, and is used to synchronize vrid changes to the vip agent at the edge.

Special notes for your reviewer:

/assign @rambohe-ch @zyjhtangtang @River-sh @Rui-Gan

Does this PR introduce a user-facing change?

Support left-closed-right-open ip assignment:

# if you use vip for load-balancer, you should annotate the vip address for the nodepool.
kubectl annotate nodepool hangzhou openyurt.io/address-pools="192.168.0.1-192.168.1.0, 10.0.1.0"

# For vip-type load balance, if you want to specify a vip for a service, you needs to annotate the specified address.
kubectl annotate service nginx service.openyurt.io/vip="192.168.0.1-168.0.3, 10.0.1.0"

@wangxye wangxye force-pushed the feat/vip_lb_controller branch from b4323a2 to 6a6e532 Compare April 27, 2024 15:14
Copy link

codecov bot commented Apr 27, 2024

Codecov Report

Attention: Patch coverage is 69.06977% with 133 lines in your changes missing coverage. Please review.

Project coverage is 56.57%. Comparing base (3713163) to head (71bf9ce).
Report is 81 commits behind head on master.

Files with missing lines Patch % Lines
...rset/viploadbalancer/viploadbalancer_controller.go 57.63% 76 Missing and 35 partials ⚠️
...oller/loadbalancerset/viploadbalancer/predicate.go 70.58% 5 Missing and 5 partials ⚠️
...roller/loadbalancerset/viploadbalancer/ip_utils.go 93.44% 4 Missing and 4 partials ⚠️
...anager/webhook/service/v1alpha1/service_default.go 80.00% 1 Missing and 1 partial ⚠️
...anager/webhook/service/v1alpha1/service_handler.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2036      +/-   ##
==========================================
+ Coverage   56.09%   56.57%   +0.47%     
==========================================
  Files         186      193       +7     
  Lines       18092    18771     +679     
==========================================
+ Hits        10149    10619     +470     
- Misses       6910     7052     +142     
- Partials     1033     1100      +67     
Flag Coverage Δ
unittests 56.57% <69.06%> (+0.47%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wangxye wangxye force-pushed the feat/vip_lb_controller branch 2 times, most recently from 75e4110 to 77148c3 Compare April 27, 2024 15:24
@wangxye
Copy link
Member Author

wangxye commented Apr 27, 2024

/hold

@wangxye wangxye force-pushed the feat/vip_lb_controller branch 4 times, most recently from f156534 to 963c247 Compare May 4, 2024 08:39
@wangxye
Copy link
Member Author

wangxye commented May 4, 2024

/rerun

@wangxye
Copy link
Member Author

wangxye commented May 4, 2024

/unhold

@wangxye
Copy link
Member Author

wangxye commented May 4, 2024

@wangxye
Copy link
Member Author

wangxye commented May 9, 2024

I have updated the logic of syncPoolService to first synchronize the validly allocated vrids in the cluster first, which is used to support the user-specified mode of vrid deployment. In addition, we will perform unified allocation for unallocated or vrid exceptions, which include cases where the annotation of the vrid is null, the vrid is abnormal, and the vrid is out of range. This layer of logic will also be judged in reconcileDelete.

@wangxye wangxye force-pushed the feat/vip_lb_controller branch 4 times, most recently from 9e138a0 to 51b2104 Compare May 21, 2024 03:31
@wangxye wangxye force-pushed the feat/vip_lb_controller branch from 242d2f6 to 38eba42 Compare May 21, 2024 08:35
@wangxye wangxye force-pushed the feat/vip_lb_controller branch 2 times, most recently from a904f69 to aae406d Compare June 16, 2024 15:44
@wangxye wangxye force-pushed the feat/vip_lb_controller branch 5 times, most recently from 68803c7 to 1465fa1 Compare August 7, 2024 03:02
@wangxye wangxye force-pushed the feat/vip_lb_controller branch from 1465fa1 to 98b2205 Compare August 7, 2024 06:03
@wangxye wangxye force-pushed the feat/vip_lb_controller branch from fac5c82 to b5b012d Compare August 7, 2024 11:56
@wangxye
Copy link
Member Author

wangxye commented Aug 7, 2024

create flow:
image
delete flow:
image

@wangxye wangxye force-pushed the feat/vip_lb_controller branch from 54ee33e to 1f89541 Compare August 7, 2024 17:14
@wangxye wangxye force-pushed the feat/vip_lb_controller branch from 7e8d0f8 to 71bf9ce Compare August 8, 2024 11:35
Copy link

sonarqubecloud bot commented Aug 8, 2024

@wangxye
Copy link
Member Author

wangxye commented Sep 17, 2024

@rambohe-ch Do you have time to look at this?

@rambohe-ch
Copy link
Member

@rambohe-ch Do you have time to look at this?

@wangxye Sorry to response very lately, because of dealing with some personal works.
I will review this pull request in this week, please stay tuned.

@wangxye
Copy link
Member Author

wangxye commented Sep 17, 2024

@rambohe-ch Do you have time to look at this?

@wangxye Sorry to response very lately, because of dealing with some personal works. I will review this pull request in this week, please stay tuned.

Okay, no problem, looking forward to your feedback so we can get it done early!

Copy link

stale bot commented Dec 20, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 20, 2024
@stale stale bot closed this Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants