1
2
3
4
19
20
21
22 package v1alpha1
23
24 import (
25 unsafe "unsafe"
26
27 v1 "k8s.io/api/core/v1"
28 v1alpha1 "k8s.io/api/node/v1alpha1"
29 conversion "k8s.io/apimachinery/pkg/conversion"
30 runtime "k8s.io/apimachinery/pkg/runtime"
31 core "k8s.io/kubernetes/pkg/apis/core"
32 node "k8s.io/kubernetes/pkg/apis/node"
33 )
34
35 func init() {
36 localSchemeBuilder.Register(RegisterConversions)
37 }
38
39
40
41 func RegisterConversions(s *runtime.Scheme) error {
42 if err := s.AddGeneratedConversionFunc((*v1alpha1.Overhead)(nil), (*node.Overhead)(nil), func(a, b interface{}, scope conversion.Scope) error {
43 return Convert_v1alpha1_Overhead_To_node_Overhead(a.(*v1alpha1.Overhead), b.(*node.Overhead), scope)
44 }); err != nil {
45 return err
46 }
47 if err := s.AddGeneratedConversionFunc((*node.Overhead)(nil), (*v1alpha1.Overhead)(nil), func(a, b interface{}, scope conversion.Scope) error {
48 return Convert_node_Overhead_To_v1alpha1_Overhead(a.(*node.Overhead), b.(*v1alpha1.Overhead), scope)
49 }); err != nil {
50 return err
51 }
52 if err := s.AddGeneratedConversionFunc((*v1alpha1.RuntimeClassList)(nil), (*node.RuntimeClassList)(nil), func(a, b interface{}, scope conversion.Scope) error {
53 return Convert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList(a.(*v1alpha1.RuntimeClassList), b.(*node.RuntimeClassList), scope)
54 }); err != nil {
55 return err
56 }
57 if err := s.AddGeneratedConversionFunc((*node.RuntimeClassList)(nil), (*v1alpha1.RuntimeClassList)(nil), func(a, b interface{}, scope conversion.Scope) error {
58 return Convert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList(a.(*node.RuntimeClassList), b.(*v1alpha1.RuntimeClassList), scope)
59 }); err != nil {
60 return err
61 }
62 if err := s.AddGeneratedConversionFunc((*v1alpha1.Scheduling)(nil), (*node.Scheduling)(nil), func(a, b interface{}, scope conversion.Scope) error {
63 return Convert_v1alpha1_Scheduling_To_node_Scheduling(a.(*v1alpha1.Scheduling), b.(*node.Scheduling), scope)
64 }); err != nil {
65 return err
66 }
67 if err := s.AddGeneratedConversionFunc((*node.Scheduling)(nil), (*v1alpha1.Scheduling)(nil), func(a, b interface{}, scope conversion.Scope) error {
68 return Convert_node_Scheduling_To_v1alpha1_Scheduling(a.(*node.Scheduling), b.(*v1alpha1.Scheduling), scope)
69 }); err != nil {
70 return err
71 }
72 if err := s.AddConversionFunc((*node.RuntimeClass)(nil), (*v1alpha1.RuntimeClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
73 return Convert_node_RuntimeClass_To_v1alpha1_RuntimeClass(a.(*node.RuntimeClass), b.(*v1alpha1.RuntimeClass), scope)
74 }); err != nil {
75 return err
76 }
77 if err := s.AddConversionFunc((*v1alpha1.RuntimeClass)(nil), (*node.RuntimeClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
78 return Convert_v1alpha1_RuntimeClass_To_node_RuntimeClass(a.(*v1alpha1.RuntimeClass), b.(*node.RuntimeClass), scope)
79 }); err != nil {
80 return err
81 }
82 return nil
83 }
84
85 func autoConvert_v1alpha1_Overhead_To_node_Overhead(in *v1alpha1.Overhead, out *node.Overhead, s conversion.Scope) error {
86 out.PodFixed = *(*core.ResourceList)(unsafe.Pointer(&in.PodFixed))
87 return nil
88 }
89
90
91 func Convert_v1alpha1_Overhead_To_node_Overhead(in *v1alpha1.Overhead, out *node.Overhead, s conversion.Scope) error {
92 return autoConvert_v1alpha1_Overhead_To_node_Overhead(in, out, s)
93 }
94
95 func autoConvert_node_Overhead_To_v1alpha1_Overhead(in *node.Overhead, out *v1alpha1.Overhead, s conversion.Scope) error {
96 out.PodFixed = *(*v1.ResourceList)(unsafe.Pointer(&in.PodFixed))
97 return nil
98 }
99
100
101 func Convert_node_Overhead_To_v1alpha1_Overhead(in *node.Overhead, out *v1alpha1.Overhead, s conversion.Scope) error {
102 return autoConvert_node_Overhead_To_v1alpha1_Overhead(in, out, s)
103 }
104
105 func autoConvert_v1alpha1_RuntimeClass_To_node_RuntimeClass(in *v1alpha1.RuntimeClass, out *node.RuntimeClass, s conversion.Scope) error {
106 out.ObjectMeta = in.ObjectMeta
107
108 return nil
109 }
110
111 func autoConvert_node_RuntimeClass_To_v1alpha1_RuntimeClass(in *node.RuntimeClass, out *v1alpha1.RuntimeClass, s conversion.Scope) error {
112 out.ObjectMeta = in.ObjectMeta
113
114
115
116 return nil
117 }
118
119 func autoConvert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList(in *v1alpha1.RuntimeClassList, out *node.RuntimeClassList, s conversion.Scope) error {
120 out.ListMeta = in.ListMeta
121 if in.Items != nil {
122 in, out := &in.Items, &out.Items
123 *out = make([]node.RuntimeClass, len(*in))
124 for i := range *in {
125 if err := Convert_v1alpha1_RuntimeClass_To_node_RuntimeClass(&(*in)[i], &(*out)[i], s); err != nil {
126 return err
127 }
128 }
129 } else {
130 out.Items = nil
131 }
132 return nil
133 }
134
135
136 func Convert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList(in *v1alpha1.RuntimeClassList, out *node.RuntimeClassList, s conversion.Scope) error {
137 return autoConvert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList(in, out, s)
138 }
139
140 func autoConvert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList(in *node.RuntimeClassList, out *v1alpha1.RuntimeClassList, s conversion.Scope) error {
141 out.ListMeta = in.ListMeta
142 if in.Items != nil {
143 in, out := &in.Items, &out.Items
144 *out = make([]v1alpha1.RuntimeClass, len(*in))
145 for i := range *in {
146 if err := Convert_node_RuntimeClass_To_v1alpha1_RuntimeClass(&(*in)[i], &(*out)[i], s); err != nil {
147 return err
148 }
149 }
150 } else {
151 out.Items = nil
152 }
153 return nil
154 }
155
156
157 func Convert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList(in *node.RuntimeClassList, out *v1alpha1.RuntimeClassList, s conversion.Scope) error {
158 return autoConvert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList(in, out, s)
159 }
160
161 func autoConvert_v1alpha1_Scheduling_To_node_Scheduling(in *v1alpha1.Scheduling, out *node.Scheduling, s conversion.Scope) error {
162 out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector))
163 out.Tolerations = *(*[]core.Toleration)(unsafe.Pointer(&in.Tolerations))
164 return nil
165 }
166
167
168 func Convert_v1alpha1_Scheduling_To_node_Scheduling(in *v1alpha1.Scheduling, out *node.Scheduling, s conversion.Scope) error {
169 return autoConvert_v1alpha1_Scheduling_To_node_Scheduling(in, out, s)
170 }
171
172 func autoConvert_node_Scheduling_To_v1alpha1_Scheduling(in *node.Scheduling, out *v1alpha1.Scheduling, s conversion.Scope) error {
173 out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector))
174 out.Tolerations = *(*[]v1.Toleration)(unsafe.Pointer(&in.Tolerations))
175 return nil
176 }
177
178
179 func Convert_node_Scheduling_To_v1alpha1_Scheduling(in *node.Scheduling, out *v1alpha1.Scheduling, s conversion.Scope) error {
180 return autoConvert_node_Scheduling_To_v1alpha1_Scheduling(in, out, s)
181 }
182
View as plain text