add simpletype pkg in v1 for register-gen test

Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
This commit is contained in:
Lionel Jouin 2025-02-04 20:11:37 +01:00 committed by Henrik Schmidt
parent 5fa72a8c1d
commit 6ad9199528
No known key found for this signature in database
GPG Key ID: D62C3457F0C3B048
4 changed files with 9 additions and 10 deletions

View File

@ -16,5 +16,4 @@ limitations under the License.
// +k8s:register-gen=simpletype // +k8s:register-gen=simpletype
// +groupName=simpletype.foo.bar package v1
package simpletype

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package simpletype package v1
import ( import (
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package simpletype package v1
import ( import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

View File

@ -19,23 +19,23 @@ limitations under the License.
// Code generated by register-gen. DO NOT EDIT. // Code generated by register-gen. DO NOT EDIT.
package simpletype package v1
import ( import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema" schema "k8s.io/apimachinery/pkg/runtime/schema"
) )
// GroupName specifies the group name used to register the objects. // GroupName specifies the group name used to register the objects.
const GroupName = "simpletype.foo.bar" const GroupName = "simpletype"
// GroupVersion specifies the group and the version used to register the objects. // GroupVersion specifies the group and the version used to register the objects.
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "simpletype"} var GroupVersion = metav1.GroupVersion{Group: GroupName, Version: "v1"}
// SchemeGroupVersion is group version used to register these objects // SchemeGroupVersion is group version used to register these objects
// Deprecated: use GroupVersion instead. // Deprecated: use GroupVersion instead.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "simpletype"} var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource // Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource { func Resource(resource string) schema.GroupResource {
@ -64,6 +64,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&SimpleType{}, &SimpleType{},
) )
// AddToGroupVersion allows the serialization of client types like ListOptions. // AddToGroupVersion allows the serialization of client types like ListOptions.
v1.AddToGroupVersion(scheme, SchemeGroupVersion) metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil return nil
} }