mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 21:50:05 +00:00
move experimental/v1 to experimental/v1alpha1;
use "group/version" in many places where used to expect "version" only.
This commit is contained in:
@@ -242,10 +242,11 @@ kube::util::analytics-link() {
|
||||
|
||||
# Takes a group/version and returns the path to its location on disk, sans
|
||||
# "pkg". E.g.:
|
||||
# * default behavior: experimental/v1 -> apis/experimental/v1
|
||||
# * default behavior: experimental/v1alpha1 -> apis/experimental/v1alpha1
|
||||
# * legacy behavior: api/v1 -> api/v1
|
||||
# * Special handling for only a group: experimental -> apis/experimental
|
||||
# * Special handling for only "api" group: api -> api
|
||||
# * Special handling for when both group and version are "": / -> api
|
||||
# * Very special handling for "v1": v1 -> api/v1
|
||||
kube::util::group-version-to-pkg-path() {
|
||||
local group_version="$1"
|
||||
@@ -253,6 +254,10 @@ kube::util::group-version-to-pkg-path() {
|
||||
# TODO(lavalamp): Simplify this by moving pkg/api/v1 and splitting pkg/api,
|
||||
# moving the results to pkg/apis/api.
|
||||
case "${group_version}" in
|
||||
# both group and version are "", this occurs when we generate deep copies for internal objects of the legacy v1 API.
|
||||
/)
|
||||
echo "api"
|
||||
;;
|
||||
v1)
|
||||
echo "api/v1"
|
||||
;;
|
||||
|
Reference in New Issue
Block a user