Skip to content

Add route table assocations to Subnet #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2022-03-25T18:17:02Z"
build_hash: c6b852a8017aa73cfc5a882b1ba60c88d820e967
go_version: go1.17.5
version: v0.18.1
api_directory_checksum: cc3671a6c2f26f433ffe32815ccfaa24d12e42d1
build_date: "2022-03-29T17:33:11Z"
build_hash: 6f659f796434e8fd6443c0b3a5b495daae910035
go_version: go1.17.8
version: v0.18.0
api_directory_checksum: e5bf2003f6be051fdeda5059df47eb7fff0a9c86
api_version: v1alpha1
aws_sdk_go_version: v1.42.0
generator_config_info:
file_checksum: 721b58308fb63699f1ac3c233e529189e7d59c4c
file_checksum: c041dcc9493bdd9baed2e0599d8bc4401b5f2d25
original_file_name: generator.yaml
last_modification:
reason: API generation
13 changes: 13 additions & 0 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ resources:
- VPCIdNotSpecified
Subnet:
fields:
RouteTables:
custom_field:
list_of: String
references:
resource: RouteTable
path: Status.RouteTableID
VpcId:
references:
resource: VPC
Expand All @@ -246,6 +252,13 @@ resources:
terminal_codes:
- InvalidVpcID.Malformed
- InvalidVpcID.NotFound
hooks:
sdk_create_post_set_output:
template_path: hooks/subnet/sdk_create_post_set_output.go.tpl
sdk_read_many_post_set_output:
template_path: hooks/subnet/sdk_read_many_post_set_output.go.tpl
update_operation:
custom_method_name: customUpdateSubnet
Vpc:
update_operation:
custom_method_name: customUpdate
Expand Down
5 changes: 4 additions & 1 deletion apis/v1alpha1/subnet.go

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

1 change: 1 addition & 0 deletions apis/v1alpha1/types.go

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

33 changes: 33 additions & 0 deletions apis/v1alpha1/zz_generated.deepcopy.go

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

20 changes: 20 additions & 0 deletions config/crd/bases/ec2.services.k8s.aws_subnets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,26 @@ spec:
specify an Outpost ARN, you must also specify the Availability Zone
of the Outpost subnet.
type: string
routeTableRefs:
items:
description: 'AWSResourceReferenceWrapper provides a wrapper around
*AWSResourceReference type to provide more user friendly syntax
for references using ''from'' field Ex: APIIDRef: from: name:
my-api'
properties:
from:
description: AWSResourceReference provides all the values necessary
to reference another k8s resource for finding the identifier(Id/ARN/Name)
properties:
name:
type: string
type: object
type: object
type: array
routeTables:
items:
type: string
type: array
tagSpecifications:
description: The tags to assign to the subnet.
items:
Expand Down
13 changes: 13 additions & 0 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ resources:
- VPCIdNotSpecified
Subnet:
fields:
RouteTables:
custom_field:
list_of: String
references:
resource: RouteTable
path: Status.RouteTableID
VpcId:
references:
resource: VPC
Expand All @@ -246,6 +252,13 @@ resources:
terminal_codes:
- InvalidVpcID.Malformed
- InvalidVpcID.NotFound
hooks:
sdk_create_post_set_output:
template_path: hooks/subnet/sdk_create_post_set_output.go.tpl
sdk_read_many_post_set_output:
template_path: hooks/subnet/sdk_read_many_post_set_output.go.tpl
update_operation:
custom_method_name: customUpdateSubnet
Vpc:
update_operation:
custom_method_name: customUpdate
Expand Down
70 changes: 70 additions & 0 deletions go.local.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
module github.com/aws-controllers-k8s/ec2-controller

go 1.17

replace github.com/aws-controllers-k8s/runtime => ../runtime

require (
github.com/aws-controllers-k8s/runtime v0.0.0
github.com/aws/aws-sdk-go v1.42.0
github.com/go-logr/logr v1.2.0
github.com/spf13/pflag v1.0.5
k8s.io/api v0.23.0
k8s.io/apimachinery v0.23.0
k8s.io/client-go v0.23.0
sigs.k8s.io/controller-runtime v0.11.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-logr/zapr v1.2.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/itchyny/gojq v0.12.6 // indirect
github.com/itchyny/timefmt-go v0.1.3 // indirect
github.com/jaypipes/envutil v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.28.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/stretchr/objx v0.2.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.19.1 // indirect
golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 // indirect
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/apiextensions-apiserver v0.23.0 // indirect
k8s.io/component-base v0.23.0 // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading