Skip to content

Commit c362e4b

Browse files
authored
Add Subnet resource (#4)
**Issue:** [#489](aws-controllers-k8s/community#489) ### Changes * Adds create/delete Subnet functionality with smoke tests * Adds terminal_codes for Subnet. Triggered when users try to create Subnet with malformed or invalid VpcId * related: attempting to delete VPC with Subnet attached will result in DependencyViolation which will requeue the delete with backoff (default behavior) until user resolves * Adds helm artifacts ### Testing * Tested controller locally with `go run` ✅ * `make kind-test` ✅ ``` [gw2] [ 33%] PASSED tests/test_subnet.py::TestSubnet::test_terminal_condition [gw3] [ 66%] PASSED tests/test_vpc.py::TestVpc::test_smoke [gw0] [100%] PASSED tests/test_subnet.py::TestSubnet::test_crud ======================================================================= 3 passed in 54.60s ======================================================================= ```
1 parent 36d0e4b commit c362e4b

38 files changed

+4217
-218
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
ack_generate_info:
2-
build_date: "2021-08-16T20:38:40Z"
3-
build_hash: afa7fe00dae2c7404018e98c13130a01b6643d1d
2+
build_date: "2021-08-18T21:36:57Z"
3+
build_hash: 821a0daf362fdda8148046310c3eb478b96366ac
44
go_version: go1.16.6 darwin/amd64
5-
version: v0.10.0
6-
api_directory_checksum: d84b2e29cfafbcd249dab46daa7972a32fe9c446
5+
version: v0.12.0
6+
api_directory_checksum: aae0d15e0e983bfceae42ac7f3dd640e1f9b298a
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.37.10
99
generator_config_info:
10-
file_checksum: 33f4857c10945c0b2612675fc5657588633478e7
10+
file_checksum: f7a61725fe7d34c5e0180ae010b10eebd5cb95e0
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation
14-
timestamp: 2021-08-16 20:38:50.308741 +0000 UTC
14+
timestamp: 2021-08-18 21:37:05.403098 +0000 UTC

apis/v1alpha1/generator.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ignore:
22
field_paths:
33
- CreateVpcInput.DryRun
4+
- CreateSubnetInput.DryRun
45
resource_names:
56
- AccountAttribute
67
- CapacityReservation
@@ -36,7 +37,7 @@ ignore:
3637
- SecurityGroup
3738
- Snapshot
3839
- SpotDatafeedSubscription
39-
- Subnet
40+
#- Subnet
4041
- TrafficMirrorFilterRule
4142
- TrafficMirrorFilter
4243
- TrafficMirrorSession
@@ -64,7 +65,13 @@ ignore:
6465
resources:
6566
Vpc:
6667
hooks:
67-
sdk_read_many_pre_build_request:
68-
template_path: hooks/vpc/sdk_read_many_pre_build_request.go.tpl
6968
sdk_read_many_post_build_request:
70-
template_path: hooks/vpc/sdk_read_many_post_build_request.go.tpl
69+
template_path: hooks/vpc/sdk_read_many_post_build_request.go.tpl
70+
Subnet:
71+
hooks:
72+
sdk_read_many_post_build_request:
73+
template_path: hooks/vpc/sdk_read_many_post_build_request.go.tpl
74+
exceptions:
75+
terminal_codes:
76+
- InvalidVpcID.Malformed
77+
- InvalidVpcID.NotFound

apis/v1alpha1/subnet.go

Lines changed: 133 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)