Skip to content

Commit d86f411

Browse files
authored
Add route table assocations to internet gateway (#149)
Issue # aws-controllers-k8s/community#1892 Description of changes: New custom field RouteTables is added to internetGateway CRD. Route Table to Internet Gateway association is done using AssociateRouteTable API call and association is removed using DisassociateRouteTable API call. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent c2adba4 commit d86f411

19 files changed

+648
-481
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: "2023-09-14T23:23:00Z"
2+
build_date: "2023-09-18T23:03:44Z"
33
build_hash: 892f29d00a4c4ad21a2fa32919921de18190979d
4-
go_version: go1.21.0
4+
go_version: go1.20.3
55
version: v0.27.1
6-
api_directory_checksum: cd75b9b3537b16abdbf981cc60ab948e978ad939
6+
api_directory_checksum: 6e2d850d97f2f72db31c9bef522eca4ab95b3fcd
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.93
99
generator_config_info:
10-
file_checksum: e3d618bcc0a018d73959e27cc0d74c7abfa0502d
10+
file_checksum: c474e6cdec9622afad4b4cef415483a7bd0eda41
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@ resources:
351351
references:
352352
resource: VPC
353353
path: Status.VPCID
354+
RouteTables:
355+
custom_field:
356+
list_of: String
357+
references:
358+
resource: RouteTable
359+
path: Status.RouteTableID
354360
InternetGatewayID:
355361
print:
356362
path: Status.internetGatewayID

apis/v1alpha1/internet_gateway.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1alpha1/zz_generated.deepcopy.go

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

config/crd/bases/ec2.services.k8s.aws_internetgateways.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,26 @@ spec:
4040
description: "InternetGatewaySpec defines the desired state of InternetGateway.
4141
\n Describes an internet gateway."
4242
properties:
43+
routeTableRefs:
44+
items:
45+
description: "AWSResourceReferenceWrapper provides a wrapper around
46+
*AWSResourceReference type to provide more user friendly syntax
47+
for references using 'from' field Ex: APIIDRef: \n from: name:
48+
my-api"
49+
properties:
50+
from:
51+
description: AWSResourceReference provides all the values necessary
52+
to reference another k8s resource for finding the identifier(Id/ARN/Name)
53+
properties:
54+
name:
55+
type: string
56+
type: object
57+
type: object
58+
type: array
59+
routeTables:
60+
items:
61+
type: string
62+
type: array
4363
tags:
4464
description: The tags. The value parameter is required, but if you
4565
don't want the tag to have a value, specify the parameter with no

generator.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@ resources:
351351
references:
352352
resource: VPC
353353
path: Status.VPCID
354+
RouteTables:
355+
custom_field:
356+
list_of: String
357+
references:
358+
resource: RouteTable
359+
path: Status.RouteTableID
354360
InternetGatewayID:
355361
print:
356362
path: Status.internetGatewayID

go.local.mod

Lines changed: 45 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,79 @@
11
module github.com/aws-controllers-k8s/ec2-controller
22

3-
go 1.17
3+
go 1.19
44

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

77
require (
88
github.com/aws-controllers-k8s/runtime v0.0.0
9-
github.com/aws/aws-sdk-go v1.42.0
10-
github.com/go-logr/logr v1.2.0
9+
github.com/aws/aws-sdk-go v1.44.93
10+
github.com/go-logr/logr v1.2.3
11+
github.com/samber/lo v1.37.0
1112
github.com/spf13/pflag v1.0.5
12-
k8s.io/api v0.23.0
13-
k8s.io/apimachinery v0.23.0
14-
k8s.io/client-go v0.23.0
15-
sigs.k8s.io/controller-runtime v0.11.0
13+
k8s.io/api v0.26.8
14+
k8s.io/apimachinery v0.26.8
15+
k8s.io/client-go v0.26.8
16+
sigs.k8s.io/controller-runtime v0.14.5
1617
)
1718

1819
require (
1920
github.com/beorn7/perks v1.0.1 // indirect
20-
github.com/cenkalti/backoff/v4 v4.1.2 // indirect
21-
github.com/cespare/xxhash/v2 v2.1.1 // indirect
21+
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
22+
github.com/cespare/xxhash/v2 v2.1.2 // indirect
2223
github.com/davecgh/go-spew v1.1.1 // indirect
23-
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
24-
github.com/fsnotify/fsnotify v1.5.1 // indirect
25-
github.com/go-logr/zapr v1.2.0 // indirect
24+
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
25+
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
26+
github.com/fsnotify/fsnotify v1.6.0 // indirect
27+
github.com/go-logr/zapr v1.2.3 // indirect
28+
github.com/go-openapi/jsonpointer v0.19.5 // indirect
29+
github.com/go-openapi/jsonreference v0.20.0 // indirect
30+
github.com/go-openapi/swag v0.19.14 // indirect
2631
github.com/gogo/protobuf v1.3.2 // indirect
2732
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
2833
github.com/golang/protobuf v1.5.2 // indirect
29-
github.com/google/go-cmp v0.5.5 // indirect
34+
github.com/google/gnostic v0.5.7-v3refs // indirect
35+
github.com/google/go-cmp v0.5.9 // indirect
3036
github.com/google/gofuzz v1.1.0 // indirect
31-
github.com/google/uuid v1.1.2 // indirect
32-
github.com/googleapis/gnostic v0.5.5 // indirect
37+
github.com/google/uuid v1.3.0 // indirect
3338
github.com/imdario/mergo v0.3.12 // indirect
3439
github.com/itchyny/gojq v0.12.6 // indirect
3540
github.com/itchyny/timefmt-go v0.1.3 // indirect
3641
github.com/jaypipes/envutil v1.0.0 // indirect
3742
github.com/jmespath/go-jmespath v0.4.0 // indirect
43+
github.com/josharian/intern v1.0.0 // indirect
3844
github.com/json-iterator/go v1.1.12 // indirect
39-
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
45+
github.com/mailru/easyjson v0.7.6 // indirect
46+
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
4047
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4148
github.com/modern-go/reflect2 v1.0.2 // indirect
49+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4250
github.com/pkg/errors v0.9.1 // indirect
43-
github.com/prometheus/client_golang v1.11.0 // indirect
44-
github.com/prometheus/client_model v0.2.0 // indirect
45-
github.com/prometheus/common v0.28.0 // indirect
46-
github.com/prometheus/procfs v0.6.0 // indirect
47-
github.com/stretchr/objx v0.2.0 // indirect
51+
github.com/prometheus/client_golang v1.14.0 // indirect
52+
github.com/prometheus/client_model v0.3.0 // indirect
53+
github.com/prometheus/common v0.37.0 // indirect
54+
github.com/prometheus/procfs v0.8.0 // indirect
4855
go.uber.org/atomic v1.7.0 // indirect
4956
go.uber.org/multierr v1.6.0 // indirect
50-
go.uber.org/zap v1.19.1 // indirect
51-
golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect
52-
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
53-
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 // indirect
54-
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
55-
golang.org/x/text v0.3.7 // indirect
56-
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
57+
go.uber.org/zap v1.24.0 // indirect
58+
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
59+
golang.org/x/net v0.8.0 // indirect
60+
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
61+
golang.org/x/sys v0.6.0 // indirect
62+
golang.org/x/term v0.6.0 // indirect
63+
golang.org/x/text v0.8.0 // indirect
64+
golang.org/x/time v0.3.0 // indirect
5765
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
5866
google.golang.org/appengine v1.6.7 // indirect
59-
google.golang.org/protobuf v1.27.1 // indirect
67+
google.golang.org/protobuf v1.28.1 // indirect
6068
gopkg.in/inf.v0 v0.9.1 // indirect
6169
gopkg.in/yaml.v2 v2.4.0 // indirect
62-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
63-
k8s.io/apiextensions-apiserver v0.23.0 // indirect
64-
k8s.io/component-base v0.23.0 // indirect
65-
k8s.io/klog/v2 v2.30.0 // indirect
66-
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
67-
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
68-
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
69-
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
70+
gopkg.in/yaml.v3 v3.0.1 // indirect
71+
k8s.io/apiextensions-apiserver v0.26.1 // indirect
72+
k8s.io/component-base v0.26.1 // indirect
73+
k8s.io/klog/v2 v2.80.1 // indirect
74+
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
75+
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect
76+
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
77+
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
7078
sigs.k8s.io/yaml v1.3.0 // indirect
7179
)

0 commit comments

Comments
 (0)