-
Notifications
You must be signed in to change notification settings - Fork 31
/
generator.yaml
524 lines (524 loc) · 14.8 KB
/
generator.yaml
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
operations:
AssociateIdentityProviderConfig:
operation_type:
- Create
resource_name:
IdentityProviderConfig
DisassociateIdentityProviderConfig:
operation_type:
- Delete
resource_name:
IdentityProviderConfig
DescribeIdentityProviderConfig:
custom_check_required_fields_missing_method: customCheckRequiredFieldsMissing
resources:
Addon:
hooks:
delta_pre_compare:
code: customPreCompare(delta, a, b)
sdk_read_one_post_set_output:
template_path: hooks/addons/sdk_read_one_post_set_output.go.tpl
sdk_create_post_set_output:
template_path: hooks/addons/sdk_create_post_set_output.go.tpl
sdk_update_pre_build_request:
template_path: hooks/addons/sdk_update_pre_build_request.go.tpl
sdk_update_post_build_request:
template_path: hooks/addons/sdk_update_post_build_request.go.tpl
sdk_update_post_set_output:
template_path: hooks/addons/sdk_update_post_set_output.go.tpl
fields:
ClusterName:
references:
resource: Cluster
path: Spec.Name
ServiceAccountRoleArn:
references:
service_name: iam
resource: Role
path: Status.ACKResourceMetadata.ARN
PodIdentityAssociations:
set:
- ignore: true
method: Create
- ignore: true
method: ReadOne
compare:
is_ignored: true
# Note(a-hilaly): Ideally, we would like to have the following configuration
# but the generator doesn't support such a unique case. PodIdentityAssociations
# Is already defined in the spec and leveraging set[*].ignore: true, which is
# influencing the set configurations for PodIdentityAssociationIDs.
# We need to extend the code-generator (and build better APIs).
#
# PodIdentityAssociationIDs:
# is_read_only: true
# custom_field:
# list_of: String
# set:
# - method: ReadOne
# from: PodIdentityAssociations
# - method: Create
# from: PodIdentityAssociations
renames:
operations:
CreateAddon:
input_fields:
AddonName: Name
DescribeAddon:
input_fields:
AddonName: Name
DeleteAddon:
input_fields:
AddonName: Name
UpdateAddon:
input_fields:
AddonName: Name
exceptions:
errors:
404:
code: ResourceNotFoundException
terminal_codes:
- ResourceLimitExceeded
- ResourceNotFound
- ResourceInUse
- OptInRequired
- InvalidParameterCombination
- InvalidParameterValue
- InvalidParameterException
- InvalidQueryParameter
- MalformedQueryString
- MissingAction
- MissingParameter
- ValidationError
print:
add_age_column: true
add_synced_column: true
order_by: index
additional_columns:
- name: CLUSTER
json_path: .spec.clusterName
type: string
index: 10
- name: ADDONVERSION
json_path: .spec.addonVersion
type: string
index: 20
- name: RESOLVECONFLICTS
json_path: .spec.resolveConflicts
type: string
index: 30
- name: STATUS
json_path: .status.status
type: string
index: 40
priority: 1
- name: SERVICEACCOUNTROLEARN
json_path: .spec.serviceAccountRoleARN
type: string
index: 50
priority: 1
IdentityProviderConfig:
fields:
ClusterName:
references:
resource: Cluster
path: Spec.Name
is_primary_key: true
is_immutable: true
OIDC:
is_immutable: true
Status:
is_read_only: true
from:
operation: DescribeIdentityProviderConfig
path: IdentityProviderConfig.Oidc.Status
Tags:
is_immutable: true
compare:
is_ignored: true
hooks:
sdk_delete_post_build_request:
template_path: hooks/identity_provider_config/sdk_delete_post_build_request.go.tpl
sdk_read_one_post_build_request:
template_path: hooks/identity_provider_config/sdk_read_one_post_build_request.go.tpl
sdk_create_post_set_output:
template_path: hooks/identity_provider_config/sdk_create_post_set_output.go.tpl
sdk_read_one_post_set_output:
template_path: hooks/identity_provider_config/sdk_read_one_post_set_output.go.tpl
post_set_resource_identifiers:
template_path: hooks/identity_provider_config/post_set_resource_identifiers.go.tpl
update_operation:
custom_method_name: customUpdate
Cluster:
fields:
EncryptionConfig.Provider.KeyArn:
references:
service_name: kms
resource: Key
path: Status.ACKResourceMetadata.ARN
RoleArn:
references:
service_name: iam
resource: Role
path: Status.ACKResourceMetadata.ARN
ResourcesVpcConfig.SecurityGroupIds:
references:
service_name: ec2
resource: SecurityGroup
path: Status.ID
ResourcesVpcConfig.SubnetIds:
references:
service_name: ec2
resource: Subnet
path: Status.SubnetID
AccessConfig.BootstrapClusterCreatorAdminPermissions:
compare:
is_ignored: true
BootstrapSelfManagedAddons:
compare:
is_ignored: true
exceptions:
errors:
404:
code: ResourceNotFoundException
terminal_codes:
- ResourceLimitExceeded
- ResourceNotFound
- ResourceInUse
- OptInRequired
- InvalidParameterCombination
- InvalidParameterValue
- InvalidParameterException
- InvalidQueryParameter
- MalformedQueryString
- MissingAction
- MissingParameter
- ValidationError
hooks:
delta_pre_compare:
code: customPreCompare(a, b)
sdk_create_post_set_output:
template_path: hooks/cluster/sdk_create_post_set_output.go.tpl
sdk_read_one_post_set_output:
template_path: hooks/cluster/sdk_read_one_post_set_output.go.tpl
sdk_delete_pre_build_request:
template_path: hooks/cluster/sdk_delete_pre_build_request.go.tpl
sdk_file_end:
template_path: hooks/cluster/sdk_file_end.go.tpl
update_operation:
custom_method_name: customUpdate
print:
add_age_column: true
add_synced_column: true
order_by: index
additional_columns:
- name: VERSION
json_path: .spec.version
type: string
index: 10
- name: STATUS
json_path: .status.status
type: string
index: 20
- name: PLATFORMVERSION
json_path: .status.platformVersion
type: string
index: 30
priority: 1
- name: ENDPOINT
json_path: .status.endpoint
type: string
index: 40
priority: 1
FargateProfile:
fields:
ClusterName:
references:
resource: Cluster
path: Spec.Name
PodExecutionRoleArn:
references:
service_name: iam
resource: Role
path: Status.ACKResourceMetadata.ARN
Subnets:
references:
service_name: ec2
resource: Subnet
path: Status.SubnetID
renames:
operations:
CreateFargateProfile:
input_fields:
FargateProfileName: Name
DescribeFargateProfile:
input_fields:
FargateProfileName: Name
DeleteFargateProfile:
input_fields:
FargateProfileName: Name
exceptions:
errors:
404:
code: ResourceNotFoundException
terminal_codes:
- ResourceLimitExceeded
- ResourceNotFound
- ResourceInUse
- OptInRequired
- InvalidParameterCombination
- InvalidParameterValue
- InvalidParameterException
- InvalidQueryParameter
- MalformedQueryString
- MissingAction
- MissingParameter
- ValidationError
hooks:
delta_pre_compare:
code: customPreCompare(a, b)
sdk_delete_pre_build_request:
template_path: hooks/fargate_profile/sdk_delete_pre_build_request.go.tpl
update_operation:
custom_method_name: customUpdate
synced:
when:
- path: Status.Status
in:
- ACTIVE
print:
add_age_column: true
add_synced_column: true
order_by: index
additional_columns:
- name: CLUSTER
json_path: .spec.clusterName
type: string
index: 10
- name: STATUS
json_path: .status.status
type: string
index: 20
- name: PODEXECUTIONROLEARN
json_path: .spec.podExecutionRoleARN
type: string
index: 30
priority: 1
Nodegroup:
fields:
ClusterName:
references:
resource: Cluster
path: Spec.Name
NodeRole:
references:
service_name: iam
resource: Role
path: Status.ACKResourceMetadata.ARN
is_immutable: true
DiskSize:
is_immutable: true
RemoteAccess:
is_immutable: true
RemoteAccess.SourceSecurityGroups:
references:
service_name: ec2
resource: SecurityGroup
path: Status.ID
Subnets:
references:
service_name: ec2
resource: Subnet
path: Status.SubnetID
is_immutable: true
Taints:
compare:
is_ignored: true
ReleaseVersion:
compare:
is_ignored: true
Version:
compare:
is_ignored: true
renames:
operations:
CreateNodegroup:
input_fields:
NodegroupName: Name
DescribeNodegroup:
input_fields:
NodegroupName: Name
DeleteNodegroup:
input_fields:
NodegroupName: Name
exceptions:
errors:
404:
code: ResourceNotFoundException
terminal_codes:
- ResourceLimitExceeded
- ResourceNotFound
- ResourceInUse
- OptInRequired
- InvalidParameterCombination
- InvalidParameterValue
- InvalidParameterException
- InvalidQueryParameter
- MalformedQueryString
- MissingAction
- MissingParameter
- ValidationError
hooks:
delta_pre_compare:
code: customPreCompare(delta, a, b)
delta_post_compare:
code: customPostCompare(delta, a, b)
sdk_create_post_set_output:
template_path: hooks/nodegroup/sdk_create_post_set_output.go.tpl
sdk_read_one_post_set_output:
template_path: hooks/nodegroup/sdk_read_one_post_set_output.go.tpl
sdk_delete_pre_build_request:
template_path: hooks/nodegroup/sdk_delete_pre_build_request.go.tpl
sdk_file_end:
template_path: hooks/nodegroup/sdk_file_end.go.tpl
update_operation:
custom_method_name: customUpdate
print:
add_age_column: true
add_synced_column: true
order_by: index
additional_columns:
- name: CLUSTER
json_path: .spec.clusterName
type: string
index: 10
- name: VERSION
json_path: .spec.version
type: string
index: 20
- name: STATUS
json_path: .status.status
type: string
index: 30
- name: RELEASEVERSION
json_path: .spec.releaseVersion
type: string
index: 40
priority: 1
- name: DESIREDSIZE
json_path: .spec.scalingConfig.desiredSize
type: integer
index: 50
- name: MINSIZE
json_path: .spec.scalingConfig.minSize
type: integer
index: 60
- name: MAXSIZE
json_path: .spec.scalingConfig.maxSize
type: integer
index: 70
- name: DISKSIZE
json_path: .spec.diskSize
type: integer
index: 80
priority: 1
PodIdentityAssociation:
hooks:
sdk_update_pre_build_request:
template_path: hooks/pod_identity_association/sdk_update_pre_build_request.go.tpl
sdk_read_one_post_set_output:
template_path: hooks/pod_identity_association/sdk_read_one_post_set_output.go.tpl
sdk_create_post_set_output:
template_path: hooks/pod_identity_association/sdk_create_post_set_output.go.tpl
fields:
ClusterName:
references:
resource: Cluster
path: Spec.Name
is_primary_key: true
RoleARN:
references:
service_name: iam
resource: Role
path: Status.ACKResourceMetadata.ARN
print:
add_age_column: true
add_synced_column: true
order_by: index
additional_columns:
- name: CLUSTER
json_path: .spec.clusterName
type: string
index: 10
- name: NAMESPACE
json_path: .spec.namespace
type: string
index: 20
- name: SERVICEACCOUNT
json_path: .spec.serviceAccount
type: string
index: 30
- name: ROLEARN
json_path: .spec.roleARN
type: string
index: 40
priority: 1
- name: ASSOCIATIONID
json_path: .status.associationID
type: string
index: 50
priority: 1
AccessEntry:
fields:
ClusterName:
references:
resource: Cluster
path: Spec.Name
is_primary_key: true
AccessPolicies:
custom_field:
list_of: AssociateAccessPolicyInput
compare:
is_ignored: true
AccessPolicies.AccessScope.Type:
go_tag: json:"type,omitempty"
Type:
go_tag: json:"type,omitempty"
hooks:
delta_pre_compare:
code: customPreCompare(delta, a, b)
sdk_read_one_post_set_output:
template_path: hooks/access_entry/sdk_read_one_post_set_output.go.tpl
sdk_update_pre_build_request:
template_path: hooks/access_entry/sdk_update_pre_build_request.go.tpl
print:
add_age_column: true
add_synced_column: true
order_by: index
additional_columns:
- name: CLUSTER
json_path: .spec.clusterName
type: string
index: 10
- name: TYPE
json_path: .spec.type
type: string
index: 20
- name: USERNAME
json_path: .spec.username
type: string
index: 30
- name: PRINCIPALARN
json_path: .spec.principalARN
type: string
index: 40
priority: 1
ignore:
resource_names:
- EksAnywhereSubscription
field_paths:
- CreateAccessEntryInput.ClientRequestToken
- AssociateIdentityProviderConfigInput.ClientRequestToken
- AssociateIdentityProviderConfigOutput.Update
- AssociateAccessPolicyInput.PrincipalArn
- AssociateAccessPolicyInput.ClusterName