-
Notifications
You must be signed in to change notification settings - Fork 350
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
chore: endpointslice controller #574
Conversation
These changes are used to implement the EndpointSlice controller.
Can you rebase or merge master? When #563 be merged |
Codecov Report
@@ Coverage Diff @@
## master #574 +/- ##
==========================================
- Coverage 34.90% 34.18% -0.72%
==========================================
Files 55 55
Lines 4558 4677 +119
==========================================
+ Hits 1591 1599 +8
- Misses 2744 2858 +114
+ Partials 223 220 -3
Continue to review full report at Codecov.
|
Done. |
@@ -49,7 +49,7 @@ Tips: The failure caused by empty upstream nodes is a limitation of Apache APISI | |||
|
|||
6. What is the retry rule of `apisix-ingress-controller`? | |||
|
|||
If an error occurs during the process of `apisix-ingress-controller` parsing CRD and distributing the configuration to APISIX, a retry will be triggered. | |||
If an error occurs duriREADME.mdng the process of `apisix-ingress-controller` parsing CRD and distributing the configuration to APISIX, a retry will be triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misspell
@@ -504,6 +516,85 @@ func (c *Controller) syncConsumer(ctx context.Context, consumer *apisixv1.Consum | |||
} | |||
return | |||
} | |||
|
|||
func (c *Controller) syncEndpoint(ctx context.Context, ep kube.Endpoint) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why write sync in the controller?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because these logics can be reused by both the endpoint controller and endpointslice controller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean put them in another file maybe better , not in controller .
@@ -256,6 +264,7 @@ spec: | |||
- %s | |||
- --apisix-route-version | |||
- %s | |||
- --watch-endpointslices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value of watch-endpointslices
is false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The minimal Kubernetes version that we supporting is v1.15
while the alpha version of endpointslice was introduced in Kubernetes v1.16
. So by default we disable it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Except for some minor issues
@@ -58,7 +58,7 @@ This project is currently general availability. | |||
|
|||
## Prerequisites | |||
|
|||
Apisix ingress controller requires Kubernetes version 1.14+. | |||
Apisix ingress controller requires Kubernetes version 1.15+. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EndpointSlice introduced from v1.16
https://kubernetes.io/blog/2019/09/18/kubernetes-1-16-release-announcement/#introducing-endpoint-slices
Please answer these questions before submitting a pull request
Why submit this pull request?
Bugfix
New feature provided
Improve performance
Backport patches
Related issues
Bugfix
Description
How to fix?
New feature or improvement
Backport patches
Why need to backport?
Source branch
Related commits and pull requests
Target branch