-
Notifications
You must be signed in to change notification settings - Fork 205
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
operator: remove one-cr-per-kind limitation #1579
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1579 +/- ##
==========================================
+ Coverage 49.56% 51.69% +2.12%
==========================================
Files 42 42
Lines 4965 4869 -96
==========================================
+ Hits 2461 2517 +56
+ Misses 2361 2206 -155
- Partials 143 146 +3
... and 1 file with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
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'm not really familiar with operator code, but this looks pretty straighforward simplification.
Only thing I did not like is the inconsistent use of prefixedName()
. Why not use it everywhere (also tests)?
There is a bigger problem to think about. I'm not sure we need to have new service accounts created for every new |
Yeah, this did cross my mind when making the changes. As there can be different CRs (with and without resource management), the reconciler would need to keep track of the need for these additional objects. Create them when first one comes up and remove them when the last one goes away. I'll think about how to do that. |
6ae723b
to
7b74ad6
Compare
Changed service account and cluster role bindings to be shared, and added garbage collection to remove them. |
c40f477
to
1c52c3e
Compare
Differentiate objects by adding cr names as suffixes Drop kind book keeping and related functions from controllers Signed-off-by: Tuomas Katila <[email protected]>
1c52c3e
to
3c03f44
Compare
3c03f44
to
4f63ea5
Compare
Additional objects are shared between device plugin CRs. Once the last CR is removed, the additional objects are also removed. Signed-off-by: Tuomas Katila <[email protected]>
…ource management Signed-off-by: Tuomas Katila <[email protected]>
4f63ea5
to
4e06690
Compare
Differentiate objects by adding cr names as suffixes
Drop kind book keeping and related functions from controllers
Make serviceaccounts and clusterrolebindings shared between GPU CRs.
Deny GPU CRs with mixed resource manager selections.
Fixes #1529