-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Fix a bug with pluralization of third party resources #25374
Conversation
resourceStorage := thirdpartyresourcedataetcd.NewREST( | ||
generic.RESTOptions{Storage: m.thirdPartyStorage, Decorator: generic.UndecoratedStorage, DeleteCollectionWorkers: m.deleteCollectionWorkers}, group, kind) | ||
|
||
apiRoot := makeThirdPartyPath("") | ||
|
||
storage := map[string]rest.Storage{ | ||
strings.ToLower(kind) + "s": resourceStorage, | ||
pluralResource: resourceStorage, |
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.
So we're relying on meta.KindToResource's pluralization code working for arbitrary strings? I guess that's an improvement to just appending an 's'. Should we instead allow them to put a pluralized version in the specification? @smarterclayton here's another great reason not to use plurals in our paths...
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.
KindToResource is what the kubectl client code uses afaik, so at least its consistent?
comments responded to. |
LGTM |
@brendandburns |
@brendandburns |
Is this bug worth fixing for 1.3? If so, please add the 1.3 milestone. |
@lavalamp for the 1.3 call. I believe it's worth fixing. |
@lavalamp might not see this until Thursday. In his stead, I'll say this should be fixed for 1.3, and we can sort it out later if he disagrees. |
I agree with @a-robinson |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit b2bf960. |
Automatic merge from submit-queue |
Yes, in 1.3 is good, thanks! |
Fixes #25129
@kubernetes/sig-api-machinery