Skip to content

Commit 91ab2a4

Browse files
authored
Add VPCConfig.Subnet reference (#60)
Issue #, if available: Description of changes: Added reference for VPCConfig.SubnetId By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent ee068bf commit 91ab2a4

File tree

13 files changed

+173
-4
lines changed

13 files changed

+173
-4
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2022-10-12T20:02:48Z"
2+
build_date: "2022-10-14T20:13:10Z"
33
build_hash: 5ee0ac052c54f008dff50f6f5ebb73f2cf3a0bd7
44
go_version: go1.19
55
version: v0.19.3-11-g5ee0ac0-dirty
6-
api_directory_checksum: e20f002cfa1d08ee4f7ff59aa4011e6c538b5836
6+
api_directory_checksum: 33517b27f08163345ca25ea0d08179bd59580742
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.93
99
generator_config_info:
10-
file_checksum: 0b802e2a5f0169c37248fd40a259ab988a3714df
10+
file_checksum: 0f3c62b7a066343d08fa0a605bcc2011c39e788e
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ ignore:
88
resources:
99
Function:
1010
fields:
11+
VPCConfig.SubnetIDs:
12+
references:
13+
resource: VPC
14+
path: Status.VPCID
15+
service_name: ec2
1116
KMSKeyARN:
1217
references:
1318
resource: Key

apis/v1alpha1/types.go

Lines changed: 2 additions & 0 deletions
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: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/controller/main.go

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

config/crd/bases/lambda.services.k8s.aws_functions.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,24 @@ spec:
221221
items:
222222
type: string
223223
type: array
224+
subnetRefs:
225+
description: Reference field for SubnetIDs
226+
items:
227+
description: 'AWSResourceReferenceWrapper provides a wrapper
228+
around *AWSResourceReference type to provide more user friendly
229+
syntax for references using ''from'' field Ex: APIIDRef: from:
230+
name: my-api'
231+
properties:
232+
from:
233+
description: AWSResourceReference provides all the values
234+
necessary to reference another k8s resource for finding
235+
the identifier(Id/ARN/Name)
236+
properties:
237+
name:
238+
type: string
239+
type: object
240+
type: object
241+
type: array
224242
type: object
225243
required:
226244
- code

config/rbac/cluster-role-controller.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@ rules:
3131
- list
3232
- patch
3333
- watch
34+
- apiGroups:
35+
- ec2.services.k8s.aws
36+
resources:
37+
- vpcs
38+
verbs:
39+
- get
40+
- list
41+
- apiGroups:
42+
- ec2.services.k8s.aws
43+
resources:
44+
- vpcs/status
45+
verbs:
46+
- get
47+
- list
3448
- apiGroups:
3549
- kms.services.k8s.aws
3650
resources:

generator.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ ignore:
88
resources:
99
Function:
1010
fields:
11+
VPCConfig.SubnetIDs:
12+
references:
13+
resource: VPC
14+
path: Status.VPCID
15+
service_name: ec2
1116
KMSKeyARN:
1217
references:
1318
resource: Key

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module github.com/aws-controllers-k8s/lambda-controller
33
go 1.17
44

55
require (
6+
github.com/aws-controllers-k8s/ec2-controller v0.0.21
67
github.com/aws-controllers-k8s/kms-controller v0.1.2
78
github.com/aws-controllers-k8s/runtime v0.20.1
89
github.com/aws/aws-sdk-go v1.44.93

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC
6464
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
6565
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
6666
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
67+
github.com/aws-controllers-k8s/ec2-controller v0.0.21 h1:5O7/9aED2Tl9OT0TL2rWrc1Ix5V1UxYEgDKAhvFhPJQ=
68+
github.com/aws-controllers-k8s/ec2-controller v0.0.21/go.mod h1:OMsmJeJ3iQZ1sJgs3hqnjBRnJ3hmTzJUO38W5rxnB5M=
6769
github.com/aws-controllers-k8s/kms-controller v0.1.2 h1:9lb98jspqOpFpmIFHOJ6pRnOkC8kDEPIgTAb5QnVGZo=
6870
github.com/aws-controllers-k8s/kms-controller v0.1.2/go.mod h1:6CoV0UMFd03EUF9dXgOTTScGdBhJzsWn9W0dw2n0kA4=
6971
github.com/aws-controllers-k8s/runtime v0.20.1 h1:L/Huf1shRahx5BqJBCSS5u+vYg3f0Rotsq1jutORpdI=

0 commit comments

Comments
 (0)