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 and Kubebuilder use different mechanisms to generate plurals #3402
Comments
It has a proposed solution in : #3408 So, I am adding triage accepted. |
There are still some discussions happening on this thread kubernetes/kube-state-metrics#2065, should we wait until the consensus is made ? |
Boiling down that thread, the overall ask is to have a de-facto way of pluralizing that helps keep the resource names consistent throughout the ecosystem. I believe using the same logic as apimachinery should allow us to achieve that. |
/assign |
We've had to extract and match plurals to avoid instances where there may be discrepancies between the expected and actual plurals. |
Enforcing a common "de-facto" standard through |
Should I take this up? @Kavinjsir @varshaprasad96 @camilamacedo86 |
Hello @camilamacedo86 It looks like code issue. Should I work on this? |
What broke? What's expected?
Kubernetes uses a custom mechanism to guess and generate plurals for CRDs in https://github.com/kubernetes/apimachinery/blob/master/pkg/api/meta/restmapper.go#L126
Kubebuilder uses https://github.com/gobuffalo/flect which has its own custom set of rules.
kubebuilder/pkg/model/resource/utils.go
Line 72 in 6c11f05
Although one could argue that the method kubernetes uses is broken and not ideal, it would be great if kubebuilder could apply the same default mechanism to generate plurals so it is easier for kubernetes clients to resolve a resourceplural from a GroupVersionKind mapping.
Reproducing this issue
No response
KubeBuilder (CLI) Version
3.10.0
PROJECT version
No response
Plugin versions
No response
Other versions
No response
Extra Labels
No response
The text was updated successfully, but these errors were encountered: