From ca0d2e27e693fd1dc2e882431a041bfbf8de503c Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Tue, 5 Mar 2024 14:38:09 -0800 Subject: [PATCH] Comment some manual conversions Explain why seemingly-useless manual conversions are needed. This is deeply unfortunate, but better to document it than not. --- pkg/apis/admissionregistration/v1/conversion.go | 2 ++ pkg/apis/authentication/v1/conversion.go | 2 ++ pkg/apis/core/v1/conversion.go | 2 ++ 3 files changed, 6 insertions(+) diff --git a/pkg/apis/admissionregistration/v1/conversion.go b/pkg/apis/admissionregistration/v1/conversion.go index 7ea6f168e76..badaed11e1b 100644 --- a/pkg/apis/admissionregistration/v1/conversion.go +++ b/pkg/apis/admissionregistration/v1/conversion.go @@ -23,11 +23,13 @@ import ( ) // Convert_admissionregistration_RuleWithOperations_To_v1_RuleWithOperations is an autogenerated conversion function. +// This is needed because it is referenced from other APIs, but is invisible at code-generation time because of the build tags. func Convert_admissionregistration_RuleWithOperations_To_v1_RuleWithOperations(in *admissionregistration.RuleWithOperations, out *v1.RuleWithOperations, s conversion.Scope) error { return autoConvert_admissionregistration_RuleWithOperations_To_v1_RuleWithOperations(in, out, s) } // Convert_v1_RuleWithOperations_To_admissionregistration_RuleWithOperations is an autogenerated conversion function. +// This is needed because it is referenced from other APIs, but is invisible at code-generation time because of the build tags. func Convert_v1_RuleWithOperations_To_admissionregistration_RuleWithOperations(in *v1.RuleWithOperations, out *admissionregistration.RuleWithOperations, s conversion.Scope) error { return autoConvert_v1_RuleWithOperations_To_admissionregistration_RuleWithOperations(in, out, s) } diff --git a/pkg/apis/authentication/v1/conversion.go b/pkg/apis/authentication/v1/conversion.go index 8088edeb418..5a4f4694172 100644 --- a/pkg/apis/authentication/v1/conversion.go +++ b/pkg/apis/authentication/v1/conversion.go @@ -23,11 +23,13 @@ import ( ) // Convert_v1_UserInfo_To_authentication_UserInfo is defined outside the autogenerated file for use by other API packages +// This is needed because it is referenced from other APIs, but is invisible at code-generation time because of the build tags. func Convert_v1_UserInfo_To_authentication_UserInfo(in *v1.UserInfo, out *authentication.UserInfo, s conversion.Scope) error { return autoConvert_v1_UserInfo_To_authentication_UserInfo(in, out, s) } // Convert_authentication_UserInfo_To_v1_UserInfo is defined outside the autogenerated file for use by other API packages +// This is needed because it is referenced from other APIs, but is invisible at code-generation time because of the build tags. func Convert_authentication_UserInfo_To_v1_UserInfo(in *authentication.UserInfo, out *v1.UserInfo, s conversion.Scope) error { return autoConvert_authentication_UserInfo_To_v1_UserInfo(in, out, s) } diff --git a/pkg/apis/core/v1/conversion.go b/pkg/apis/core/v1/conversion.go index 68260f4fcfa..73488b17085 100644 --- a/pkg/apis/core/v1/conversion.go +++ b/pkg/apis/core/v1/conversion.go @@ -543,11 +543,13 @@ func dropInitContainerAnnotations(oldAnnotations map[string]string) map[string]s } // Convert_core_PersistentVolumeSpec_To_v1_PersistentVolumeSpec is defined outside the autogenerated file for use by other API packages +// This is needed because it is referenced from other APIs, but is invisible at code-generation time because of the build tags. func Convert_core_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(in *core.PersistentVolumeSpec, out *v1.PersistentVolumeSpec, s conversion.Scope) error { return autoConvert_core_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(in, out, s) } // Convert_v1_PersistentVolumeSpec_To_core_PersistentVolumeSpec is defined outside the autogenerated file for use by other API packages +// This is needed because it is referenced from other APIs, but is invisible at code-generation time because of the build tags. func Convert_v1_PersistentVolumeSpec_To_core_PersistentVolumeSpec(in *v1.PersistentVolumeSpec, out *core.PersistentVolumeSpec, s conversion.Scope) error { return autoConvert_v1_PersistentVolumeSpec_To_core_PersistentVolumeSpec(in, out, s) }