/
delta.go
529 lines (521 loc) · 39 KB
/
delta.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
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" file accompanying this file. This file 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.
// Code generated by ack-generate. DO NOT EDIT.
package instance
import (
"bytes"
"reflect"
ackcompare "github.com/aws-controllers-k8s/runtime/pkg/compare"
acktags "github.com/aws-controllers-k8s/runtime/pkg/tags"
)
// Hack to avoid import errors during build...
var (
_ = &bytes.Buffer{}
_ = &reflect.Method{}
_ = &acktags.Tags{}
)
// newResourceDelta returns a new `ackcompare.Delta` used to compare two
// resources
func newResourceDelta(
a *resource,
b *resource,
) *ackcompare.Delta {
delta := ackcompare.NewDelta()
if (a == nil && b != nil) ||
(a != nil && b == nil) {
delta.Add("", a, b)
return delta
}
compareTags(delta, a, b)
if len(a.ko.Spec.BlockDeviceMappings) != len(b.ko.Spec.BlockDeviceMappings) {
delta.Add("Spec.BlockDeviceMappings", a.ko.Spec.BlockDeviceMappings, b.ko.Spec.BlockDeviceMappings)
} else if len(a.ko.Spec.BlockDeviceMappings) > 0 {
if !reflect.DeepEqual(a.ko.Spec.BlockDeviceMappings, b.ko.Spec.BlockDeviceMappings) {
delta.Add("Spec.BlockDeviceMappings", a.ko.Spec.BlockDeviceMappings, b.ko.Spec.BlockDeviceMappings)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.CapacityReservationSpecification, b.ko.Spec.CapacityReservationSpecification) {
delta.Add("Spec.CapacityReservationSpecification", a.ko.Spec.CapacityReservationSpecification, b.ko.Spec.CapacityReservationSpecification)
} else if a.ko.Spec.CapacityReservationSpecification != nil && b.ko.Spec.CapacityReservationSpecification != nil {
if ackcompare.HasNilDifference(a.ko.Spec.CapacityReservationSpecification.CapacityReservationPreference, b.ko.Spec.CapacityReservationSpecification.CapacityReservationPreference) {
delta.Add("Spec.CapacityReservationSpecification.CapacityReservationPreference", a.ko.Spec.CapacityReservationSpecification.CapacityReservationPreference, b.ko.Spec.CapacityReservationSpecification.CapacityReservationPreference)
} else if a.ko.Spec.CapacityReservationSpecification.CapacityReservationPreference != nil && b.ko.Spec.CapacityReservationSpecification.CapacityReservationPreference != nil {
if *a.ko.Spec.CapacityReservationSpecification.CapacityReservationPreference != *b.ko.Spec.CapacityReservationSpecification.CapacityReservationPreference {
delta.Add("Spec.CapacityReservationSpecification.CapacityReservationPreference", a.ko.Spec.CapacityReservationSpecification.CapacityReservationPreference, b.ko.Spec.CapacityReservationSpecification.CapacityReservationPreference)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget, b.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget) {
delta.Add("Spec.CapacityReservationSpecification.CapacityReservationTarget", a.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget, b.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget)
} else if a.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget != nil && b.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget != nil {
if ackcompare.HasNilDifference(a.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID, b.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID) {
delta.Add("Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID", a.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID, b.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID)
} else if a.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID != nil && b.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID != nil {
if *a.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID != *b.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID {
delta.Add("Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID", a.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID, b.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupARN, b.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupARN) {
delta.Add("Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupARN", a.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupARN, b.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupARN)
} else if a.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupARN != nil && b.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupARN != nil {
if *a.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupARN != *b.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupARN {
delta.Add("Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupARN", a.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupARN, b.ko.Spec.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupARN)
}
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.CPUOptions, b.ko.Spec.CPUOptions) {
delta.Add("Spec.CPUOptions", a.ko.Spec.CPUOptions, b.ko.Spec.CPUOptions)
} else if a.ko.Spec.CPUOptions != nil && b.ko.Spec.CPUOptions != nil {
if ackcompare.HasNilDifference(a.ko.Spec.CPUOptions.CoreCount, b.ko.Spec.CPUOptions.CoreCount) {
delta.Add("Spec.CPUOptions.CoreCount", a.ko.Spec.CPUOptions.CoreCount, b.ko.Spec.CPUOptions.CoreCount)
} else if a.ko.Spec.CPUOptions.CoreCount != nil && b.ko.Spec.CPUOptions.CoreCount != nil {
if *a.ko.Spec.CPUOptions.CoreCount != *b.ko.Spec.CPUOptions.CoreCount {
delta.Add("Spec.CPUOptions.CoreCount", a.ko.Spec.CPUOptions.CoreCount, b.ko.Spec.CPUOptions.CoreCount)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.CPUOptions.ThreadsPerCore, b.ko.Spec.CPUOptions.ThreadsPerCore) {
delta.Add("Spec.CPUOptions.ThreadsPerCore", a.ko.Spec.CPUOptions.ThreadsPerCore, b.ko.Spec.CPUOptions.ThreadsPerCore)
} else if a.ko.Spec.CPUOptions.ThreadsPerCore != nil && b.ko.Spec.CPUOptions.ThreadsPerCore != nil {
if *a.ko.Spec.CPUOptions.ThreadsPerCore != *b.ko.Spec.CPUOptions.ThreadsPerCore {
delta.Add("Spec.CPUOptions.ThreadsPerCore", a.ko.Spec.CPUOptions.ThreadsPerCore, b.ko.Spec.CPUOptions.ThreadsPerCore)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.CreditSpecification, b.ko.Spec.CreditSpecification) {
delta.Add("Spec.CreditSpecification", a.ko.Spec.CreditSpecification, b.ko.Spec.CreditSpecification)
} else if a.ko.Spec.CreditSpecification != nil && b.ko.Spec.CreditSpecification != nil {
if ackcompare.HasNilDifference(a.ko.Spec.CreditSpecification.CPUCredits, b.ko.Spec.CreditSpecification.CPUCredits) {
delta.Add("Spec.CreditSpecification.CPUCredits", a.ko.Spec.CreditSpecification.CPUCredits, b.ko.Spec.CreditSpecification.CPUCredits)
} else if a.ko.Spec.CreditSpecification.CPUCredits != nil && b.ko.Spec.CreditSpecification.CPUCredits != nil {
if *a.ko.Spec.CreditSpecification.CPUCredits != *b.ko.Spec.CreditSpecification.CPUCredits {
delta.Add("Spec.CreditSpecification.CPUCredits", a.ko.Spec.CreditSpecification.CPUCredits, b.ko.Spec.CreditSpecification.CPUCredits)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.DisableAPIStop, b.ko.Spec.DisableAPIStop) {
delta.Add("Spec.DisableAPIStop", a.ko.Spec.DisableAPIStop, b.ko.Spec.DisableAPIStop)
} else if a.ko.Spec.DisableAPIStop != nil && b.ko.Spec.DisableAPIStop != nil {
if *a.ko.Spec.DisableAPIStop != *b.ko.Spec.DisableAPIStop {
delta.Add("Spec.DisableAPIStop", a.ko.Spec.DisableAPIStop, b.ko.Spec.DisableAPIStop)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.DisableAPITermination, b.ko.Spec.DisableAPITermination) {
delta.Add("Spec.DisableAPITermination", a.ko.Spec.DisableAPITermination, b.ko.Spec.DisableAPITermination)
} else if a.ko.Spec.DisableAPITermination != nil && b.ko.Spec.DisableAPITermination != nil {
if *a.ko.Spec.DisableAPITermination != *b.ko.Spec.DisableAPITermination {
delta.Add("Spec.DisableAPITermination", a.ko.Spec.DisableAPITermination, b.ko.Spec.DisableAPITermination)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.EBSOptimized, b.ko.Spec.EBSOptimized) {
delta.Add("Spec.EBSOptimized", a.ko.Spec.EBSOptimized, b.ko.Spec.EBSOptimized)
} else if a.ko.Spec.EBSOptimized != nil && b.ko.Spec.EBSOptimized != nil {
if *a.ko.Spec.EBSOptimized != *b.ko.Spec.EBSOptimized {
delta.Add("Spec.EBSOptimized", a.ko.Spec.EBSOptimized, b.ko.Spec.EBSOptimized)
}
}
if len(a.ko.Spec.ElasticGPUSpecification) != len(b.ko.Spec.ElasticGPUSpecification) {
delta.Add("Spec.ElasticGPUSpecification", a.ko.Spec.ElasticGPUSpecification, b.ko.Spec.ElasticGPUSpecification)
} else if len(a.ko.Spec.ElasticGPUSpecification) > 0 {
if !reflect.DeepEqual(a.ko.Spec.ElasticGPUSpecification, b.ko.Spec.ElasticGPUSpecification) {
delta.Add("Spec.ElasticGPUSpecification", a.ko.Spec.ElasticGPUSpecification, b.ko.Spec.ElasticGPUSpecification)
}
}
if len(a.ko.Spec.ElasticInferenceAccelerators) != len(b.ko.Spec.ElasticInferenceAccelerators) {
delta.Add("Spec.ElasticInferenceAccelerators", a.ko.Spec.ElasticInferenceAccelerators, b.ko.Spec.ElasticInferenceAccelerators)
} else if len(a.ko.Spec.ElasticInferenceAccelerators) > 0 {
if !reflect.DeepEqual(a.ko.Spec.ElasticInferenceAccelerators, b.ko.Spec.ElasticInferenceAccelerators) {
delta.Add("Spec.ElasticInferenceAccelerators", a.ko.Spec.ElasticInferenceAccelerators, b.ko.Spec.ElasticInferenceAccelerators)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.EnclaveOptions, b.ko.Spec.EnclaveOptions) {
delta.Add("Spec.EnclaveOptions", a.ko.Spec.EnclaveOptions, b.ko.Spec.EnclaveOptions)
} else if a.ko.Spec.EnclaveOptions != nil && b.ko.Spec.EnclaveOptions != nil {
if ackcompare.HasNilDifference(a.ko.Spec.EnclaveOptions.Enabled, b.ko.Spec.EnclaveOptions.Enabled) {
delta.Add("Spec.EnclaveOptions.Enabled", a.ko.Spec.EnclaveOptions.Enabled, b.ko.Spec.EnclaveOptions.Enabled)
} else if a.ko.Spec.EnclaveOptions.Enabled != nil && b.ko.Spec.EnclaveOptions.Enabled != nil {
if *a.ko.Spec.EnclaveOptions.Enabled != *b.ko.Spec.EnclaveOptions.Enabled {
delta.Add("Spec.EnclaveOptions.Enabled", a.ko.Spec.EnclaveOptions.Enabled, b.ko.Spec.EnclaveOptions.Enabled)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.HibernationOptions, b.ko.Spec.HibernationOptions) {
delta.Add("Spec.HibernationOptions", a.ko.Spec.HibernationOptions, b.ko.Spec.HibernationOptions)
} else if a.ko.Spec.HibernationOptions != nil && b.ko.Spec.HibernationOptions != nil {
if ackcompare.HasNilDifference(a.ko.Spec.HibernationOptions.Configured, b.ko.Spec.HibernationOptions.Configured) {
delta.Add("Spec.HibernationOptions.Configured", a.ko.Spec.HibernationOptions.Configured, b.ko.Spec.HibernationOptions.Configured)
} else if a.ko.Spec.HibernationOptions.Configured != nil && b.ko.Spec.HibernationOptions.Configured != nil {
if *a.ko.Spec.HibernationOptions.Configured != *b.ko.Spec.HibernationOptions.Configured {
delta.Add("Spec.HibernationOptions.Configured", a.ko.Spec.HibernationOptions.Configured, b.ko.Spec.HibernationOptions.Configured)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.IAMInstanceProfile, b.ko.Spec.IAMInstanceProfile) {
delta.Add("Spec.IAMInstanceProfile", a.ko.Spec.IAMInstanceProfile, b.ko.Spec.IAMInstanceProfile)
} else if a.ko.Spec.IAMInstanceProfile != nil && b.ko.Spec.IAMInstanceProfile != nil {
if ackcompare.HasNilDifference(a.ko.Spec.IAMInstanceProfile.ARN, b.ko.Spec.IAMInstanceProfile.ARN) {
delta.Add("Spec.IAMInstanceProfile.ARN", a.ko.Spec.IAMInstanceProfile.ARN, b.ko.Spec.IAMInstanceProfile.ARN)
} else if a.ko.Spec.IAMInstanceProfile.ARN != nil && b.ko.Spec.IAMInstanceProfile.ARN != nil {
if *a.ko.Spec.IAMInstanceProfile.ARN != *b.ko.Spec.IAMInstanceProfile.ARN {
delta.Add("Spec.IAMInstanceProfile.ARN", a.ko.Spec.IAMInstanceProfile.ARN, b.ko.Spec.IAMInstanceProfile.ARN)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.IAMInstanceProfile.Name, b.ko.Spec.IAMInstanceProfile.Name) {
delta.Add("Spec.IAMInstanceProfile.Name", a.ko.Spec.IAMInstanceProfile.Name, b.ko.Spec.IAMInstanceProfile.Name)
} else if a.ko.Spec.IAMInstanceProfile.Name != nil && b.ko.Spec.IAMInstanceProfile.Name != nil {
if *a.ko.Spec.IAMInstanceProfile.Name != *b.ko.Spec.IAMInstanceProfile.Name {
delta.Add("Spec.IAMInstanceProfile.Name", a.ko.Spec.IAMInstanceProfile.Name, b.ko.Spec.IAMInstanceProfile.Name)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.ImageID, b.ko.Spec.ImageID) {
delta.Add("Spec.ImageID", a.ko.Spec.ImageID, b.ko.Spec.ImageID)
} else if a.ko.Spec.ImageID != nil && b.ko.Spec.ImageID != nil {
if *a.ko.Spec.ImageID != *b.ko.Spec.ImageID {
delta.Add("Spec.ImageID", a.ko.Spec.ImageID, b.ko.Spec.ImageID)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.InstanceInitiatedShutdownBehavior, b.ko.Spec.InstanceInitiatedShutdownBehavior) {
delta.Add("Spec.InstanceInitiatedShutdownBehavior", a.ko.Spec.InstanceInitiatedShutdownBehavior, b.ko.Spec.InstanceInitiatedShutdownBehavior)
} else if a.ko.Spec.InstanceInitiatedShutdownBehavior != nil && b.ko.Spec.InstanceInitiatedShutdownBehavior != nil {
if *a.ko.Spec.InstanceInitiatedShutdownBehavior != *b.ko.Spec.InstanceInitiatedShutdownBehavior {
delta.Add("Spec.InstanceInitiatedShutdownBehavior", a.ko.Spec.InstanceInitiatedShutdownBehavior, b.ko.Spec.InstanceInitiatedShutdownBehavior)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.InstanceMarketOptions, b.ko.Spec.InstanceMarketOptions) {
delta.Add("Spec.InstanceMarketOptions", a.ko.Spec.InstanceMarketOptions, b.ko.Spec.InstanceMarketOptions)
} else if a.ko.Spec.InstanceMarketOptions != nil && b.ko.Spec.InstanceMarketOptions != nil {
if ackcompare.HasNilDifference(a.ko.Spec.InstanceMarketOptions.MarketType, b.ko.Spec.InstanceMarketOptions.MarketType) {
delta.Add("Spec.InstanceMarketOptions.MarketType", a.ko.Spec.InstanceMarketOptions.MarketType, b.ko.Spec.InstanceMarketOptions.MarketType)
} else if a.ko.Spec.InstanceMarketOptions.MarketType != nil && b.ko.Spec.InstanceMarketOptions.MarketType != nil {
if *a.ko.Spec.InstanceMarketOptions.MarketType != *b.ko.Spec.InstanceMarketOptions.MarketType {
delta.Add("Spec.InstanceMarketOptions.MarketType", a.ko.Spec.InstanceMarketOptions.MarketType, b.ko.Spec.InstanceMarketOptions.MarketType)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.InstanceMarketOptions.SpotOptions, b.ko.Spec.InstanceMarketOptions.SpotOptions) {
delta.Add("Spec.InstanceMarketOptions.SpotOptions", a.ko.Spec.InstanceMarketOptions.SpotOptions, b.ko.Spec.InstanceMarketOptions.SpotOptions)
} else if a.ko.Spec.InstanceMarketOptions.SpotOptions != nil && b.ko.Spec.InstanceMarketOptions.SpotOptions != nil {
if ackcompare.HasNilDifference(a.ko.Spec.InstanceMarketOptions.SpotOptions.BlockDurationMinutes, b.ko.Spec.InstanceMarketOptions.SpotOptions.BlockDurationMinutes) {
delta.Add("Spec.InstanceMarketOptions.SpotOptions.BlockDurationMinutes", a.ko.Spec.InstanceMarketOptions.SpotOptions.BlockDurationMinutes, b.ko.Spec.InstanceMarketOptions.SpotOptions.BlockDurationMinutes)
} else if a.ko.Spec.InstanceMarketOptions.SpotOptions.BlockDurationMinutes != nil && b.ko.Spec.InstanceMarketOptions.SpotOptions.BlockDurationMinutes != nil {
if *a.ko.Spec.InstanceMarketOptions.SpotOptions.BlockDurationMinutes != *b.ko.Spec.InstanceMarketOptions.SpotOptions.BlockDurationMinutes {
delta.Add("Spec.InstanceMarketOptions.SpotOptions.BlockDurationMinutes", a.ko.Spec.InstanceMarketOptions.SpotOptions.BlockDurationMinutes, b.ko.Spec.InstanceMarketOptions.SpotOptions.BlockDurationMinutes)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.InstanceMarketOptions.SpotOptions.InstanceInterruptionBehavior, b.ko.Spec.InstanceMarketOptions.SpotOptions.InstanceInterruptionBehavior) {
delta.Add("Spec.InstanceMarketOptions.SpotOptions.InstanceInterruptionBehavior", a.ko.Spec.InstanceMarketOptions.SpotOptions.InstanceInterruptionBehavior, b.ko.Spec.InstanceMarketOptions.SpotOptions.InstanceInterruptionBehavior)
} else if a.ko.Spec.InstanceMarketOptions.SpotOptions.InstanceInterruptionBehavior != nil && b.ko.Spec.InstanceMarketOptions.SpotOptions.InstanceInterruptionBehavior != nil {
if *a.ko.Spec.InstanceMarketOptions.SpotOptions.InstanceInterruptionBehavior != *b.ko.Spec.InstanceMarketOptions.SpotOptions.InstanceInterruptionBehavior {
delta.Add("Spec.InstanceMarketOptions.SpotOptions.InstanceInterruptionBehavior", a.ko.Spec.InstanceMarketOptions.SpotOptions.InstanceInterruptionBehavior, b.ko.Spec.InstanceMarketOptions.SpotOptions.InstanceInterruptionBehavior)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.InstanceMarketOptions.SpotOptions.MaxPrice, b.ko.Spec.InstanceMarketOptions.SpotOptions.MaxPrice) {
delta.Add("Spec.InstanceMarketOptions.SpotOptions.MaxPrice", a.ko.Spec.InstanceMarketOptions.SpotOptions.MaxPrice, b.ko.Spec.InstanceMarketOptions.SpotOptions.MaxPrice)
} else if a.ko.Spec.InstanceMarketOptions.SpotOptions.MaxPrice != nil && b.ko.Spec.InstanceMarketOptions.SpotOptions.MaxPrice != nil {
if *a.ko.Spec.InstanceMarketOptions.SpotOptions.MaxPrice != *b.ko.Spec.InstanceMarketOptions.SpotOptions.MaxPrice {
delta.Add("Spec.InstanceMarketOptions.SpotOptions.MaxPrice", a.ko.Spec.InstanceMarketOptions.SpotOptions.MaxPrice, b.ko.Spec.InstanceMarketOptions.SpotOptions.MaxPrice)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.InstanceMarketOptions.SpotOptions.SpotInstanceType, b.ko.Spec.InstanceMarketOptions.SpotOptions.SpotInstanceType) {
delta.Add("Spec.InstanceMarketOptions.SpotOptions.SpotInstanceType", a.ko.Spec.InstanceMarketOptions.SpotOptions.SpotInstanceType, b.ko.Spec.InstanceMarketOptions.SpotOptions.SpotInstanceType)
} else if a.ko.Spec.InstanceMarketOptions.SpotOptions.SpotInstanceType != nil && b.ko.Spec.InstanceMarketOptions.SpotOptions.SpotInstanceType != nil {
if *a.ko.Spec.InstanceMarketOptions.SpotOptions.SpotInstanceType != *b.ko.Spec.InstanceMarketOptions.SpotOptions.SpotInstanceType {
delta.Add("Spec.InstanceMarketOptions.SpotOptions.SpotInstanceType", a.ko.Spec.InstanceMarketOptions.SpotOptions.SpotInstanceType, b.ko.Spec.InstanceMarketOptions.SpotOptions.SpotInstanceType)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.InstanceMarketOptions.SpotOptions.ValidUntil, b.ko.Spec.InstanceMarketOptions.SpotOptions.ValidUntil) {
delta.Add("Spec.InstanceMarketOptions.SpotOptions.ValidUntil", a.ko.Spec.InstanceMarketOptions.SpotOptions.ValidUntil, b.ko.Spec.InstanceMarketOptions.SpotOptions.ValidUntil)
} else if a.ko.Spec.InstanceMarketOptions.SpotOptions.ValidUntil != nil && b.ko.Spec.InstanceMarketOptions.SpotOptions.ValidUntil != nil {
if !a.ko.Spec.InstanceMarketOptions.SpotOptions.ValidUntil.Equal(b.ko.Spec.InstanceMarketOptions.SpotOptions.ValidUntil) {
delta.Add("Spec.InstanceMarketOptions.SpotOptions.ValidUntil", a.ko.Spec.InstanceMarketOptions.SpotOptions.ValidUntil, b.ko.Spec.InstanceMarketOptions.SpotOptions.ValidUntil)
}
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.InstanceType, b.ko.Spec.InstanceType) {
delta.Add("Spec.InstanceType", a.ko.Spec.InstanceType, b.ko.Spec.InstanceType)
} else if a.ko.Spec.InstanceType != nil && b.ko.Spec.InstanceType != nil {
if *a.ko.Spec.InstanceType != *b.ko.Spec.InstanceType {
delta.Add("Spec.InstanceType", a.ko.Spec.InstanceType, b.ko.Spec.InstanceType)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.IPv6AddressCount, b.ko.Spec.IPv6AddressCount) {
delta.Add("Spec.IPv6AddressCount", a.ko.Spec.IPv6AddressCount, b.ko.Spec.IPv6AddressCount)
} else if a.ko.Spec.IPv6AddressCount != nil && b.ko.Spec.IPv6AddressCount != nil {
if *a.ko.Spec.IPv6AddressCount != *b.ko.Spec.IPv6AddressCount {
delta.Add("Spec.IPv6AddressCount", a.ko.Spec.IPv6AddressCount, b.ko.Spec.IPv6AddressCount)
}
}
if len(a.ko.Spec.IPv6Addresses) != len(b.ko.Spec.IPv6Addresses) {
delta.Add("Spec.IPv6Addresses", a.ko.Spec.IPv6Addresses, b.ko.Spec.IPv6Addresses)
} else if len(a.ko.Spec.IPv6Addresses) > 0 {
if !reflect.DeepEqual(a.ko.Spec.IPv6Addresses, b.ko.Spec.IPv6Addresses) {
delta.Add("Spec.IPv6Addresses", a.ko.Spec.IPv6Addresses, b.ko.Spec.IPv6Addresses)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.KernelID, b.ko.Spec.KernelID) {
delta.Add("Spec.KernelID", a.ko.Spec.KernelID, b.ko.Spec.KernelID)
} else if a.ko.Spec.KernelID != nil && b.ko.Spec.KernelID != nil {
if *a.ko.Spec.KernelID != *b.ko.Spec.KernelID {
delta.Add("Spec.KernelID", a.ko.Spec.KernelID, b.ko.Spec.KernelID)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.KeyName, b.ko.Spec.KeyName) {
delta.Add("Spec.KeyName", a.ko.Spec.KeyName, b.ko.Spec.KeyName)
} else if a.ko.Spec.KeyName != nil && b.ko.Spec.KeyName != nil {
if *a.ko.Spec.KeyName != *b.ko.Spec.KeyName {
delta.Add("Spec.KeyName", a.ko.Spec.KeyName, b.ko.Spec.KeyName)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LaunchTemplate, b.ko.Spec.LaunchTemplate) {
delta.Add("Spec.LaunchTemplate", a.ko.Spec.LaunchTemplate, b.ko.Spec.LaunchTemplate)
} else if a.ko.Spec.LaunchTemplate != nil && b.ko.Spec.LaunchTemplate != nil {
if ackcompare.HasNilDifference(a.ko.Spec.LaunchTemplate.LaunchTemplateID, b.ko.Spec.LaunchTemplate.LaunchTemplateID) {
delta.Add("Spec.LaunchTemplate.LaunchTemplateID", a.ko.Spec.LaunchTemplate.LaunchTemplateID, b.ko.Spec.LaunchTemplate.LaunchTemplateID)
} else if a.ko.Spec.LaunchTemplate.LaunchTemplateID != nil && b.ko.Spec.LaunchTemplate.LaunchTemplateID != nil {
if *a.ko.Spec.LaunchTemplate.LaunchTemplateID != *b.ko.Spec.LaunchTemplate.LaunchTemplateID {
delta.Add("Spec.LaunchTemplate.LaunchTemplateID", a.ko.Spec.LaunchTemplate.LaunchTemplateID, b.ko.Spec.LaunchTemplate.LaunchTemplateID)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LaunchTemplate.LaunchTemplateName, b.ko.Spec.LaunchTemplate.LaunchTemplateName) {
delta.Add("Spec.LaunchTemplate.LaunchTemplateName", a.ko.Spec.LaunchTemplate.LaunchTemplateName, b.ko.Spec.LaunchTemplate.LaunchTemplateName)
} else if a.ko.Spec.LaunchTemplate.LaunchTemplateName != nil && b.ko.Spec.LaunchTemplate.LaunchTemplateName != nil {
if *a.ko.Spec.LaunchTemplate.LaunchTemplateName != *b.ko.Spec.LaunchTemplate.LaunchTemplateName {
delta.Add("Spec.LaunchTemplate.LaunchTemplateName", a.ko.Spec.LaunchTemplate.LaunchTemplateName, b.ko.Spec.LaunchTemplate.LaunchTemplateName)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LaunchTemplate.Version, b.ko.Spec.LaunchTemplate.Version) {
delta.Add("Spec.LaunchTemplate.Version", a.ko.Spec.LaunchTemplate.Version, b.ko.Spec.LaunchTemplate.Version)
} else if a.ko.Spec.LaunchTemplate.Version != nil && b.ko.Spec.LaunchTemplate.Version != nil {
if *a.ko.Spec.LaunchTemplate.Version != *b.ko.Spec.LaunchTemplate.Version {
delta.Add("Spec.LaunchTemplate.Version", a.ko.Spec.LaunchTemplate.Version, b.ko.Spec.LaunchTemplate.Version)
}
}
}
if len(a.ko.Spec.LicenseSpecifications) != len(b.ko.Spec.LicenseSpecifications) {
delta.Add("Spec.LicenseSpecifications", a.ko.Spec.LicenseSpecifications, b.ko.Spec.LicenseSpecifications)
} else if len(a.ko.Spec.LicenseSpecifications) > 0 {
if !reflect.DeepEqual(a.ko.Spec.LicenseSpecifications, b.ko.Spec.LicenseSpecifications) {
delta.Add("Spec.LicenseSpecifications", a.ko.Spec.LicenseSpecifications, b.ko.Spec.LicenseSpecifications)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.MaintenanceOptions, b.ko.Spec.MaintenanceOptions) {
delta.Add("Spec.MaintenanceOptions", a.ko.Spec.MaintenanceOptions, b.ko.Spec.MaintenanceOptions)
} else if a.ko.Spec.MaintenanceOptions != nil && b.ko.Spec.MaintenanceOptions != nil {
if ackcompare.HasNilDifference(a.ko.Spec.MaintenanceOptions.AutoRecovery, b.ko.Spec.MaintenanceOptions.AutoRecovery) {
delta.Add("Spec.MaintenanceOptions.AutoRecovery", a.ko.Spec.MaintenanceOptions.AutoRecovery, b.ko.Spec.MaintenanceOptions.AutoRecovery)
} else if a.ko.Spec.MaintenanceOptions.AutoRecovery != nil && b.ko.Spec.MaintenanceOptions.AutoRecovery != nil {
if *a.ko.Spec.MaintenanceOptions.AutoRecovery != *b.ko.Spec.MaintenanceOptions.AutoRecovery {
delta.Add("Spec.MaintenanceOptions.AutoRecovery", a.ko.Spec.MaintenanceOptions.AutoRecovery, b.ko.Spec.MaintenanceOptions.AutoRecovery)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.MaxCount, b.ko.Spec.MaxCount) {
delta.Add("Spec.MaxCount", a.ko.Spec.MaxCount, b.ko.Spec.MaxCount)
} else if a.ko.Spec.MaxCount != nil && b.ko.Spec.MaxCount != nil {
if *a.ko.Spec.MaxCount != *b.ko.Spec.MaxCount {
delta.Add("Spec.MaxCount", a.ko.Spec.MaxCount, b.ko.Spec.MaxCount)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.MetadataOptions, b.ko.Spec.MetadataOptions) {
delta.Add("Spec.MetadataOptions", a.ko.Spec.MetadataOptions, b.ko.Spec.MetadataOptions)
} else if a.ko.Spec.MetadataOptions != nil && b.ko.Spec.MetadataOptions != nil {
if ackcompare.HasNilDifference(a.ko.Spec.MetadataOptions.HTTPEndpoint, b.ko.Spec.MetadataOptions.HTTPEndpoint) {
delta.Add("Spec.MetadataOptions.HTTPEndpoint", a.ko.Spec.MetadataOptions.HTTPEndpoint, b.ko.Spec.MetadataOptions.HTTPEndpoint)
} else if a.ko.Spec.MetadataOptions.HTTPEndpoint != nil && b.ko.Spec.MetadataOptions.HTTPEndpoint != nil {
if *a.ko.Spec.MetadataOptions.HTTPEndpoint != *b.ko.Spec.MetadataOptions.HTTPEndpoint {
delta.Add("Spec.MetadataOptions.HTTPEndpoint", a.ko.Spec.MetadataOptions.HTTPEndpoint, b.ko.Spec.MetadataOptions.HTTPEndpoint)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.MetadataOptions.HTTPProtocolIPv6, b.ko.Spec.MetadataOptions.HTTPProtocolIPv6) {
delta.Add("Spec.MetadataOptions.HTTPProtocolIPv6", a.ko.Spec.MetadataOptions.HTTPProtocolIPv6, b.ko.Spec.MetadataOptions.HTTPProtocolIPv6)
} else if a.ko.Spec.MetadataOptions.HTTPProtocolIPv6 != nil && b.ko.Spec.MetadataOptions.HTTPProtocolIPv6 != nil {
if *a.ko.Spec.MetadataOptions.HTTPProtocolIPv6 != *b.ko.Spec.MetadataOptions.HTTPProtocolIPv6 {
delta.Add("Spec.MetadataOptions.HTTPProtocolIPv6", a.ko.Spec.MetadataOptions.HTTPProtocolIPv6, b.ko.Spec.MetadataOptions.HTTPProtocolIPv6)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.MetadataOptions.HTTPPutResponseHopLimit, b.ko.Spec.MetadataOptions.HTTPPutResponseHopLimit) {
delta.Add("Spec.MetadataOptions.HTTPPutResponseHopLimit", a.ko.Spec.MetadataOptions.HTTPPutResponseHopLimit, b.ko.Spec.MetadataOptions.HTTPPutResponseHopLimit)
} else if a.ko.Spec.MetadataOptions.HTTPPutResponseHopLimit != nil && b.ko.Spec.MetadataOptions.HTTPPutResponseHopLimit != nil {
if *a.ko.Spec.MetadataOptions.HTTPPutResponseHopLimit != *b.ko.Spec.MetadataOptions.HTTPPutResponseHopLimit {
delta.Add("Spec.MetadataOptions.HTTPPutResponseHopLimit", a.ko.Spec.MetadataOptions.HTTPPutResponseHopLimit, b.ko.Spec.MetadataOptions.HTTPPutResponseHopLimit)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.MetadataOptions.HTTPTokens, b.ko.Spec.MetadataOptions.HTTPTokens) {
delta.Add("Spec.MetadataOptions.HTTPTokens", a.ko.Spec.MetadataOptions.HTTPTokens, b.ko.Spec.MetadataOptions.HTTPTokens)
} else if a.ko.Spec.MetadataOptions.HTTPTokens != nil && b.ko.Spec.MetadataOptions.HTTPTokens != nil {
if *a.ko.Spec.MetadataOptions.HTTPTokens != *b.ko.Spec.MetadataOptions.HTTPTokens {
delta.Add("Spec.MetadataOptions.HTTPTokens", a.ko.Spec.MetadataOptions.HTTPTokens, b.ko.Spec.MetadataOptions.HTTPTokens)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.MetadataOptions.InstanceMetadataTags, b.ko.Spec.MetadataOptions.InstanceMetadataTags) {
delta.Add("Spec.MetadataOptions.InstanceMetadataTags", a.ko.Spec.MetadataOptions.InstanceMetadataTags, b.ko.Spec.MetadataOptions.InstanceMetadataTags)
} else if a.ko.Spec.MetadataOptions.InstanceMetadataTags != nil && b.ko.Spec.MetadataOptions.InstanceMetadataTags != nil {
if *a.ko.Spec.MetadataOptions.InstanceMetadataTags != *b.ko.Spec.MetadataOptions.InstanceMetadataTags {
delta.Add("Spec.MetadataOptions.InstanceMetadataTags", a.ko.Spec.MetadataOptions.InstanceMetadataTags, b.ko.Spec.MetadataOptions.InstanceMetadataTags)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.MinCount, b.ko.Spec.MinCount) {
delta.Add("Spec.MinCount", a.ko.Spec.MinCount, b.ko.Spec.MinCount)
} else if a.ko.Spec.MinCount != nil && b.ko.Spec.MinCount != nil {
if *a.ko.Spec.MinCount != *b.ko.Spec.MinCount {
delta.Add("Spec.MinCount", a.ko.Spec.MinCount, b.ko.Spec.MinCount)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Monitoring, b.ko.Spec.Monitoring) {
delta.Add("Spec.Monitoring", a.ko.Spec.Monitoring, b.ko.Spec.Monitoring)
} else if a.ko.Spec.Monitoring != nil && b.ko.Spec.Monitoring != nil {
if ackcompare.HasNilDifference(a.ko.Spec.Monitoring.Enabled, b.ko.Spec.Monitoring.Enabled) {
delta.Add("Spec.Monitoring.Enabled", a.ko.Spec.Monitoring.Enabled, b.ko.Spec.Monitoring.Enabled)
} else if a.ko.Spec.Monitoring.Enabled != nil && b.ko.Spec.Monitoring.Enabled != nil {
if *a.ko.Spec.Monitoring.Enabled != *b.ko.Spec.Monitoring.Enabled {
delta.Add("Spec.Monitoring.Enabled", a.ko.Spec.Monitoring.Enabled, b.ko.Spec.Monitoring.Enabled)
}
}
}
if len(a.ko.Spec.NetworkInterfaces) != len(b.ko.Spec.NetworkInterfaces) {
delta.Add("Spec.NetworkInterfaces", a.ko.Spec.NetworkInterfaces, b.ko.Spec.NetworkInterfaces)
} else if len(a.ko.Spec.NetworkInterfaces) > 0 {
if !reflect.DeepEqual(a.ko.Spec.NetworkInterfaces, b.ko.Spec.NetworkInterfaces) {
delta.Add("Spec.NetworkInterfaces", a.ko.Spec.NetworkInterfaces, b.ko.Spec.NetworkInterfaces)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Placement, b.ko.Spec.Placement) {
delta.Add("Spec.Placement", a.ko.Spec.Placement, b.ko.Spec.Placement)
} else if a.ko.Spec.Placement != nil && b.ko.Spec.Placement != nil {
if ackcompare.HasNilDifference(a.ko.Spec.Placement.Affinity, b.ko.Spec.Placement.Affinity) {
delta.Add("Spec.Placement.Affinity", a.ko.Spec.Placement.Affinity, b.ko.Spec.Placement.Affinity)
} else if a.ko.Spec.Placement.Affinity != nil && b.ko.Spec.Placement.Affinity != nil {
if *a.ko.Spec.Placement.Affinity != *b.ko.Spec.Placement.Affinity {
delta.Add("Spec.Placement.Affinity", a.ko.Spec.Placement.Affinity, b.ko.Spec.Placement.Affinity)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Placement.AvailabilityZone, b.ko.Spec.Placement.AvailabilityZone) {
delta.Add("Spec.Placement.AvailabilityZone", a.ko.Spec.Placement.AvailabilityZone, b.ko.Spec.Placement.AvailabilityZone)
} else if a.ko.Spec.Placement.AvailabilityZone != nil && b.ko.Spec.Placement.AvailabilityZone != nil {
if *a.ko.Spec.Placement.AvailabilityZone != *b.ko.Spec.Placement.AvailabilityZone {
delta.Add("Spec.Placement.AvailabilityZone", a.ko.Spec.Placement.AvailabilityZone, b.ko.Spec.Placement.AvailabilityZone)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Placement.GroupName, b.ko.Spec.Placement.GroupName) {
delta.Add("Spec.Placement.GroupName", a.ko.Spec.Placement.GroupName, b.ko.Spec.Placement.GroupName)
} else if a.ko.Spec.Placement.GroupName != nil && b.ko.Spec.Placement.GroupName != nil {
if *a.ko.Spec.Placement.GroupName != *b.ko.Spec.Placement.GroupName {
delta.Add("Spec.Placement.GroupName", a.ko.Spec.Placement.GroupName, b.ko.Spec.Placement.GroupName)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Placement.HostID, b.ko.Spec.Placement.HostID) {
delta.Add("Spec.Placement.HostID", a.ko.Spec.Placement.HostID, b.ko.Spec.Placement.HostID)
} else if a.ko.Spec.Placement.HostID != nil && b.ko.Spec.Placement.HostID != nil {
if *a.ko.Spec.Placement.HostID != *b.ko.Spec.Placement.HostID {
delta.Add("Spec.Placement.HostID", a.ko.Spec.Placement.HostID, b.ko.Spec.Placement.HostID)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Placement.HostResourceGroupARN, b.ko.Spec.Placement.HostResourceGroupARN) {
delta.Add("Spec.Placement.HostResourceGroupARN", a.ko.Spec.Placement.HostResourceGroupARN, b.ko.Spec.Placement.HostResourceGroupARN)
} else if a.ko.Spec.Placement.HostResourceGroupARN != nil && b.ko.Spec.Placement.HostResourceGroupARN != nil {
if *a.ko.Spec.Placement.HostResourceGroupARN != *b.ko.Spec.Placement.HostResourceGroupARN {
delta.Add("Spec.Placement.HostResourceGroupARN", a.ko.Spec.Placement.HostResourceGroupARN, b.ko.Spec.Placement.HostResourceGroupARN)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Placement.PartitionNumber, b.ko.Spec.Placement.PartitionNumber) {
delta.Add("Spec.Placement.PartitionNumber", a.ko.Spec.Placement.PartitionNumber, b.ko.Spec.Placement.PartitionNumber)
} else if a.ko.Spec.Placement.PartitionNumber != nil && b.ko.Spec.Placement.PartitionNumber != nil {
if *a.ko.Spec.Placement.PartitionNumber != *b.ko.Spec.Placement.PartitionNumber {
delta.Add("Spec.Placement.PartitionNumber", a.ko.Spec.Placement.PartitionNumber, b.ko.Spec.Placement.PartitionNumber)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Placement.SpreadDomain, b.ko.Spec.Placement.SpreadDomain) {
delta.Add("Spec.Placement.SpreadDomain", a.ko.Spec.Placement.SpreadDomain, b.ko.Spec.Placement.SpreadDomain)
} else if a.ko.Spec.Placement.SpreadDomain != nil && b.ko.Spec.Placement.SpreadDomain != nil {
if *a.ko.Spec.Placement.SpreadDomain != *b.ko.Spec.Placement.SpreadDomain {
delta.Add("Spec.Placement.SpreadDomain", a.ko.Spec.Placement.SpreadDomain, b.ko.Spec.Placement.SpreadDomain)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Placement.Tenancy, b.ko.Spec.Placement.Tenancy) {
delta.Add("Spec.Placement.Tenancy", a.ko.Spec.Placement.Tenancy, b.ko.Spec.Placement.Tenancy)
} else if a.ko.Spec.Placement.Tenancy != nil && b.ko.Spec.Placement.Tenancy != nil {
if *a.ko.Spec.Placement.Tenancy != *b.ko.Spec.Placement.Tenancy {
delta.Add("Spec.Placement.Tenancy", a.ko.Spec.Placement.Tenancy, b.ko.Spec.Placement.Tenancy)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.PrivateDNSNameOptions, b.ko.Spec.PrivateDNSNameOptions) {
delta.Add("Spec.PrivateDNSNameOptions", a.ko.Spec.PrivateDNSNameOptions, b.ko.Spec.PrivateDNSNameOptions)
} else if a.ko.Spec.PrivateDNSNameOptions != nil && b.ko.Spec.PrivateDNSNameOptions != nil {
if ackcompare.HasNilDifference(a.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSAAAARecord, b.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSAAAARecord) {
delta.Add("Spec.PrivateDNSNameOptions.EnableResourceNameDNSAAAARecord", a.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSAAAARecord, b.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSAAAARecord)
} else if a.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSAAAARecord != nil && b.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSAAAARecord != nil {
if *a.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSAAAARecord != *b.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSAAAARecord {
delta.Add("Spec.PrivateDNSNameOptions.EnableResourceNameDNSAAAARecord", a.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSAAAARecord, b.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSAAAARecord)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSARecord, b.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSARecord) {
delta.Add("Spec.PrivateDNSNameOptions.EnableResourceNameDNSARecord", a.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSARecord, b.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSARecord)
} else if a.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSARecord != nil && b.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSARecord != nil {
if *a.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSARecord != *b.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSARecord {
delta.Add("Spec.PrivateDNSNameOptions.EnableResourceNameDNSARecord", a.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSARecord, b.ko.Spec.PrivateDNSNameOptions.EnableResourceNameDNSARecord)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.PrivateDNSNameOptions.HostnameType, b.ko.Spec.PrivateDNSNameOptions.HostnameType) {
delta.Add("Spec.PrivateDNSNameOptions.HostnameType", a.ko.Spec.PrivateDNSNameOptions.HostnameType, b.ko.Spec.PrivateDNSNameOptions.HostnameType)
} else if a.ko.Spec.PrivateDNSNameOptions.HostnameType != nil && b.ko.Spec.PrivateDNSNameOptions.HostnameType != nil {
if *a.ko.Spec.PrivateDNSNameOptions.HostnameType != *b.ko.Spec.PrivateDNSNameOptions.HostnameType {
delta.Add("Spec.PrivateDNSNameOptions.HostnameType", a.ko.Spec.PrivateDNSNameOptions.HostnameType, b.ko.Spec.PrivateDNSNameOptions.HostnameType)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.PrivateIPAddress, b.ko.Spec.PrivateIPAddress) {
delta.Add("Spec.PrivateIPAddress", a.ko.Spec.PrivateIPAddress, b.ko.Spec.PrivateIPAddress)
} else if a.ko.Spec.PrivateIPAddress != nil && b.ko.Spec.PrivateIPAddress != nil {
if *a.ko.Spec.PrivateIPAddress != *b.ko.Spec.PrivateIPAddress {
delta.Add("Spec.PrivateIPAddress", a.ko.Spec.PrivateIPAddress, b.ko.Spec.PrivateIPAddress)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.RAMDiskID, b.ko.Spec.RAMDiskID) {
delta.Add("Spec.RAMDiskID", a.ko.Spec.RAMDiskID, b.ko.Spec.RAMDiskID)
} else if a.ko.Spec.RAMDiskID != nil && b.ko.Spec.RAMDiskID != nil {
if *a.ko.Spec.RAMDiskID != *b.ko.Spec.RAMDiskID {
delta.Add("Spec.RAMDiskID", a.ko.Spec.RAMDiskID, b.ko.Spec.RAMDiskID)
}
}
if len(a.ko.Spec.SecurityGroupIDs) != len(b.ko.Spec.SecurityGroupIDs) {
delta.Add("Spec.SecurityGroupIDs", a.ko.Spec.SecurityGroupIDs, b.ko.Spec.SecurityGroupIDs)
} else if len(a.ko.Spec.SecurityGroupIDs) > 0 {
if !ackcompare.SliceStringPEqual(a.ko.Spec.SecurityGroupIDs, b.ko.Spec.SecurityGroupIDs) {
delta.Add("Spec.SecurityGroupIDs", a.ko.Spec.SecurityGroupIDs, b.ko.Spec.SecurityGroupIDs)
}
}
if len(a.ko.Spec.SecurityGroups) != len(b.ko.Spec.SecurityGroups) {
delta.Add("Spec.SecurityGroups", a.ko.Spec.SecurityGroups, b.ko.Spec.SecurityGroups)
} else if len(a.ko.Spec.SecurityGroups) > 0 {
if !ackcompare.SliceStringPEqual(a.ko.Spec.SecurityGroups, b.ko.Spec.SecurityGroups) {
delta.Add("Spec.SecurityGroups", a.ko.Spec.SecurityGroups, b.ko.Spec.SecurityGroups)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.SubnetID, b.ko.Spec.SubnetID) {
delta.Add("Spec.SubnetID", a.ko.Spec.SubnetID, b.ko.Spec.SubnetID)
} else if a.ko.Spec.SubnetID != nil && b.ko.Spec.SubnetID != nil {
if *a.ko.Spec.SubnetID != *b.ko.Spec.SubnetID {
delta.Add("Spec.SubnetID", a.ko.Spec.SubnetID, b.ko.Spec.SubnetID)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.UserData, b.ko.Spec.UserData) {
delta.Add("Spec.UserData", a.ko.Spec.UserData, b.ko.Spec.UserData)
} else if a.ko.Spec.UserData != nil && b.ko.Spec.UserData != nil {
if *a.ko.Spec.UserData != *b.ko.Spec.UserData {
delta.Add("Spec.UserData", a.ko.Spec.UserData, b.ko.Spec.UserData)
}
}
return delta
}