/
register.go
36 lines (28 loc) · 1.24 KB
/
register.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// NOTE: Boilerplate only. Ignore this file.
// Package v1 contains API Schema definitions for the hive v1 API group
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=github.com/openshift/hive/pkg/apis/hive
// +k8s:defaulter-gen=TypeMeta
// +groupName=hive.openshift.io
package v1
import (
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/runtime/scheme"
)
var (
// HiveAPIGroup is the group that all hive objects belong to in the API server.
HiveAPIGroup = "hive.openshift.io"
// HiveAPIVersion is the api version that all hive objects are currently at.
HiveAPIVersion = "v1"
// SchemeGroupVersion is group version used to register these objects
SchemeGroupVersion = schema.GroupVersion{Group: HiveAPIGroup, Version: HiveAPIVersion}
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
// AddToScheme is a shortcut for SchemeBuilder.AddToScheme
AddToScheme = SchemeBuilder.AddToScheme
)
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}