Skip to content

Commit a544e43

Browse files
Include Logging as part of Create and Update flow (#25)
Adds custom hooks to detect changes to the `Logging` spec field and optionally calls the `PutBucketLogging` SDK method. Currently errors are not populated into terminal conditions, and updates are not supported. Uses aws-controllers-k8s/code-generator#139 and aws-controllers-k8s/code-generator#140
1 parent b23f978 commit a544e43

14 files changed

+673
-11
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
ack_generate_info:
2-
build_date: "2021-07-27T22:56:45Z"
3-
build_hash: 5a40e37032506f12a07b7de12a6005b525d13ad9
2+
build_date: "2021-08-02T16:52:48Z"
3+
build_hash: 585a17697d1c469f01f391e88ec80de450a65e9a
44
go_version: go1.15.6 linux/amd64
55
version: v0.7.0
6-
api_directory_checksum: 73b58f20311ba8bf905c26dc7cbefd66624eb2ee
6+
api_directory_checksum: f3302d83fa5db4156550a01a1d76ba8e3509386b
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.37.4
99
generator_config_info:
10-
file_checksum: 12ca89a38944275f5d381defdb3bc9c71e9f4fae
10+
file_checksum: cd62f659df233fcb38d7785a5abe4ba1cf59e0ae
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation
14-
timestamp: 2021-07-27 22:56:51.179426188 +0000 UTC
14+
timestamp: 2021-08-02 16:52:53.891744641 +0000 UTC

apis/v1alpha1/bucket.go

Lines changed: 2 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: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,96 @@ operations:
1010
primary_identifier_field_name: Name
1111
resources:
1212
Bucket:
13+
fields:
14+
# AccelerateConfiguration:
15+
# from:
16+
# operation: PutBucketAccelerateConfiguration
17+
# path: AccelerateConfiguration
18+
# AnalyticsConfiguration:
19+
# from:
20+
# operation: PutBucketAnalyticsConfiguration
21+
# path: AnalyticsConfiguration # Double check about ID
22+
# Cors:
23+
# from:
24+
# operation: PutBucketCors
25+
# path: CORSConfiguration
26+
# Encryption:
27+
# from:
28+
# operation: PutBucketEncryption
29+
# path: ServerSideEncryptionConfiguration
30+
# IntelligentTieringConfiguration:
31+
# from:
32+
# operation: PutBucketIntelligentTieringConfiguration
33+
# path: IntelligentTieringConfiguration # Double check about ID
34+
# InventoryConfiguration:
35+
# from:
36+
# operation: PutBucketInventoryConfiguration
37+
# path: InventoryConfiguration # Double check about ID
38+
# # Lifecycle:
39+
# # from:
40+
# # operation: PutBucketLifecycle
41+
# # path: LifecycleConfiguration
42+
# LifecycleConfiguration:
43+
# from:
44+
# operation: PutBucketLifecycleConfiguration
45+
# path: LifecycleConfiguration
46+
Logging:
47+
from:
48+
operation: PutBucketLogging
49+
path: BucketLoggingStatus
50+
# MetricsConfiguration:
51+
# from:
52+
# operation: PutBucketMetricsConfiguration
53+
# path: MetricsConfiguration # Double check about ID
54+
# # Notification:
55+
# # from:
56+
# # operation: PutBucketNotification
57+
# # path: NotificationConfiguration
58+
# # NotificationConfiguration:
59+
# # from:
60+
# # operation: PutBucketNotificationConfiguration
61+
# # path: NotificationConfiguration
62+
# OwnershipControls:
63+
# from:
64+
# operation: PutBucketOwnershipControls
65+
# path: OwnershipControls
66+
# Policy:
67+
# from:
68+
# operation: PutBucketPolicy
69+
# path: Policy # Double check about ConfirmRemoveSelfBucketAccess
70+
# Replication:
71+
# from:
72+
# operation: PutBucketReplication
73+
# path: ReplicationConfiguration # Double check about Token
74+
# RequestPayment:
75+
# from:
76+
# operation: PutBucketRequestPayment
77+
# path: RequestPaymentConfiguration
78+
# Tagging:
79+
# from:
80+
# operation: PutBucketTagging
81+
# path: Tagging
82+
# Versioning:
83+
# from:
84+
# operation: PutBucketVersioning
85+
# path: VersioningConfiguration # Double check about MFA
86+
# Website:
87+
# from:
88+
# operation: PutBucketWebsite
89+
# path: WebsiteConfiguration
90+
exceptions:
91+
errors:
92+
404:
93+
code: NoSuchBucket
94+
hooks:
95+
sdk_create_post_set_output:
96+
template_path: hooks/bucket/sdk_create_post_set_output.go.tpl
97+
sdk_read_many_post_set_output:
98+
template_path: hooks/bucket/sdk_read_many_post_set_output.go.tpl
99+
sdk_file_end:
100+
template_path: hooks/bucket/sdk_file_end.go.tpl
101+
update_operation:
102+
custom_method_name: customUpdateBucket
13103
renames:
14104
operations:
15105
CreateBucket:

apis/v1alpha1/types.go

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

apis/v1alpha1/zz_generated.deepcopy.go

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

0 commit comments

Comments
 (0)