Skip to content

Commit 72da833

Browse files
Support Put* fields for slices of configuration types (#57)
Implements aws-controllers-k8s/community#914 Description of changes: Uses the new custom fields code-generator PR (aws-controllers-k8s/code-generator#222) to create lists of configuration types. At runtime each of these configurations is put individually (mapped using their ID field) onto the bucket. For each reconciliation, we describe the configurations using a `List*` operation and determine the delta for each configuration using a generated `compare*` method in the `sdk.go`. The configuration elements are individually created, deleted, updated or no-op'd depending on the diff. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 41807fe commit 72da833

File tree

12 files changed

+2793
-40
lines changed

12 files changed

+2793
-40
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2021-10-14T18:50:30Z"
3-
build_hash: f4166ae9942034b0552f244685515eef5a92dc25
2+
build_date: "2021-10-27T19:39:24Z"
3+
build_hash: 6cfd5d8443975a287535dc27424206ac133ebb24
44
go_version: go1.17.1
55
version: v0.15.1
6-
api_directory_checksum: e1236617364bb9947bcbfbeb21ce75841b5407f3
6+
api_directory_checksum: 5157c106fef6bc423adba5eaf17c55de26b36d1e
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.37.10
99
generator_config_info:
10-
file_checksum: 45772c7b934f89394b89fe6214164cd8fe76a59e
10+
file_checksum: 6a5e4faafc21f5c309ef5219f784fa8228d01744
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/bucket.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1alpha1/generator.yaml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ resources:
2121
from:
2222
operation: PutBucketAccelerateConfiguration
2323
path: AccelerateConfiguration
24-
# AnalyticsConfiguration:
25-
# from:
26-
# operation: PutBucketAnalyticsConfiguration
27-
# path: AnalyticsConfiguration # Double check about ID
24+
Analytics:
25+
custom_field:
26+
list_of: AnalyticsConfiguration
2827
CORS:
2928
from:
3029
operation: PutBucketCors
@@ -33,14 +32,12 @@ resources:
3332
from:
3433
operation: PutBucketEncryption
3534
path: ServerSideEncryptionConfiguration
36-
# IntelligentTieringConfiguration:
37-
# from:
38-
# operation: PutBucketIntelligentTieringConfiguration
39-
# path: IntelligentTieringConfiguration # Double check about ID
40-
# InventoryConfiguration:
41-
# from:
42-
# operation: PutBucketInventoryConfiguration
43-
# path: InventoryConfiguration # Double check about ID
35+
IntelligentTiering:
36+
custom_field:
37+
list_of: IntelligentTieringConfiguration
38+
Inventory:
39+
custom_field:
40+
list_of: InventoryConfiguration
4441
Lifecycle:
4542
from:
4643
operation: PutBucketLifecycleConfiguration
@@ -49,10 +46,9 @@ resources:
4946
from:
5047
operation: PutBucketLogging
5148
path: BucketLoggingStatus
52-
# MetricsConfiguration:
53-
# from:
54-
# operation: PutBucketMetricsConfiguration
55-
# path: MetricsConfiguration # Double check about ID
49+
Metrics:
50+
custom_field:
51+
list_of: MetricsConfiguration
5652
Notification:
5753
from:
5854
operation: PutBucketNotificationConfiguration

apis/v1alpha1/types.go

Lines changed: 130 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)