Skip to content

Commit

Permalink
Add Subnet resource (#4)
Browse files Browse the repository at this point in the history
**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 =======================================================================
```
  • Loading branch information
brycahta committed Aug 23, 2021
1 parent 36d0e4b commit c362e4b
Show file tree
Hide file tree
Showing 38 changed files with 4,217 additions and 218 deletions.
12 changes: 6 additions & 6 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ack_generate_info:
build_date: "2021-08-16T20:38:40Z"
build_hash: afa7fe00dae2c7404018e98c13130a01b6643d1d
build_date: "2021-08-18T21:36:57Z"
build_hash: 821a0daf362fdda8148046310c3eb478b96366ac
go_version: go1.16.6 darwin/amd64
version: v0.10.0
api_directory_checksum: d84b2e29cfafbcd249dab46daa7972a32fe9c446
version: v0.12.0
api_directory_checksum: aae0d15e0e983bfceae42ac7f3dd640e1f9b298a
api_version: v1alpha1
aws_sdk_go_version: v1.37.10
generator_config_info:
file_checksum: 33f4857c10945c0b2612675fc5657588633478e7
file_checksum: f7a61725fe7d34c5e0180ae010b10eebd5cb95e0
original_file_name: generator.yaml
last_modification:
reason: API generation
timestamp: 2021-08-16 20:38:50.308741 +0000 UTC
timestamp: 2021-08-18 21:37:05.403098 +0000 UTC
15 changes: 11 additions & 4 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ignore:
field_paths:
- CreateVpcInput.DryRun
- CreateSubnetInput.DryRun
resource_names:
- AccountAttribute
- CapacityReservation
Expand Down Expand Up @@ -36,7 +37,7 @@ ignore:
- SecurityGroup
- Snapshot
- SpotDatafeedSubscription
- Subnet
#- Subnet
- TrafficMirrorFilterRule
- TrafficMirrorFilter
- TrafficMirrorSession
Expand Down Expand Up @@ -64,7 +65,13 @@ ignore:
resources:
Vpc:
hooks:
sdk_read_many_pre_build_request:
template_path: hooks/vpc/sdk_read_many_pre_build_request.go.tpl
sdk_read_many_post_build_request:
template_path: hooks/vpc/sdk_read_many_post_build_request.go.tpl
template_path: hooks/vpc/sdk_read_many_post_build_request.go.tpl
Subnet:
hooks:
sdk_read_many_post_build_request:
template_path: hooks/vpc/sdk_read_many_post_build_request.go.tpl
exceptions:
terminal_codes:
- InvalidVpcID.Malformed
- InvalidVpcID.NotFound
133 changes: 133 additions & 0 deletions apis/v1alpha1/subnet.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c362e4b

Please sign in to comment.