Skip to content

Commit e8a2f50

Browse files
authored
Generate DBSnpashot resource (#181)
Brings a new resource `DBSnapshot` to the rds-controller - Adds generator.yaml and necessary hooks - Adds e2e tests By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 5359551 commit e8a2f50

33 files changed

+4276
-70
lines changed
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2024-05-02T20:49:06Z"
2+
build_date: "2024-06-11T08:00:15Z"
33
build_hash: 14cef51778d471698018b6c38b604181a6948248
4-
go_version: go1.22.0
4+
go_version: go1.22.3
55
version: v0.34.0
6-
api_directory_checksum: 11c44032679e136f20ebca3e336bdc3bd8f71312
6+
api_directory_checksum: 3d96ec8d32c85751df2f90793645364459c63fb2
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.232
99
generator_config_info:
10-
file_checksum: 1c65701c9ae781dcda0fb8c04fed4de60e25a9ef
10+
file_checksum: 9d617a40bcd5f222f428fd01f450f7e41dbfbfee
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/db_snapshot.go

+200
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1alpha1/generator.yaml

+24-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ignore:
1313
#- DBProxy
1414
- DBProxyEndpoint
1515
- DBSecurityGroup
16-
- DBSnapshot
16+
# DBSnapshot
1717
#- DBSubnetGroup
1818
- EventSubscription
1919
#- GlobalCluster
@@ -23,6 +23,10 @@ ignore:
2323
- DBInstance.DBSecurityGroups
2424
# We handle Spec.Tags separately...
2525
- "DescribeDBInstancesOutput.DBInstances.DBInstance.TagList"
26+
# These fields are also supported for DBSnapshot updates but we can't
27+
# support them for the moment. They require some code-generator modifications.
28+
- "CreateDBSnapshotOutput.DBSnapshot.EngineVersion"
29+
- "CreateDBSnapshotOutput.DBSnapshot.OptionGroupName"
2630
operations:
2731
ModifyDBCluster:
2832
override_values:
@@ -454,3 +458,22 @@ resources:
454458
template_path: hooks/db_proxy/sdk_update_post_set_output.go.tpl
455459
sdk_delete_pre_build_request:
456460
template_path: hooks/db_proxy/sdk_delete_pre_build_request.go.tpl
461+
DBSnapshot:
462+
fields:
463+
DBSnapshotIdentifier:
464+
is_primary_key: true
465+
DBInstanceIdentifier:
466+
references:
467+
resource: DBInstance
468+
path: Spec.DBInstanceIdentifier
469+
# EngineVersion:
470+
# is_read_only: false
471+
# OptionGroupName:
472+
# is_read_only: false
473+
hooks:
474+
sdk_create_post_set_output:
475+
template_path: hooks/db_snapshot/sdk_create_post_set_output.go.tpl
476+
sdk_read_many_post_set_output:
477+
template_path: hooks/db_snapshot/sdk_read_many_post_set_output.go.tpl
478+
sdk_update_pre_build_request:
479+
template_path: hooks/db_snapshot/sdk_update_pre_build_request.go.tpl

apis/v1alpha1/types.go

+20-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)