Skip to content

Add VPCConfig.Subnet reference #60

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 1 commit into from
Oct 15, 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
6 changes: 3 additions & 3 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-10-12T20:02:48Z"
build_date: "2022-10-14T20:13:10Z"
build_hash: 5ee0ac052c54f008dff50f6f5ebb73f2cf3a0bd7
go_version: go1.19
version: v0.19.3-11-g5ee0ac0-dirty
api_directory_checksum: e20f002cfa1d08ee4f7ff59aa4011e6c538b5836
api_directory_checksum: 33517b27f08163345ca25ea0d08179bd59580742
api_version: v1alpha1
aws_sdk_go_version: v1.44.93
generator_config_info:
file_checksum: 0b802e2a5f0169c37248fd40a259ab988a3714df
file_checksum: 0f3c62b7a066343d08fa0a605bcc2011c39e788e
original_file_name: generator.yaml
last_modification:
reason: API generation
5 changes: 5 additions & 0 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ ignore:
resources:
Function:
fields:
VPCConfig.SubnetIDs:
references:
resource: VPC
path: Status.VPCID
service_name: ec2
KMSKeyARN:
references:
resource: Key
Expand Down
2 changes: 2 additions & 0 deletions apis/v1alpha1/types.go

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

11 changes: 11 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.

2 changes: 2 additions & 0 deletions cmd/controller/main.go

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

18 changes: 18 additions & 0 deletions config/crd/bases/lambda.services.k8s.aws_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,24 @@ spec:
items:
type: string
type: array
subnetRefs:
description: Reference field for SubnetIDs
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
type: object
required:
- code
Expand Down
14 changes: 14 additions & 0 deletions config/rbac/cluster-role-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ rules:
- list
- patch
- watch
- apiGroups:
- ec2.services.k8s.aws
resources:
- vpcs
verbs:
- get
- list
- apiGroups:
- ec2.services.k8s.aws
resources:
- vpcs/status
verbs:
- get
- list
- apiGroups:
- kms.services.k8s.aws
resources:
Expand Down
5 changes: 5 additions & 0 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ ignore:
resources:
Function:
fields:
VPCConfig.SubnetIDs:
references:
resource: VPC
path: Status.VPCID
service_name: ec2
KMSKeyARN:
references:
resource: Key
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/aws-controllers-k8s/lambda-controller
go 1.17

require (
github.com/aws-controllers-k8s/ec2-controller v0.0.21
github.com/aws-controllers-k8s/kms-controller v0.1.2
github.com/aws-controllers-k8s/runtime v0.20.1
github.com/aws/aws-sdk-go v1.44.93
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/aws-controllers-k8s/ec2-controller v0.0.21 h1:5O7/9aED2Tl9OT0TL2rWrc1Ix5V1UxYEgDKAhvFhPJQ=
github.com/aws-controllers-k8s/ec2-controller v0.0.21/go.mod h1:OMsmJeJ3iQZ1sJgs3hqnjBRnJ3hmTzJUO38W5rxnB5M=
github.com/aws-controllers-k8s/kms-controller v0.1.2 h1:9lb98jspqOpFpmIFHOJ6pRnOkC8kDEPIgTAb5QnVGZo=
github.com/aws-controllers-k8s/kms-controller v0.1.2/go.mod h1:6CoV0UMFd03EUF9dXgOTTScGdBhJzsWn9W0dw2n0kA4=
github.com/aws-controllers-k8s/runtime v0.20.1 h1:L/Huf1shRahx5BqJBCSS5u+vYg3f0Rotsq1jutORpdI=
Expand Down
18 changes: 18 additions & 0 deletions helm/crds/lambda.services.k8s.aws_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,24 @@ spec:
items:
type: string
type: array
subnetRefs:
description: Reference field for SubnetIDs
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
type: object
required:
- code
Expand Down
14 changes: 14 additions & 0 deletions helm/templates/cluster-role-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ rules:
- list
- patch
- watch
- apiGroups:
- ec2.services.k8s.aws
resources:
- vpcs
verbs:
- get
- list
- apiGroups:
- ec2.services.k8s.aws
resources:
- vpcs/status
verbs:
- get
- list
- apiGroups:
- kms.services.k8s.aws
resources:
Expand Down
79 changes: 78 additions & 1 deletion pkg/resource/function/references.go

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