-
Notifications
You must be signed in to change notification settings - Fork 451
/
deep_copy.generated.go
467 lines (435 loc) · 14.5 KB
/
deep_copy.generated.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Code generated by "deep-copy -type AdmissionControlConfigSpec -type APIServerConfigSpec -type AuditPolicyConfigSpec -type BootstrapManifestsConfigSpec -type ConfigStatusSpec -type ControllerManagerConfigSpec -type EndpointSpec -type ExtraManifestsConfigSpec -type KubeletLifecycleSpec -type KubePrismConfigSpec -type KubePrismEndpointsSpec -type KubePrismStatusesSpec -type KubeletSpecSpec -type ManifestSpec -type ManifestStatusSpec -type NodeCordonedSpecSpec -type NodeLabelSpecSpec -type NodeTaintSpecSpec -type KubeletConfigSpec -type NodeIPSpec -type NodeIPConfigSpec -type NodeStatusSpec -type NodenameSpec -type SchedulerConfigSpec -type SecretsStatusSpec -type StaticPodSpec -type StaticPodStatusSpec -type StaticPodServerStatusSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT.
package k8s
import (
"net/netip"
specs "github.com/opencontainers/runtime-spec/specs-go"
)
// DeepCopy generates a deep copy of AdmissionControlConfigSpec.
func (o AdmissionControlConfigSpec) DeepCopy() AdmissionControlConfigSpec {
var cp AdmissionControlConfigSpec = o
if o.Config != nil {
cp.Config = make([]AdmissionPluginSpec, len(o.Config))
copy(cp.Config, o.Config)
for i2 := range o.Config {
if o.Config[i2].Configuration != nil {
cp.Config[i2].Configuration = make(map[string]interface{}, len(o.Config[i2].Configuration))
for k4, v4 := range o.Config[i2].Configuration {
cp.Config[i2].Configuration[k4] = v4
}
}
}
}
return cp
}
// DeepCopy generates a deep copy of APIServerConfigSpec.
func (o APIServerConfigSpec) DeepCopy() APIServerConfigSpec {
var cp APIServerConfigSpec = o
if o.EtcdServers != nil {
cp.EtcdServers = make([]string, len(o.EtcdServers))
copy(cp.EtcdServers, o.EtcdServers)
}
if o.ServiceCIDRs != nil {
cp.ServiceCIDRs = make([]string, len(o.ServiceCIDRs))
copy(cp.ServiceCIDRs, o.ServiceCIDRs)
}
if o.ExtraArgs != nil {
cp.ExtraArgs = make(map[string]string, len(o.ExtraArgs))
for k2, v2 := range o.ExtraArgs {
cp.ExtraArgs[k2] = v2
}
}
if o.ExtraVolumes != nil {
cp.ExtraVolumes = make([]ExtraVolume, len(o.ExtraVolumes))
copy(cp.ExtraVolumes, o.ExtraVolumes)
}
if o.EnvironmentVariables != nil {
cp.EnvironmentVariables = make(map[string]string, len(o.EnvironmentVariables))
for k2, v2 := range o.EnvironmentVariables {
cp.EnvironmentVariables[k2] = v2
}
}
if o.Resources.Requests != nil {
cp.Resources.Requests = make(map[string]string, len(o.Resources.Requests))
for k3, v3 := range o.Resources.Requests {
cp.Resources.Requests[k3] = v3
}
}
if o.Resources.Limits != nil {
cp.Resources.Limits = make(map[string]string, len(o.Resources.Limits))
for k3, v3 := range o.Resources.Limits {
cp.Resources.Limits[k3] = v3
}
}
return cp
}
// DeepCopy generates a deep copy of AuditPolicyConfigSpec.
func (o AuditPolicyConfigSpec) DeepCopy() AuditPolicyConfigSpec {
var cp AuditPolicyConfigSpec = o
if o.Config != nil {
cp.Config = make(map[string]interface{}, len(o.Config))
for k2, v2 := range o.Config {
cp.Config[k2] = v2
}
}
return cp
}
// DeepCopy generates a deep copy of BootstrapManifestsConfigSpec.
func (o BootstrapManifestsConfigSpec) DeepCopy() BootstrapManifestsConfigSpec {
var cp BootstrapManifestsConfigSpec = o
if o.PodCIDRs != nil {
cp.PodCIDRs = make([]string, len(o.PodCIDRs))
copy(cp.PodCIDRs, o.PodCIDRs)
}
if o.ProxyArgs != nil {
cp.ProxyArgs = make([]string, len(o.ProxyArgs))
copy(cp.ProxyArgs, o.ProxyArgs)
}
if o.FlannelExtraArgs != nil {
cp.FlannelExtraArgs = make([]string, len(o.FlannelExtraArgs))
copy(cp.FlannelExtraArgs, o.FlannelExtraArgs)
}
return cp
}
// DeepCopy generates a deep copy of ConfigStatusSpec.
func (o ConfigStatusSpec) DeepCopy() ConfigStatusSpec {
var cp ConfigStatusSpec = o
return cp
}
// DeepCopy generates a deep copy of ControllerManagerConfigSpec.
func (o ControllerManagerConfigSpec) DeepCopy() ControllerManagerConfigSpec {
var cp ControllerManagerConfigSpec = o
if o.PodCIDRs != nil {
cp.PodCIDRs = make([]string, len(o.PodCIDRs))
copy(cp.PodCIDRs, o.PodCIDRs)
}
if o.ServiceCIDRs != nil {
cp.ServiceCIDRs = make([]string, len(o.ServiceCIDRs))
copy(cp.ServiceCIDRs, o.ServiceCIDRs)
}
if o.ExtraArgs != nil {
cp.ExtraArgs = make(map[string]string, len(o.ExtraArgs))
for k2, v2 := range o.ExtraArgs {
cp.ExtraArgs[k2] = v2
}
}
if o.ExtraVolumes != nil {
cp.ExtraVolumes = make([]ExtraVolume, len(o.ExtraVolumes))
copy(cp.ExtraVolumes, o.ExtraVolumes)
}
if o.EnvironmentVariables != nil {
cp.EnvironmentVariables = make(map[string]string, len(o.EnvironmentVariables))
for k2, v2 := range o.EnvironmentVariables {
cp.EnvironmentVariables[k2] = v2
}
}
if o.Resources.Requests != nil {
cp.Resources.Requests = make(map[string]string, len(o.Resources.Requests))
for k3, v3 := range o.Resources.Requests {
cp.Resources.Requests[k3] = v3
}
}
if o.Resources.Limits != nil {
cp.Resources.Limits = make(map[string]string, len(o.Resources.Limits))
for k3, v3 := range o.Resources.Limits {
cp.Resources.Limits[k3] = v3
}
}
return cp
}
// DeepCopy generates a deep copy of EndpointSpec.
func (o EndpointSpec) DeepCopy() EndpointSpec {
var cp EndpointSpec = o
if o.Addresses != nil {
cp.Addresses = make([]netip.Addr, len(o.Addresses))
copy(cp.Addresses, o.Addresses)
}
return cp
}
// DeepCopy generates a deep copy of ExtraManifestsConfigSpec.
func (o ExtraManifestsConfigSpec) DeepCopy() ExtraManifestsConfigSpec {
var cp ExtraManifestsConfigSpec = o
if o.ExtraManifests != nil {
cp.ExtraManifests = make([]ExtraManifest, len(o.ExtraManifests))
copy(cp.ExtraManifests, o.ExtraManifests)
for i2 := range o.ExtraManifests {
if o.ExtraManifests[i2].ExtraHeaders != nil {
cp.ExtraManifests[i2].ExtraHeaders = make(map[string]string, len(o.ExtraManifests[i2].ExtraHeaders))
for k4, v4 := range o.ExtraManifests[i2].ExtraHeaders {
cp.ExtraManifests[i2].ExtraHeaders[k4] = v4
}
}
}
}
return cp
}
// DeepCopy generates a deep copy of KubeletLifecycleSpec.
func (o KubeletLifecycleSpec) DeepCopy() KubeletLifecycleSpec {
var cp KubeletLifecycleSpec = o
return cp
}
// DeepCopy generates a deep copy of KubePrismConfigSpec.
func (o KubePrismConfigSpec) DeepCopy() KubePrismConfigSpec {
var cp KubePrismConfigSpec = o
if o.Endpoints != nil {
cp.Endpoints = make([]KubePrismEndpoint, len(o.Endpoints))
copy(cp.Endpoints, o.Endpoints)
}
return cp
}
// DeepCopy generates a deep copy of KubePrismEndpointsSpec.
func (o KubePrismEndpointsSpec) DeepCopy() KubePrismEndpointsSpec {
var cp KubePrismEndpointsSpec = o
if o.Endpoints != nil {
cp.Endpoints = make([]KubePrismEndpoint, len(o.Endpoints))
copy(cp.Endpoints, o.Endpoints)
}
return cp
}
// DeepCopy generates a deep copy of KubePrismStatusesSpec.
func (o KubePrismStatusesSpec) DeepCopy() KubePrismStatusesSpec {
var cp KubePrismStatusesSpec = o
return cp
}
// DeepCopy generates a deep copy of KubeletSpecSpec.
func (o KubeletSpecSpec) DeepCopy() KubeletSpecSpec {
var cp KubeletSpecSpec = o
if o.Args != nil {
cp.Args = make([]string, len(o.Args))
copy(cp.Args, o.Args)
}
if o.ExtraMounts != nil {
cp.ExtraMounts = make([]specs.Mount, len(o.ExtraMounts))
copy(cp.ExtraMounts, o.ExtraMounts)
for i2 := range o.ExtraMounts {
if o.ExtraMounts[i2].Options != nil {
cp.ExtraMounts[i2].Options = make([]string, len(o.ExtraMounts[i2].Options))
copy(cp.ExtraMounts[i2].Options, o.ExtraMounts[i2].Options)
}
if o.ExtraMounts[i2].UIDMappings != nil {
cp.ExtraMounts[i2].UIDMappings = make([]specs.LinuxIDMapping, len(o.ExtraMounts[i2].UIDMappings))
copy(cp.ExtraMounts[i2].UIDMappings, o.ExtraMounts[i2].UIDMappings)
}
if o.ExtraMounts[i2].GIDMappings != nil {
cp.ExtraMounts[i2].GIDMappings = make([]specs.LinuxIDMapping, len(o.ExtraMounts[i2].GIDMappings))
copy(cp.ExtraMounts[i2].GIDMappings, o.ExtraMounts[i2].GIDMappings)
}
}
}
if o.Config != nil {
cp.Config = make(map[string]any, len(o.Config))
for k2, v2 := range o.Config {
cp.Config[k2] = v2
}
}
if o.CredentialProviderConfig != nil {
cp.CredentialProviderConfig = make(map[string]any, len(o.CredentialProviderConfig))
for k2, v2 := range o.CredentialProviderConfig {
cp.CredentialProviderConfig[k2] = v2
}
}
return cp
}
// DeepCopy generates a deep copy of ManifestSpec.
func (o ManifestSpec) DeepCopy() ManifestSpec {
var cp ManifestSpec = o
if o.Items != nil {
cp.Items = make([]SingleManifest, len(o.Items))
copy(cp.Items, o.Items)
for i2 := range o.Items {
if o.Items[i2].Object != nil {
cp.Items[i2].Object = make(map[string]interface{}, len(o.Items[i2].Object))
for k4, v4 := range o.Items[i2].Object {
cp.Items[i2].Object[k4] = v4
}
}
}
}
return cp
}
// DeepCopy generates a deep copy of ManifestStatusSpec.
func (o ManifestStatusSpec) DeepCopy() ManifestStatusSpec {
var cp ManifestStatusSpec = o
if o.ManifestsApplied != nil {
cp.ManifestsApplied = make([]string, len(o.ManifestsApplied))
copy(cp.ManifestsApplied, o.ManifestsApplied)
}
return cp
}
// DeepCopy generates a deep copy of NodeCordonedSpecSpec.
func (o NodeCordonedSpecSpec) DeepCopy() NodeCordonedSpecSpec {
var cp NodeCordonedSpecSpec = o
return cp
}
// DeepCopy generates a deep copy of NodeLabelSpecSpec.
func (o NodeLabelSpecSpec) DeepCopy() NodeLabelSpecSpec {
var cp NodeLabelSpecSpec = o
return cp
}
// DeepCopy generates a deep copy of NodeTaintSpecSpec.
func (o NodeTaintSpecSpec) DeepCopy() NodeTaintSpecSpec {
var cp NodeTaintSpecSpec = o
return cp
}
// DeepCopy generates a deep copy of KubeletConfigSpec.
func (o KubeletConfigSpec) DeepCopy() KubeletConfigSpec {
var cp KubeletConfigSpec = o
if o.ClusterDNS != nil {
cp.ClusterDNS = make([]string, len(o.ClusterDNS))
copy(cp.ClusterDNS, o.ClusterDNS)
}
if o.ExtraArgs != nil {
cp.ExtraArgs = make(map[string]string, len(o.ExtraArgs))
for k2, v2 := range o.ExtraArgs {
cp.ExtraArgs[k2] = v2
}
}
if o.ExtraMounts != nil {
cp.ExtraMounts = make([]specs.Mount, len(o.ExtraMounts))
copy(cp.ExtraMounts, o.ExtraMounts)
for i2 := range o.ExtraMounts {
if o.ExtraMounts[i2].Options != nil {
cp.ExtraMounts[i2].Options = make([]string, len(o.ExtraMounts[i2].Options))
copy(cp.ExtraMounts[i2].Options, o.ExtraMounts[i2].Options)
}
if o.ExtraMounts[i2].UIDMappings != nil {
cp.ExtraMounts[i2].UIDMappings = make([]specs.LinuxIDMapping, len(o.ExtraMounts[i2].UIDMappings))
copy(cp.ExtraMounts[i2].UIDMappings, o.ExtraMounts[i2].UIDMappings)
}
if o.ExtraMounts[i2].GIDMappings != nil {
cp.ExtraMounts[i2].GIDMappings = make([]specs.LinuxIDMapping, len(o.ExtraMounts[i2].GIDMappings))
copy(cp.ExtraMounts[i2].GIDMappings, o.ExtraMounts[i2].GIDMappings)
}
}
}
if o.ExtraConfig != nil {
cp.ExtraConfig = make(map[string]any, len(o.ExtraConfig))
for k2, v2 := range o.ExtraConfig {
cp.ExtraConfig[k2] = v2
}
}
if o.CredentialProviderConfig != nil {
cp.CredentialProviderConfig = make(map[string]any, len(o.CredentialProviderConfig))
for k2, v2 := range o.CredentialProviderConfig {
cp.CredentialProviderConfig[k2] = v2
}
}
return cp
}
// DeepCopy generates a deep copy of NodeIPSpec.
func (o NodeIPSpec) DeepCopy() NodeIPSpec {
var cp NodeIPSpec = o
if o.Addresses != nil {
cp.Addresses = make([]netip.Addr, len(o.Addresses))
copy(cp.Addresses, o.Addresses)
}
return cp
}
// DeepCopy generates a deep copy of NodeIPConfigSpec.
func (o NodeIPConfigSpec) DeepCopy() NodeIPConfigSpec {
var cp NodeIPConfigSpec = o
if o.ValidSubnets != nil {
cp.ValidSubnets = make([]string, len(o.ValidSubnets))
copy(cp.ValidSubnets, o.ValidSubnets)
}
if o.ExcludeSubnets != nil {
cp.ExcludeSubnets = make([]string, len(o.ExcludeSubnets))
copy(cp.ExcludeSubnets, o.ExcludeSubnets)
}
return cp
}
// DeepCopy generates a deep copy of NodeStatusSpec.
func (o NodeStatusSpec) DeepCopy() NodeStatusSpec {
var cp NodeStatusSpec = o
if o.Labels != nil {
cp.Labels = make(map[string]string, len(o.Labels))
for k2, v2 := range o.Labels {
cp.Labels[k2] = v2
}
}
if o.Annotations != nil {
cp.Annotations = make(map[string]string, len(o.Annotations))
for k2, v2 := range o.Annotations {
cp.Annotations[k2] = v2
}
}
return cp
}
// DeepCopy generates a deep copy of NodenameSpec.
func (o NodenameSpec) DeepCopy() NodenameSpec {
var cp NodenameSpec = o
return cp
}
// DeepCopy generates a deep copy of SchedulerConfigSpec.
func (o SchedulerConfigSpec) DeepCopy() SchedulerConfigSpec {
var cp SchedulerConfigSpec = o
if o.ExtraArgs != nil {
cp.ExtraArgs = make(map[string]string, len(o.ExtraArgs))
for k2, v2 := range o.ExtraArgs {
cp.ExtraArgs[k2] = v2
}
}
if o.ExtraVolumes != nil {
cp.ExtraVolumes = make([]ExtraVolume, len(o.ExtraVolumes))
copy(cp.ExtraVolumes, o.ExtraVolumes)
}
if o.EnvironmentVariables != nil {
cp.EnvironmentVariables = make(map[string]string, len(o.EnvironmentVariables))
for k2, v2 := range o.EnvironmentVariables {
cp.EnvironmentVariables[k2] = v2
}
}
if o.Resources.Requests != nil {
cp.Resources.Requests = make(map[string]string, len(o.Resources.Requests))
for k3, v3 := range o.Resources.Requests {
cp.Resources.Requests[k3] = v3
}
}
if o.Resources.Limits != nil {
cp.Resources.Limits = make(map[string]string, len(o.Resources.Limits))
for k3, v3 := range o.Resources.Limits {
cp.Resources.Limits[k3] = v3
}
}
if o.Config != nil {
cp.Config = make(map[string]any, len(o.Config))
for k2, v2 := range o.Config {
cp.Config[k2] = v2
}
}
return cp
}
// DeepCopy generates a deep copy of SecretsStatusSpec.
func (o SecretsStatusSpec) DeepCopy() SecretsStatusSpec {
var cp SecretsStatusSpec = o
return cp
}
// DeepCopy generates a deep copy of StaticPodSpec.
func (o StaticPodSpec) DeepCopy() StaticPodSpec {
var cp StaticPodSpec = o
if o.Pod != nil {
cp.Pod = make(map[string]any, len(o.Pod))
for k2, v2 := range o.Pod {
cp.Pod[k2] = v2
}
}
return cp
}
// DeepCopy generates a deep copy of StaticPodStatusSpec.
func (o StaticPodStatusSpec) DeepCopy() StaticPodStatusSpec {
var cp StaticPodStatusSpec = o
if o.PodStatus != nil {
cp.PodStatus = make(map[string]any, len(o.PodStatus))
for k2, v2 := range o.PodStatus {
cp.PodStatus[k2] = v2
}
}
return cp
}
// DeepCopy generates a deep copy of StaticPodServerStatusSpec.
func (o StaticPodServerStatusSpec) DeepCopy() StaticPodServerStatusSpec {
var cp StaticPodServerStatusSpec = o
return cp
}