-
Notifications
You must be signed in to change notification settings - Fork 18
/
groupversion_info.go
111 lines (81 loc) · 4.01 KB
/
groupversion_info.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
Copyright 2021 The Crossplane 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 v1alpha1 contains API Schema definitions for the sls v1alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=sls.alibaba.crossplane.io
package v1alpha1
import (
"reflect"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)
var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "sls.alibaba.crossplane.io", Version: "v1alpha1"}
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)
var (
// ProjectKind is the kind of Project
ProjectKind = reflect.TypeOf(Project{}).Name()
// ProjectGroupKind is the group and kind of Project
ProjectGroupKind = schema.GroupKind{Group: GroupVersion.Group, Kind: ProjectKind}.String()
// ProjectGroupVersionKind is the group, version and kind of Project
ProjectGroupVersionKind = GroupVersion.WithKind(ProjectKind)
)
var (
// StoreKind is the kind of Log LogStore
StoreKind = reflect.TypeOf(LogStore{}).Name()
// StoreGroupKind is the group and kind of LogStore
StoreGroupKind = schema.GroupKind{Group: GroupVersion.Group, Kind: StoreKind}.String()
// StoreGroupVersionKind is the group, version and kind of LogStore
StoreGroupVersionKind = GroupVersion.WithKind(StoreKind)
)
var (
// LogtailKind is the kind of Logtail
LogtailKind = reflect.TypeOf(Logtail{}).Name()
// LogtailGroupKind is the group and kind of Logtail
LogtailGroupKind = schema.GroupKind{Group: GroupVersion.Group, Kind: LogtailKind}.String()
// LogtailGroupVersionKind is the group, version and kind of Logtail
LogtailGroupVersionKind = GroupVersion.WithKind(LogtailKind)
)
var (
// IndexKind is the kind of Logstore index
IndexKind = reflect.TypeOf(LogstoreIndex{}).Name()
// IndexGroupKind is the group and kind of Logstore index
IndexGroupKind = schema.GroupKind{Group: GroupVersion.Group, Kind: IndexKind}.String()
// IndexGroupVersionKind is the group, version and kind of Logstore index
IndexGroupVersionKind = GroupVersion.WithKind(IndexKind)
// MachineGroupKind is the kind of MachineGroup
MachineGroupKind = reflect.TypeOf(MachineGroup{}).Name()
// MachineGroupGroupKind is the group and kind of MachineGroup
MachineGroupGroupKind = schema.GroupKind{Group: GroupVersion.Group, Kind: MachineGroupKind}.String()
// MachineGroupVersionKind is the group, version and kind of MachineGroup
MachineGroupVersionKind = GroupVersion.WithKind(MachineGroupKind)
// MachineGroupBindingKind is the kind of MachineGroupBinding
MachineGroupBindingKind = reflect.TypeOf(MachineGroupBinding{}).Name()
// MachineGroupBindingGroupKind is the group and kind of MachineGroupBinding
MachineGroupBindingGroupKind = schema.GroupKind{Group: GroupVersion.Group, Kind: MachineGroupBindingKind}.String()
// MachineGroupBindingGroupVersionKind is the group, version and kind of MachineGroupBinding
MachineGroupBindingGroupVersionKind = GroupVersion.WithKind(MachineGroupBindingKind)
)
func init() {
SchemeBuilder.Register(&Project{}, &ProjectList{})
SchemeBuilder.Register(&LogStore{}, &LogStoreList{})
SchemeBuilder.Register(&Logtail{}, &LogtailList{})
SchemeBuilder.Register(&LogstoreIndex{}, &LogstoreIndexList{})
SchemeBuilder.Register(&MachineGroup{}, &MachineGroupList{})
SchemeBuilder.Register(&MachineGroupBinding{}, &MachineGroupBindingList{})
}