Commit 0ab38d5
authored
feat(VPCPeeringConnection): add support for custom resource and additional fields for Modify OP and auto-accepting (#158)
## Changes
This PR adds the `vpcpeeringconnections` custom resource via the standard code-generator output, but with a few custom additions:
- Adds the possibility to use an ACK VPC resource as a [Reference](https://aws-controllers-k8s.github.io/community/docs/contributor-docs/code-generator-config/#references-making-a-field-refer-to-another-resource) for the fields `spec.vpcRef` (instead of `spec.vpcId`) and `spec.peerVpcRef` (instead of `spec.peerVpcId`).
- Adds the `spec.accepterPeeringConnectionOptions` and `spec.requesterPeeringConnectionOptions` fields, which come from the `ModifyVpcPeeringConnectionOptions` API call, to allow the use of the `allowDnsResolutionFromRemoteVpc`, `AllowEgressFromLocalVpcToRemoteClassicLink` and `AllowEgressFromLocalClassicLinkToRemoteVpc` sub-fields.
- Adds the `spec.acceptRequest` (boolean) which will allow the VPC Peering Connection Request to automatically switch from status `pending-acceptance` to `active` without manual intervention. (Inspired by Crossplane's implementation ([Ref](https://doc.crds.dev/github.com/crossplane/provider-aws/ec2.aws.crossplane.io/VPCPeeringConnection/v1alpha1@v0.45.1)))
- Adds the field `spec.routes.vpcPeeringConnectionRef` to the Route Table CR
> Note: In [a separate PR](#159), we add the fields `spec.acceptVPCPeeringRequestsFromVPCID` and `spec.acceptVPCPeeringRequestsFromVPCRefs` to the VPC CRD, to allow you to add a list of VPC's from which you'd like to automatically accept incoming VPC Peering requests from.
## References
- [Slack Thread](https://kubernetes.slack.com/archives/C0402D8JJS1/p1700682197552809)
- Github Issue: aws-controllers-k8s/community#1943
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.1 parent dc920e9 commit 0ab38d5
File tree
39 files changed
+3974
-45
lines changed- apis/v1alpha1
- cmd/controller
- config
- crd
- bases
- rbac
- helm
- crds
- templates
- pkg/resource
- route_table
- vpc_peering_connection
- templates/hooks/vpc_peering_connection
- test/e2e
- resources
- tests
39 files changed
+3974
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
125 | | - | |
| 127 | + | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| |||
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
187 | 193 | | |
188 | 194 | | |
189 | 195 | | |
| |||
468 | 474 | | |
469 | 475 | | |
470 | 476 | | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
471 | 481 | | |
472 | 482 | | |
473 | 483 | | |
| |||
779 | 789 | | |
780 | 790 | | |
781 | 791 | | |
782 | | - | |
783 | | - | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments