-
Notifications
You must be signed in to change notification settings - Fork 2.8k
refactor(kubeclient): consolidate duplicate code #6076
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
base: master
Are you sure you want to change the base?
Conversation
…t client creation Signed-off-by: ivan katliarchuk <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Pull Request Test Coverage Report for Build 20656426648Details
💛 - Coveralls |
…t client creation Signed-off-by: ivan katliarchuk <[email protected]>
…t client creation Signed-off-by: ivan katliarchuk <[email protected]>
…t client creation Signed-off-by: ivan katliarchuk <[email protected]>
What does it do ?
Create a new pkg/kubeclient package to consolidate duplicate Kubernetes client creation logic, add metrics instrumentation to the events controller, and use the.
TODO
How kube client created and shared with different packages
flowchart TD A[externaldns.Config] -->|passed to| B[source.NewClientGenerator] B -->|creates| C[SingletonClientGenerator] C -->|used by| D[buildController] C -->|used by| E[buildSource] D -->|calls| F[clientGen.EventsClient] F -->|returns| G[EventsV1Interface] G -->|passed to| H[events.NewEventController] E -->|calls| I[source.ByNames] I -->|calls| J[clientGen.KubeClient] J -->|returns| K[kubernetes.Interface] K -->|used by| L[Sources<br/>Service/Ingress/etc] subgraph "Shared Client" C M[clientGen.KubeClient] -->|creates once| N[kubernetes.Clientset] F2[clientGen.EventsClient] -->|delegates to| N N -->|.EventsV1| G2[EventsV1Interface] style N fill:#99ccff end style C fill:#ffcc99 style H fill:#99ff99 style L fill:#99ff99Motivation
Currently event generator and source have 2 distinct clients. As a result rate limiting not working as it should on clusters with large ~50k records.
Work relates to
More