/
delta.go
337 lines (329 loc) · 24.9 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
// 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 service
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
}
if len(a.ko.Spec.CapacityProviderStrategy) != len(b.ko.Spec.CapacityProviderStrategy) {
delta.Add("Spec.CapacityProviderStrategy", a.ko.Spec.CapacityProviderStrategy, b.ko.Spec.CapacityProviderStrategy)
} else if len(a.ko.Spec.CapacityProviderStrategy) > 0 {
if !reflect.DeepEqual(a.ko.Spec.CapacityProviderStrategy, b.ko.Spec.CapacityProviderStrategy) {
delta.Add("Spec.CapacityProviderStrategy", a.ko.Spec.CapacityProviderStrategy, b.ko.Spec.CapacityProviderStrategy)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Cluster, b.ko.Spec.Cluster) {
delta.Add("Spec.Cluster", a.ko.Spec.Cluster, b.ko.Spec.Cluster)
} else if a.ko.Spec.Cluster != nil && b.ko.Spec.Cluster != nil {
if *a.ko.Spec.Cluster != *b.ko.Spec.Cluster {
delta.Add("Spec.Cluster", a.ko.Spec.Cluster, b.ko.Spec.Cluster)
}
}
if !reflect.DeepEqual(a.ko.Spec.ClusterRef, b.ko.Spec.ClusterRef) {
delta.Add("Spec.ClusterRef", a.ko.Spec.ClusterRef, b.ko.Spec.ClusterRef)
}
if ackcompare.HasNilDifference(a.ko.Spec.DeploymentConfiguration, b.ko.Spec.DeploymentConfiguration) {
delta.Add("Spec.DeploymentConfiguration", a.ko.Spec.DeploymentConfiguration, b.ko.Spec.DeploymentConfiguration)
} else if a.ko.Spec.DeploymentConfiguration != nil && b.ko.Spec.DeploymentConfiguration != nil {
if ackcompare.HasNilDifference(a.ko.Spec.DeploymentConfiguration.Alarms, b.ko.Spec.DeploymentConfiguration.Alarms) {
delta.Add("Spec.DeploymentConfiguration.Alarms", a.ko.Spec.DeploymentConfiguration.Alarms, b.ko.Spec.DeploymentConfiguration.Alarms)
} else if a.ko.Spec.DeploymentConfiguration.Alarms != nil && b.ko.Spec.DeploymentConfiguration.Alarms != nil {
if len(a.ko.Spec.DeploymentConfiguration.Alarms.AlarmNames) != len(b.ko.Spec.DeploymentConfiguration.Alarms.AlarmNames) {
delta.Add("Spec.DeploymentConfiguration.Alarms.AlarmNames", a.ko.Spec.DeploymentConfiguration.Alarms.AlarmNames, b.ko.Spec.DeploymentConfiguration.Alarms.AlarmNames)
} else if len(a.ko.Spec.DeploymentConfiguration.Alarms.AlarmNames) > 0 {
if !ackcompare.SliceStringPEqual(a.ko.Spec.DeploymentConfiguration.Alarms.AlarmNames, b.ko.Spec.DeploymentConfiguration.Alarms.AlarmNames) {
delta.Add("Spec.DeploymentConfiguration.Alarms.AlarmNames", a.ko.Spec.DeploymentConfiguration.Alarms.AlarmNames, b.ko.Spec.DeploymentConfiguration.Alarms.AlarmNames)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.DeploymentConfiguration.Alarms.Enable, b.ko.Spec.DeploymentConfiguration.Alarms.Enable) {
delta.Add("Spec.DeploymentConfiguration.Alarms.Enable", a.ko.Spec.DeploymentConfiguration.Alarms.Enable, b.ko.Spec.DeploymentConfiguration.Alarms.Enable)
} else if a.ko.Spec.DeploymentConfiguration.Alarms.Enable != nil && b.ko.Spec.DeploymentConfiguration.Alarms.Enable != nil {
if *a.ko.Spec.DeploymentConfiguration.Alarms.Enable != *b.ko.Spec.DeploymentConfiguration.Alarms.Enable {
delta.Add("Spec.DeploymentConfiguration.Alarms.Enable", a.ko.Spec.DeploymentConfiguration.Alarms.Enable, b.ko.Spec.DeploymentConfiguration.Alarms.Enable)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.DeploymentConfiguration.Alarms.Rollback, b.ko.Spec.DeploymentConfiguration.Alarms.Rollback) {
delta.Add("Spec.DeploymentConfiguration.Alarms.Rollback", a.ko.Spec.DeploymentConfiguration.Alarms.Rollback, b.ko.Spec.DeploymentConfiguration.Alarms.Rollback)
} else if a.ko.Spec.DeploymentConfiguration.Alarms.Rollback != nil && b.ko.Spec.DeploymentConfiguration.Alarms.Rollback != nil {
if *a.ko.Spec.DeploymentConfiguration.Alarms.Rollback != *b.ko.Spec.DeploymentConfiguration.Alarms.Rollback {
delta.Add("Spec.DeploymentConfiguration.Alarms.Rollback", a.ko.Spec.DeploymentConfiguration.Alarms.Rollback, b.ko.Spec.DeploymentConfiguration.Alarms.Rollback)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker, b.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker) {
delta.Add("Spec.DeploymentConfiguration.DeploymentCircuitBreaker", a.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker, b.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker)
} else if a.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker != nil && b.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker != nil {
if ackcompare.HasNilDifference(a.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Enable, b.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Enable) {
delta.Add("Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Enable", a.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Enable, b.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Enable)
} else if a.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Enable != nil && b.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Enable != nil {
if *a.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Enable != *b.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Enable {
delta.Add("Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Enable", a.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Enable, b.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Enable)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Rollback, b.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Rollback) {
delta.Add("Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Rollback", a.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Rollback, b.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Rollback)
} else if a.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Rollback != nil && b.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Rollback != nil {
if *a.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Rollback != *b.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Rollback {
delta.Add("Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Rollback", a.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Rollback, b.ko.Spec.DeploymentConfiguration.DeploymentCircuitBreaker.Rollback)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.DeploymentConfiguration.MaximumPercent, b.ko.Spec.DeploymentConfiguration.MaximumPercent) {
delta.Add("Spec.DeploymentConfiguration.MaximumPercent", a.ko.Spec.DeploymentConfiguration.MaximumPercent, b.ko.Spec.DeploymentConfiguration.MaximumPercent)
} else if a.ko.Spec.DeploymentConfiguration.MaximumPercent != nil && b.ko.Spec.DeploymentConfiguration.MaximumPercent != nil {
if *a.ko.Spec.DeploymentConfiguration.MaximumPercent != *b.ko.Spec.DeploymentConfiguration.MaximumPercent {
delta.Add("Spec.DeploymentConfiguration.MaximumPercent", a.ko.Spec.DeploymentConfiguration.MaximumPercent, b.ko.Spec.DeploymentConfiguration.MaximumPercent)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.DeploymentConfiguration.MinimumHealthyPercent, b.ko.Spec.DeploymentConfiguration.MinimumHealthyPercent) {
delta.Add("Spec.DeploymentConfiguration.MinimumHealthyPercent", a.ko.Spec.DeploymentConfiguration.MinimumHealthyPercent, b.ko.Spec.DeploymentConfiguration.MinimumHealthyPercent)
} else if a.ko.Spec.DeploymentConfiguration.MinimumHealthyPercent != nil && b.ko.Spec.DeploymentConfiguration.MinimumHealthyPercent != nil {
if *a.ko.Spec.DeploymentConfiguration.MinimumHealthyPercent != *b.ko.Spec.DeploymentConfiguration.MinimumHealthyPercent {
delta.Add("Spec.DeploymentConfiguration.MinimumHealthyPercent", a.ko.Spec.DeploymentConfiguration.MinimumHealthyPercent, b.ko.Spec.DeploymentConfiguration.MinimumHealthyPercent)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.DeploymentController, b.ko.Spec.DeploymentController) {
delta.Add("Spec.DeploymentController", a.ko.Spec.DeploymentController, b.ko.Spec.DeploymentController)
} else if a.ko.Spec.DeploymentController != nil && b.ko.Spec.DeploymentController != nil {
if ackcompare.HasNilDifference(a.ko.Spec.DeploymentController.Type, b.ko.Spec.DeploymentController.Type) {
delta.Add("Spec.DeploymentController.Type", a.ko.Spec.DeploymentController.Type, b.ko.Spec.DeploymentController.Type)
} else if a.ko.Spec.DeploymentController.Type != nil && b.ko.Spec.DeploymentController.Type != nil {
if *a.ko.Spec.DeploymentController.Type != *b.ko.Spec.DeploymentController.Type {
delta.Add("Spec.DeploymentController.Type", a.ko.Spec.DeploymentController.Type, b.ko.Spec.DeploymentController.Type)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.DesiredCount, b.ko.Spec.DesiredCount) {
delta.Add("Spec.DesiredCount", a.ko.Spec.DesiredCount, b.ko.Spec.DesiredCount)
} else if a.ko.Spec.DesiredCount != nil && b.ko.Spec.DesiredCount != nil {
if *a.ko.Spec.DesiredCount != *b.ko.Spec.DesiredCount {
delta.Add("Spec.DesiredCount", a.ko.Spec.DesiredCount, b.ko.Spec.DesiredCount)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.EnableECSManagedTags, b.ko.Spec.EnableECSManagedTags) {
delta.Add("Spec.EnableECSManagedTags", a.ko.Spec.EnableECSManagedTags, b.ko.Spec.EnableECSManagedTags)
} else if a.ko.Spec.EnableECSManagedTags != nil && b.ko.Spec.EnableECSManagedTags != nil {
if *a.ko.Spec.EnableECSManagedTags != *b.ko.Spec.EnableECSManagedTags {
delta.Add("Spec.EnableECSManagedTags", a.ko.Spec.EnableECSManagedTags, b.ko.Spec.EnableECSManagedTags)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.EnableExecuteCommand, b.ko.Spec.EnableExecuteCommand) {
delta.Add("Spec.EnableExecuteCommand", a.ko.Spec.EnableExecuteCommand, b.ko.Spec.EnableExecuteCommand)
} else if a.ko.Spec.EnableExecuteCommand != nil && b.ko.Spec.EnableExecuteCommand != nil {
if *a.ko.Spec.EnableExecuteCommand != *b.ko.Spec.EnableExecuteCommand {
delta.Add("Spec.EnableExecuteCommand", a.ko.Spec.EnableExecuteCommand, b.ko.Spec.EnableExecuteCommand)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.HealthCheckGracePeriodSeconds, b.ko.Spec.HealthCheckGracePeriodSeconds) {
delta.Add("Spec.HealthCheckGracePeriodSeconds", a.ko.Spec.HealthCheckGracePeriodSeconds, b.ko.Spec.HealthCheckGracePeriodSeconds)
} else if a.ko.Spec.HealthCheckGracePeriodSeconds != nil && b.ko.Spec.HealthCheckGracePeriodSeconds != nil {
if *a.ko.Spec.HealthCheckGracePeriodSeconds != *b.ko.Spec.HealthCheckGracePeriodSeconds {
delta.Add("Spec.HealthCheckGracePeriodSeconds", a.ko.Spec.HealthCheckGracePeriodSeconds, b.ko.Spec.HealthCheckGracePeriodSeconds)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.LaunchType, b.ko.Spec.LaunchType) {
delta.Add("Spec.LaunchType", a.ko.Spec.LaunchType, b.ko.Spec.LaunchType)
} else if a.ko.Spec.LaunchType != nil && b.ko.Spec.LaunchType != nil {
if *a.ko.Spec.LaunchType != *b.ko.Spec.LaunchType {
delta.Add("Spec.LaunchType", a.ko.Spec.LaunchType, b.ko.Spec.LaunchType)
}
}
if len(a.ko.Spec.LoadBalancers) != len(b.ko.Spec.LoadBalancers) {
delta.Add("Spec.LoadBalancers", a.ko.Spec.LoadBalancers, b.ko.Spec.LoadBalancers)
} else if len(a.ko.Spec.LoadBalancers) > 0 {
if !reflect.DeepEqual(a.ko.Spec.LoadBalancers, b.ko.Spec.LoadBalancers) {
delta.Add("Spec.LoadBalancers", a.ko.Spec.LoadBalancers, b.ko.Spec.LoadBalancers)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Name, b.ko.Spec.Name) {
delta.Add("Spec.Name", a.ko.Spec.Name, b.ko.Spec.Name)
} else if a.ko.Spec.Name != nil && b.ko.Spec.Name != nil {
if *a.ko.Spec.Name != *b.ko.Spec.Name {
delta.Add("Spec.Name", a.ko.Spec.Name, b.ko.Spec.Name)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.NetworkConfiguration, b.ko.Spec.NetworkConfiguration) {
delta.Add("Spec.NetworkConfiguration", a.ko.Spec.NetworkConfiguration, b.ko.Spec.NetworkConfiguration)
} else if a.ko.Spec.NetworkConfiguration != nil && b.ko.Spec.NetworkConfiguration != nil {
if ackcompare.HasNilDifference(a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration, b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration) {
delta.Add("Spec.NetworkConfiguration.AWSVPCConfiguration", a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration, b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration)
} else if a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration != nil && b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration != nil {
if ackcompare.HasNilDifference(a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.AssignPublicIP, b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.AssignPublicIP) {
delta.Add("Spec.NetworkConfiguration.AWSVPCConfiguration.AssignPublicIP", a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.AssignPublicIP, b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.AssignPublicIP)
} else if a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.AssignPublicIP != nil && b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.AssignPublicIP != nil {
if *a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.AssignPublicIP != *b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.AssignPublicIP {
delta.Add("Spec.NetworkConfiguration.AWSVPCConfiguration.AssignPublicIP", a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.AssignPublicIP, b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.AssignPublicIP)
}
}
if len(a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.SecurityGroups) != len(b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.SecurityGroups) {
delta.Add("Spec.NetworkConfiguration.AWSVPCConfiguration.SecurityGroups", a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.SecurityGroups, b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.SecurityGroups)
} else if len(a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.SecurityGroups) > 0 {
if !ackcompare.SliceStringPEqual(a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.SecurityGroups, b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.SecurityGroups) {
delta.Add("Spec.NetworkConfiguration.AWSVPCConfiguration.SecurityGroups", a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.SecurityGroups, b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.SecurityGroups)
}
}
if len(a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.Subnets) != len(b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.Subnets) {
delta.Add("Spec.NetworkConfiguration.AWSVPCConfiguration.Subnets", a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.Subnets, b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.Subnets)
} else if len(a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.Subnets) > 0 {
if !ackcompare.SliceStringPEqual(a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.Subnets, b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.Subnets) {
delta.Add("Spec.NetworkConfiguration.AWSVPCConfiguration.Subnets", a.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.Subnets, b.ko.Spec.NetworkConfiguration.AWSVPCConfiguration.Subnets)
}
}
}
}
if len(a.ko.Spec.PlacementConstraints) != len(b.ko.Spec.PlacementConstraints) {
delta.Add("Spec.PlacementConstraints", a.ko.Spec.PlacementConstraints, b.ko.Spec.PlacementConstraints)
} else if len(a.ko.Spec.PlacementConstraints) > 0 {
if !reflect.DeepEqual(a.ko.Spec.PlacementConstraints, b.ko.Spec.PlacementConstraints) {
delta.Add("Spec.PlacementConstraints", a.ko.Spec.PlacementConstraints, b.ko.Spec.PlacementConstraints)
}
}
if len(a.ko.Spec.PlacementStrategy) != len(b.ko.Spec.PlacementStrategy) {
delta.Add("Spec.PlacementStrategy", a.ko.Spec.PlacementStrategy, b.ko.Spec.PlacementStrategy)
} else if len(a.ko.Spec.PlacementStrategy) > 0 {
if !reflect.DeepEqual(a.ko.Spec.PlacementStrategy, b.ko.Spec.PlacementStrategy) {
delta.Add("Spec.PlacementStrategy", a.ko.Spec.PlacementStrategy, b.ko.Spec.PlacementStrategy)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.PlatformVersion, b.ko.Spec.PlatformVersion) {
delta.Add("Spec.PlatformVersion", a.ko.Spec.PlatformVersion, b.ko.Spec.PlatformVersion)
} else if a.ko.Spec.PlatformVersion != nil && b.ko.Spec.PlatformVersion != nil {
if *a.ko.Spec.PlatformVersion != *b.ko.Spec.PlatformVersion {
delta.Add("Spec.PlatformVersion", a.ko.Spec.PlatformVersion, b.ko.Spec.PlatformVersion)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.PropagateTags, b.ko.Spec.PropagateTags) {
delta.Add("Spec.PropagateTags", a.ko.Spec.PropagateTags, b.ko.Spec.PropagateTags)
} else if a.ko.Spec.PropagateTags != nil && b.ko.Spec.PropagateTags != nil {
if *a.ko.Spec.PropagateTags != *b.ko.Spec.PropagateTags {
delta.Add("Spec.PropagateTags", a.ko.Spec.PropagateTags, b.ko.Spec.PropagateTags)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.Role, b.ko.Spec.Role) {
delta.Add("Spec.Role", a.ko.Spec.Role, b.ko.Spec.Role)
} else if a.ko.Spec.Role != nil && b.ko.Spec.Role != nil {
if *a.ko.Spec.Role != *b.ko.Spec.Role {
delta.Add("Spec.Role", a.ko.Spec.Role, b.ko.Spec.Role)
}
}
if !reflect.DeepEqual(a.ko.Spec.RoleRef, b.ko.Spec.RoleRef) {
delta.Add("Spec.RoleRef", a.ko.Spec.RoleRef, b.ko.Spec.RoleRef)
}
if ackcompare.HasNilDifference(a.ko.Spec.SchedulingStrategy, b.ko.Spec.SchedulingStrategy) {
delta.Add("Spec.SchedulingStrategy", a.ko.Spec.SchedulingStrategy, b.ko.Spec.SchedulingStrategy)
} else if a.ko.Spec.SchedulingStrategy != nil && b.ko.Spec.SchedulingStrategy != nil {
if *a.ko.Spec.SchedulingStrategy != *b.ko.Spec.SchedulingStrategy {
delta.Add("Spec.SchedulingStrategy", a.ko.Spec.SchedulingStrategy, b.ko.Spec.SchedulingStrategy)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.ServiceConnectConfiguration, b.ko.Spec.ServiceConnectConfiguration) {
delta.Add("Spec.ServiceConnectConfiguration", a.ko.Spec.ServiceConnectConfiguration, b.ko.Spec.ServiceConnectConfiguration)
} else if a.ko.Spec.ServiceConnectConfiguration != nil && b.ko.Spec.ServiceConnectConfiguration != nil {
if ackcompare.HasNilDifference(a.ko.Spec.ServiceConnectConfiguration.Enabled, b.ko.Spec.ServiceConnectConfiguration.Enabled) {
delta.Add("Spec.ServiceConnectConfiguration.Enabled", a.ko.Spec.ServiceConnectConfiguration.Enabled, b.ko.Spec.ServiceConnectConfiguration.Enabled)
} else if a.ko.Spec.ServiceConnectConfiguration.Enabled != nil && b.ko.Spec.ServiceConnectConfiguration.Enabled != nil {
if *a.ko.Spec.ServiceConnectConfiguration.Enabled != *b.ko.Spec.ServiceConnectConfiguration.Enabled {
delta.Add("Spec.ServiceConnectConfiguration.Enabled", a.ko.Spec.ServiceConnectConfiguration.Enabled, b.ko.Spec.ServiceConnectConfiguration.Enabled)
}
}
if ackcompare.HasNilDifference(a.ko.Spec.ServiceConnectConfiguration.LogConfiguration, b.ko.Spec.ServiceConnectConfiguration.LogConfiguration) {
delta.Add("Spec.ServiceConnectConfiguration.LogConfiguration", a.ko.Spec.ServiceConnectConfiguration.LogConfiguration, b.ko.Spec.ServiceConnectConfiguration.LogConfiguration)
} else if a.ko.Spec.ServiceConnectConfiguration.LogConfiguration != nil && b.ko.Spec.ServiceConnectConfiguration.LogConfiguration != nil {
if ackcompare.HasNilDifference(a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.LogDriver, b.ko.Spec.ServiceConnectConfiguration.LogConfiguration.LogDriver) {
delta.Add("Spec.ServiceConnectConfiguration.LogConfiguration.LogDriver", a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.LogDriver, b.ko.Spec.ServiceConnectConfiguration.LogConfiguration.LogDriver)
} else if a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.LogDriver != nil && b.ko.Spec.ServiceConnectConfiguration.LogConfiguration.LogDriver != nil {
if *a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.LogDriver != *b.ko.Spec.ServiceConnectConfiguration.LogConfiguration.LogDriver {
delta.Add("Spec.ServiceConnectConfiguration.LogConfiguration.LogDriver", a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.LogDriver, b.ko.Spec.ServiceConnectConfiguration.LogConfiguration.LogDriver)
}
}
if len(a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.Options) != len(b.ko.Spec.ServiceConnectConfiguration.LogConfiguration.Options) {
delta.Add("Spec.ServiceConnectConfiguration.LogConfiguration.Options", a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.Options, b.ko.Spec.ServiceConnectConfiguration.LogConfiguration.Options)
} else if len(a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.Options) > 0 {
if !ackcompare.MapStringStringPEqual(a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.Options, b.ko.Spec.ServiceConnectConfiguration.LogConfiguration.Options) {
delta.Add("Spec.ServiceConnectConfiguration.LogConfiguration.Options", a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.Options, b.ko.Spec.ServiceConnectConfiguration.LogConfiguration.Options)
}
}
if len(a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.SecretOptions) != len(b.ko.Spec.ServiceConnectConfiguration.LogConfiguration.SecretOptions) {
delta.Add("Spec.ServiceConnectConfiguration.LogConfiguration.SecretOptions", a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.SecretOptions, b.ko.Spec.ServiceConnectConfiguration.LogConfiguration.SecretOptions)
} else if len(a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.SecretOptions) > 0 {
if !reflect.DeepEqual(a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.SecretOptions, b.ko.Spec.ServiceConnectConfiguration.LogConfiguration.SecretOptions) {
delta.Add("Spec.ServiceConnectConfiguration.LogConfiguration.SecretOptions", a.ko.Spec.ServiceConnectConfiguration.LogConfiguration.SecretOptions, b.ko.Spec.ServiceConnectConfiguration.LogConfiguration.SecretOptions)
}
}
}
if ackcompare.HasNilDifference(a.ko.Spec.ServiceConnectConfiguration.Namespace, b.ko.Spec.ServiceConnectConfiguration.Namespace) {
delta.Add("Spec.ServiceConnectConfiguration.Namespace", a.ko.Spec.ServiceConnectConfiguration.Namespace, b.ko.Spec.ServiceConnectConfiguration.Namespace)
} else if a.ko.Spec.ServiceConnectConfiguration.Namespace != nil && b.ko.Spec.ServiceConnectConfiguration.Namespace != nil {
if *a.ko.Spec.ServiceConnectConfiguration.Namespace != *b.ko.Spec.ServiceConnectConfiguration.Namespace {
delta.Add("Spec.ServiceConnectConfiguration.Namespace", a.ko.Spec.ServiceConnectConfiguration.Namespace, b.ko.Spec.ServiceConnectConfiguration.Namespace)
}
}
if len(a.ko.Spec.ServiceConnectConfiguration.Services) != len(b.ko.Spec.ServiceConnectConfiguration.Services) {
delta.Add("Spec.ServiceConnectConfiguration.Services", a.ko.Spec.ServiceConnectConfiguration.Services, b.ko.Spec.ServiceConnectConfiguration.Services)
} else if len(a.ko.Spec.ServiceConnectConfiguration.Services) > 0 {
if !reflect.DeepEqual(a.ko.Spec.ServiceConnectConfiguration.Services, b.ko.Spec.ServiceConnectConfiguration.Services) {
delta.Add("Spec.ServiceConnectConfiguration.Services", a.ko.Spec.ServiceConnectConfiguration.Services, b.ko.Spec.ServiceConnectConfiguration.Services)
}
}
}
if len(a.ko.Spec.ServiceRegistries) != len(b.ko.Spec.ServiceRegistries) {
delta.Add("Spec.ServiceRegistries", a.ko.Spec.ServiceRegistries, b.ko.Spec.ServiceRegistries)
} else if len(a.ko.Spec.ServiceRegistries) > 0 {
if !reflect.DeepEqual(a.ko.Spec.ServiceRegistries, b.ko.Spec.ServiceRegistries) {
delta.Add("Spec.ServiceRegistries", a.ko.Spec.ServiceRegistries, b.ko.Spec.ServiceRegistries)
}
}
if !ackcompare.MapStringStringEqual(ToACKTags(a.ko.Spec.Tags), ToACKTags(b.ko.Spec.Tags)) {
delta.Add("Spec.Tags", a.ko.Spec.Tags, b.ko.Spec.Tags)
}
if ackcompare.HasNilDifference(a.ko.Spec.TaskDefinition, b.ko.Spec.TaskDefinition) {
delta.Add("Spec.TaskDefinition", a.ko.Spec.TaskDefinition, b.ko.Spec.TaskDefinition)
} else if a.ko.Spec.TaskDefinition != nil && b.ko.Spec.TaskDefinition != nil {
if *a.ko.Spec.TaskDefinition != *b.ko.Spec.TaskDefinition {
delta.Add("Spec.TaskDefinition", a.ko.Spec.TaskDefinition, b.ko.Spec.TaskDefinition)
}
}
if !reflect.DeepEqual(a.ko.Spec.TaskDefinitionRef, b.ko.Spec.TaskDefinitionRef) {
delta.Add("Spec.TaskDefinitionRef", a.ko.Spec.TaskDefinitionRef, b.ko.Spec.TaskDefinitionRef)
}
if len(a.ko.Spec.VolumeConfigurations) != len(b.ko.Spec.VolumeConfigurations) {
delta.Add("Spec.VolumeConfigurations", a.ko.Spec.VolumeConfigurations, b.ko.Spec.VolumeConfigurations)
} else if len(a.ko.Spec.VolumeConfigurations) > 0 {
if !reflect.DeepEqual(a.ko.Spec.VolumeConfigurations, b.ko.Spec.VolumeConfigurations) {
delta.Add("Spec.VolumeConfigurations", a.ko.Spec.VolumeConfigurations, b.ko.Spec.VolumeConfigurations)
}
}
return delta
}