-
Kubernetes Submit Queue authored
Automatic merge from submit-queue (batch tested with PRs 46967, 46992, 43338, 46717, 46672) Add group alias names to API resources to allow discovery **What this PR does / why we need it**: Adds `GroupNames []string` to API resources, which represents the list of group aliases that every resource belongs to. Partially fixes https://github.com/kubernetes/kubernetes/issues/41353 This moves the logic of "all" (which currently [translates](https://github.com/kubernetes/kubernetes/blob/fbc94c089657045217999995aaf08e4025b53c52/pkg/kubectl/cmd/util/shortcut_restmapper.go#L106) to "pods,replicationcontrollers,services,...") to the server-side. Will allow clients like `kubectl` to discover group aliases instead of having it hardcoded and the API server to better handle consistency across multiple clients, version skew, etc; and will make "all" un-special and allow other groups to be created. As a follow-up we'll patch `kubectl` to make groups aliases discoverable and the hardcoded list a fallback while we still have to support it. Related to https://github.com/kubernetes/kubernetes/pull/42595#issuecomment-286839885. **Release note**: ```release-note Adds the `Categories []string` field to API resources, which represents the list of group aliases (e.g. "all") that every resource belongs to. ``` @kubernetes/sig-api-machinery-misc @deads2k @bgrant0607
6b50a5cb