-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Expose method that computes the default plural form for a given kind #6313
Comments
In general, I'd try to move away from Pluralize and rely on the real API plural which differs from the output of Pluralize.toPlural on many occasions. |
I agree but there are cases where you don't get a choice and you'd still want to get the default plural version that is computed by Fabric8, without having to know how it's done. That's why it's called |
What we want is precisely to get which cases are these so that we can avoid them altogether. Do you have any examples of which cases might these be? |
When you're dealing with |
Right now we should be doing that by querying the cluster for the exposed resources just like kubectl does. |
I agree that would be the appropriate solution but it's just not possible when you perform that processing at build time and/or you might not be connected to the target cluster. |
Why would you need the plural at build time or when not having direct access to the cluster? From an operator generation context you should have that already available in the CRD. From any other context, I can't think of why would you need the plural. |
To generate RBACs which happens at build time. More specifically, when the user is using |
Do you have an example or test in the JOSDK repo(s). For me it's still hard to see how the user might have (and provide) the info for the external resources and not be able to manage the plural (how is this dealt with in the regular OSDK? and so on) |
For some more context, see the discussions at operator-framework/java-operator-sdk#2515. |
Is your enhancement related to a problem? Please describe
While there already is
Pluralize.toPlural
, this actually isn't enough since the kind should also be converted to lower case. It would be nice not to have to bother with knowing that detail.Describe the solution you'd like
A
getDefaultPluralFor(String kind)
method onHasMetadata
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: