Make update-codegen conversion work on gengo/v2

This commit is contained in:
Tim Hockin 2023-12-29 15:08:57 -08:00
parent ed35118664
commit 5475797f43
No known key found for this signature in database
5 changed files with 7 additions and 8 deletions

View File

@ -413,7 +413,7 @@ function codegen::defaults() {
# IDL.
function codegen::conversions() {
# Build the tool.
GO111MODULE=on GOPROXY=off go install \
GOPROXY=off go install \
k8s.io/code-generator/cmd/conversion-gen
# The result file, in each pkg, of conversion generation.
@ -438,7 +438,7 @@ function codegen::conversions() {
local tag_pkgs=()
for dir in "${tag_dirs[@]}"; do
tag_pkgs+=("${PRJ_SRC_PATH}/$dir")
tag_pkgs+=("./$dir")
done
local extra_peer_pkgs=(
@ -457,13 +457,12 @@ function codegen::conversions() {
git_find -z ':(glob)**'/"${output_file}.go" | xargs -0 rm -f
./hack/run-in-gopath.sh "${gen_conversion_bin}" \
"${gen_conversion_bin}" \
--v "${KUBE_VERBOSE}" \
--logtostderr \
--go-header-file "${BOILERPLATE_FILENAME}" \
--output-file-base "${output_file}" \
$(printf -- " --extra-peer-dirs %s" "${extra_peer_pkgs[@]}") \
$(printf -- " --extra-dirs %s" "${tag_pkgs[@]}") \
$(printf -- " -i %s" "${tag_pkgs[@]}") \
"$@"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/vendor/k8s.io/client-go/scale/scheme
// +k8s:conversion-gen=k8s.io/client-go/scale/scheme
// +k8s:conversion-gen-external-types=k8s.io/api/apps/v1beta1
package appsv1beta1 // import "k8s.io/client-go/scale/scheme/appsv1beta1"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/vendor/k8s.io/client-go/scale/scheme
// +k8s:conversion-gen=k8s.io/client-go/scale/scheme
// +k8s:conversion-gen-external-types=k8s.io/api/apps/v1beta2
package appsv1beta2 // import "k8s.io/client-go/scale/scheme/appsv1beta2"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/vendor/k8s.io/client-go/scale/scheme
// +k8s:conversion-gen=k8s.io/client-go/scale/scheme
// +k8s:conversion-gen-external-types=k8s.io/api/autoscaling/v1
package autoscalingv1 // import "k8s.io/client-go/scale/scheme/autoscalingv1"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:conversion-gen=k8s.io/kubernetes/vendor/k8s.io/client-go/scale/scheme
// +k8s:conversion-gen=k8s.io/client-go/scale/scheme
// +k8s:conversion-gen-external-types=k8s.io/api/extensions/v1beta1
package extensionsv1beta1 // import "k8s.io/client-go/scale/scheme/extensionsv1beta1"