-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Kubernetes Client: Use the correct service account name #25750
Conversation
When not setting any name, the extension will use the current resource name which is not a correct logic (as there could have additional resources from users). Fix quarkusio#25688
|
||
/** | ||
* Workaround for: https://github.com/dekorateio/dekorate/issues/987 | ||
* Once the issue is fixed in upstream, and we bump the Dekorate version, we should delete this decorator. |
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.
Reported issue on Dekorate side: dekorateio/dekorate#987
I've also provided the fix there.
/cc @geoand, @iocanel, @edeandrea |
@Sgitario Is there a config option to tell the extension not to generate a role binding/service account? In my case I'm providing the RoleBindings myself via the user-provided yamls & I don't necessarily want to create new service accounts. |
At the moment, there is no config option to disable this. Line 75 in 6b03da0
Therefore, we could easily add a new property to not do so if disabled. Would this make sense to you? cc @edeandrea @iocanel ? |
Yeah I think that would make sense, at least for my use case. The default could be to do what is being done today, but if disabled, don't generate a role binding or service account. |
Okis. I will create a separate pull request to add a new property that disables the rbac generation. |
Thanks @Sgitario ! |
@iocanel can you take a look at this please? Thanks |
Hi any progress on this one? |
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
While I can see how this pull request fixes: #25688, I feel that the issue description indicates that when existing resources are used some things are performed possibly out of the expected order. This is something that we may want to track, as it's likely we'll encounter that in the future. |
Hey @Sgitario I just tried this out for the first time and I don't think the behavior is correct. When I generate I can see the For example, looking at https://github.com/quarkusio/quarkus-super-heroes/blob/main/rest-fights/src/main/kubernetes/openshift.yml you'll notice there are 3 When I generate I would think this is a problem still. I need to use |
This change is related to this comment: quarkusio#25750 (comment)
I've changed this behavior in this pull request: #26558 |
This change is related to this comment: quarkusio#25750 (comment) (cherry picked from commit 2521138)
When not setting any name, the extension will use the current resource name which is not a correct logic (as there could have additional resources from users).
Fix #25688