Skip to content

Commit c774f71

Browse files
authored
Add Route to RouteTable using ACK runtime v0.15.2 (#21)
Issue #, if available: aws-controllers-k8s/community#489 Description of changes: * Moves `route` from Status to Spec so users can define Routes upon RouteTable creation * Changes to handle default route created by RouteTable & user-defined routes * Tests for route By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 4927448 commit c774f71

19 files changed

+1090
-95
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-11-08T20:16:44Z"
3-
build_hash: 6ce1a672eabd3908bdaa4ace356e1b58ee3e80ba
2+
build_date: "2021-11-18T20:10:16Z"
3+
build_hash: 966e9a9ac6dfb4bbc2d3ded1972ce2b706391d44
44
go_version: go1.17
55
version: v0.15.2
6-
api_directory_checksum: 231335e65c729f31ac368b1483a38c2964b3219a
6+
api_directory_checksum: 43cfac78c9b056059cb202c220f24ac4fb02477f
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.37.10
99
generator_config_info:
10-
file_checksum: 438c2600566029a9ab883076d641246f0a8fbb88
10+
file_checksum: c2aa55a1129fa79f889cea05f77bc97ab4b70d89
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/enums.go

Lines changed: 6 additions & 6 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: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ ignore:
44
- ModifyVpcEndpoint
55
field_paths:
66
- CreateInternetGatewayInput.DryRun
7+
- CreateRouteInput.DryRun
8+
- CreateRouteInput.RouteTableId
79
- CreateRouteTableInput.DryRun
810
- CreateSecurityGroupInput.DryRun
911
- CreateSubnetInput.DryRun
1012
- CreateTransitGatewayInput.DryRun
1113
- CreateVpcInput.DryRun
1214
- CreateVpcEndpointInput.DryRun
15+
- DeleteRouteInput.DryRun
16+
- DeleteRouteInput.RouteTableId
1317
# support EC2-VPC only
1418
- DeleteSecurityGroupInput.GroupName
1519
resource_names:
@@ -86,6 +90,30 @@ resources:
8690
terminal_codes:
8791
- InvalidVpcID.Malformed
8892
- InvalidVpcID.NotFound
93+
- InvalidParameterValue
94+
fields:
95+
# RouteStatuses as Route to ensure
96+
# fields set server-side (active, origin)
97+
# are exposed in Status
98+
RouteStatuses:
99+
from:
100+
operation: DescribeRouteTables
101+
path: RouteTables.Routes
102+
is_read_only: true
103+
# Routes as CreateRouteInput to ensure only
104+
# user-editable fields are exposed in Spec
105+
Routes:
106+
custom_field:
107+
list_of: CreateRouteInput
108+
hooks:
109+
sdk_create_post_set_output:
110+
template_path: hooks/route_table/sdk_create_post_set_output.go.tpl
111+
sdk_read_many_post_set_output:
112+
template_path: hooks/route_table/sdk_read_many_post_set_output.go.tpl
113+
sdk_file_end:
114+
template_path: hooks/route_table/sdk_file_end.go.tpl
115+
update_operation:
116+
custom_method_name: customUpdateRouteTable
89117
SecurityGroup:
90118
fields:
91119
# support EC2-VPC only

apis/v1alpha1/route_table.go

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

apis/v1alpha1/types.go

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

0 commit comments

Comments
 (0)