mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Alter the build to generate for __internal correctly
This commit is contained in:
parent
c1d932e44a
commit
c49cd4edf9
@ -61,7 +61,7 @@ func pkgPath(group, version string) string {
|
|||||||
group = "api"
|
group = "api"
|
||||||
}
|
}
|
||||||
gv := group
|
gv := group
|
||||||
if version != "" {
|
if version != "__internal" {
|
||||||
gv = path.Join(group, version)
|
gv = path.Join(group, version)
|
||||||
}
|
}
|
||||||
switch {
|
switch {
|
||||||
|
@ -54,7 +54,7 @@ function generate_deep_copies() {
|
|||||||
else
|
else
|
||||||
apiVersions="${ver}"
|
apiVersions="${ver}"
|
||||||
fi
|
fi
|
||||||
KUBE_API_VERSIONS="${apiVersions}" generate_version "${ver}"
|
KUBE_API_VERSIONS="${apiVersions:-}" generate_version "${ver}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,6 +62,6 @@ function generate_deep_copies() {
|
|||||||
# Currently pkg/api/deep_copy_generated.go is generated by the new go2idl generator.
|
# Currently pkg/api/deep_copy_generated.go is generated by the new go2idl generator.
|
||||||
# All others (mentioned above) are still generated by the old reflection-based generator.
|
# All others (mentioned above) are still generated by the old reflection-based generator.
|
||||||
# TODO: Migrate these to the new generator.
|
# TODO: Migrate these to the new generator.
|
||||||
DEFAULT_VERSIONS="v1 authorization/ authorization/v1beta1 extensions/ extensions/v1beta1 componentconfig/ componentconfig/v1alpha1 metrics/ metrics/v1alpha1"
|
DEFAULT_VERSIONS="v1 authorization/__internal authorization/v1beta1 extensions/__internal extensions/v1beta1 componentconfig/__internal componentconfig/v1alpha1 metrics/__internal metrics/v1alpha1"
|
||||||
VERSIONS=${VERSIONS:-$DEFAULT_VERSIONS}
|
VERSIONS=${VERSIONS:-$DEFAULT_VERSIONS}
|
||||||
generate_deep_copies "$VERSIONS"
|
generate_deep_copies "$VERSIONS"
|
||||||
|
@ -282,7 +282,7 @@ kube::util::group-version-to-pkg-path() {
|
|||||||
# moving the results to pkg/apis/api.
|
# moving the results to pkg/apis/api.
|
||||||
case "${group_version}" in
|
case "${group_version}" in
|
||||||
# both group and version are "", this occurs when we generate deep copies for internal objects of the legacy v1 API.
|
# both group and version are "", this occurs when we generate deep copies for internal objects of the legacy v1 API.
|
||||||
/)
|
__internal)
|
||||||
echo "api"
|
echo "api"
|
||||||
;;
|
;;
|
||||||
v1)
|
v1)
|
||||||
@ -292,7 +292,7 @@ kube::util::group-version-to-pkg-path() {
|
|||||||
echo "api/unversioned"
|
echo "api/unversioned"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "apis/${group_version}"
|
echo "apis/${group_version%__internal}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user