-
Notifications
You must be signed in to change notification settings - Fork 5
internal/kubernetes/kubernetes.go: lazy K8S API calls #117
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: main
Are you sure you want to change the base?
internal/kubernetes/kubernetes.go: lazy K8S API calls #117
Conversation
Change-Id: I50815baeea52d0ff11bf85a1861c2d38cc0f3fd1
Change-Id: Ib6c0e5c8472a7d57ff99d2d3f8359a19a744d153
Why not use the cache already in client-go? |
Change-Id: Icef3545f9fdbd19f1f5807f56a918858b739d100
We've done some load testing and looked at the client-go cache. For now, we'd like to continue with the current implementation and file your suggestion as a future improvement. The trade-off is simplicity vs event-driven/real-time implementation. |
Looking at this example it feels more simple than running our own implementation, but I guess it wasnt performant enough (If I understood your comment correctly)? |
Change-Id: Ie98a899881d7b88e1c146d480176ba3d87a60110
I was referring to the example from your first URL. |
Ah, I see. That was merely a link to the cache package in client-go. |
This reverts commit dcaea5c.
The simplified implementation in commit dcaea5c did not work as expected: it would require additional mutexes. Without them there were OOMKilled errors. Reverting to the previous implementation. |
Change-Id: I75bd122dd0467a05b791d5648b73fd7708baacdd
Applicable Issues
Description of the Change
This change implements lazy K8S API calling for getting jobs/pods in
internal/kubernetes/kubernetes.go
.Alternate Designs
Possible Drawbacks
Sign-off
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Signed-off-by: Andrei Matveyeu, [email protected]