diff --git a/pkg/apis/kubeflow.org/v1/groupversion_info.go b/pkg/apis/kubeflow.org/v1/groupversion_info.go index 20180ad596..c38629da15 100644 --- a/pkg/apis/kubeflow.org/v1/groupversion_info.go +++ b/pkg/apis/kubeflow.org/v1/groupversion_info.go @@ -36,3 +36,8 @@ var ( // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme ) + +// Resource takes an unqualified resource and returns a Group-qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return GroupVersion.WithResource(resource).GroupResource() +} diff --git a/pkg/apis/kubeflow.org/v1/register.go b/pkg/apis/kubeflow.org/v1/register.go deleted file mode 100644 index cad0586100..0000000000 --- a/pkg/apis/kubeflow.org/v1/register.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2018 The Kubeflow Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package v1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = GroupVersion - -// Resource takes an unqualified resource and returns a Group-qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return GroupVersion.WithResource(resource).GroupResource() -} diff --git a/pkg/apis/kubeflow.org/v2alpha1/groupversion_info.go b/pkg/apis/kubeflow.org/v2alpha1/groupversion_info.go index a4cc2fd7d5..d6a4656b97 100644 --- a/pkg/apis/kubeflow.org/v2alpha1/groupversion_info.go +++ b/pkg/apis/kubeflow.org/v2alpha1/groupversion_info.go @@ -37,3 +37,8 @@ var ( // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme ) + +// Resource takes an unqualified resource and returns a Group-qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return GroupVersion.WithResource(resource).GroupResource() +} diff --git a/pkg/apis/kubeflow.org/v2alpha1/register.go b/pkg/apis/kubeflow.org/v2alpha1/register.go deleted file mode 100644 index 9d8659b757..0000000000 --- a/pkg/apis/kubeflow.org/v2alpha1/register.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2024 The Kubeflow Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package v2alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// Resource takes an unqualified resource and returns a Group-qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return GroupVersion.WithResource(resource).GroupResource() -}