mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 19:28:16 +00:00
Automatic merge from submit-queue (batch tested with PRs 40665, 41094, 41351, 41721, 41843) parse single string as group rather than version **What this PR does / why we need it**: Prevent bad code generation by adjusting parsing of input. When client-gen is run with `--input` as an unversioned type, it blows up if the group does not end with a trailing slash. examples 1. `--input servicecatalog/v1alpha` is group servicecatalog, with version v1alpha1 1. `--input servicecatalog/` is group servicecatalog, with version empty string 1. `--input servicecatalog` is group empty string, with version servicecatalog I disagree that the second and third cases are different. This adjusts them so they are both case 2. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: This change would address the concerns in PR https://github.com/kubernetes/community/pull/343 **Special notes for your reviewer**: @caesarxuchao @pmorie this does not result in any change in any current code generation, and improves the user experience of client-gen. I ran `hack/update-codegen.sh` and saw no changes in git, nor did anything fail. **Release note**: ```release-note NONE ```