-
Notifications
You must be signed in to change notification settings - Fork 335
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: abstract the endpoints-related logic #563
Conversation
These changes are used to implement the EndpointSlice controller.
Any issue related? |
Codecov Report
@@ Coverage Diff @@
## master #563 +/- ##
==========================================
+ Coverage 34.86% 34.90% +0.03%
==========================================
Files 55 55
Lines 4557 4558 +1
==========================================
+ Hits 1589 1591 +2
+ Misses 2747 2744 -3
- Partials 221 223 +2
Continue to review full report at Codecov.
|
Please fix lint errors. |
Fixed. |
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.
Great abstraction ~ with some small suggestions.
ElectionID string `json:"election_id" yaml:"election_id"` | ||
IngressClass string `json:"ingress_class" yaml:"ingress_class"` | ||
IngressVersion string `json:"ingress_version" yaml:"ingress_version"` | ||
WatchEndpointSlices bool `json:"watch_endpoint_slices" yaml:"watch_endpoint_slices"` |
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.
Should add the configuration for (k8s.io/api/discovery/v1)LabelManagedBy ? or reuse the field IngressClass
?
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.
We only care EndpointSlices
managed by endpointslice-controller.k8s.io
.
endpointslice.kubernetes.io/managed-by: endpointslice-controller.k8s.io
k8s.io/client-go v0.20.2 | ||
k8s.io/api v0.21.1 | ||
k8s.io/apimachinery v0.21.1 | ||
k8s.io/client-go v0.21.1 |
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.
Once we upgrade the version of client-go
, Please make sure what is the minimum k8s version we can support, and modify the doc.
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.
OK.
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.
As per the compatibility matrix in https://github.com/kubernetes/client-go/tree/v0.21.1#compatibility-client-go---kubernetes-clusters, we should change the minimal supported k8s version to 1.15
.
Will the test cases of endpointslice be added in the next PR? |
I have changed the e2e framework to just use endpointslice instead of endpoints. |
I can only see the test for endpoints, such as here |
In this Pull Request, we abstracted all the enpoints-related logic to
kube.Endpoint
, which hides its real entity. These changes are used to implement the EndpointSlice controller.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