Skip to content

Commit ee068bf

Browse files
authored
Add kmsKey reference field (#58)
Signed-off-by: Vandita2020 <[email protected]> Issue #, if available: Description of changes: Added kmsKeyRef field By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 88784c0 commit ee068bf

18 files changed

+195
-12
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2022-09-12T19:48:02Z"
3-
build_hash: 2944c8772f216656d84ee02d392eaca501274c1e
4-
go_version: go1.17.5
5-
version: v0.20.1
6-
api_directory_checksum: 944b0a250ed0cea5848ac5724812128f74177e8b
2+
build_date: "2022-10-12T20:02:48Z"
3+
build_hash: 5ee0ac052c54f008dff50f6f5ebb73f2cf3a0bd7
4+
go_version: go1.19
5+
version: v0.19.3-11-g5ee0ac0-dirty
6+
api_directory_checksum: e20f002cfa1d08ee4f7ff59aa4011e6c538b5836
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.93
99
generator_config_info:
10-
file_checksum: 5ad03a60a59749711f687c6ffb7b01a5bf7f28e2
10+
file_checksum: 0b802e2a5f0169c37248fd40a259ab988a3714df
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/function.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/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+
KMSKeyARN:
12+
references:
13+
resource: Key
14+
path: Status.ACKResourceMetadata.ARN
15+
service_name: kms
1116
Name:
1217
is_primary_key: true
1318
is_required: true

apis/v1alpha1/zz_generated.deepcopy.go

Lines changed: 5 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_eventsourcemappings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ spec:
5252
Streams - Default 100. Max 10,000. \n * Amazon Simple Queue Service
5353
- Default 10. For standard queues the max is 10,000. For FIFO queues
5454
the max is 10. \n * Amazon Managed Streaming for Apache Kafka -
55-
Default 100. Max 10,000. \n * Self-Managed Apache Kafka - Default
55+
Default 100. Max 10,000. \n * Self-managed Apache Kafka - Default
5656
100. Max 10,000. \n * Amazon MQ (ActiveMQ and RabbitMQ) - Default
5757
100. Max 10,000."
5858
format: int64

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,19 @@ spec:
131131
(KMS) key that's used to encrypt your function's environment variables.
132132
If it's not provided, Lambda uses a default service key.
133133
type: string
134+
kmsKeyRef:
135+
description: 'AWSResourceReferenceWrapper provides a wrapper around
136+
*AWSResourceReference type to provide more user friendly syntax
137+
for references using ''from'' field Ex: APIIDRef: from: name: my-api'
138+
properties:
139+
from:
140+
description: AWSResourceReference provides all the values necessary
141+
to reference another k8s resource for finding the identifier(Id/ARN/Name)
142+
properties:
143+
name:
144+
type: string
145+
type: object
146+
type: object
134147
layers:
135148
description: A list of function layers (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
136149
to add to the function's execution environment. Specify each layer

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+
- kms.services.k8s.aws
36+
resources:
37+
- keys
38+
verbs:
39+
- get
40+
- list
41+
- apiGroups:
42+
- kms.services.k8s.aws
43+
resources:
44+
- keys/status
45+
verbs:
46+
- get
47+
- list
3448
- apiGroups:
3549
- lambda.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+
KMSKeyARN:
12+
references:
13+
resource: Key
14+
path: Status.ACKResourceMetadata.ARN
15+
service_name: kms
1116
Name:
1217
is_primary_key: true
1318
is_required: true

go.mod

Lines changed: 1 addition & 1 deletion
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/kms-controller v0.1.2
67
github.com/aws-controllers-k8s/runtime v0.20.1
78
github.com/aws/aws-sdk-go v1.44.93
89
github.com/go-logr/logr v1.2.0
@@ -42,7 +43,6 @@ require (
4243
github.com/prometheus/client_model v0.2.0 // indirect
4344
github.com/prometheus/common v0.28.0 // indirect
4445
github.com/prometheus/procfs v0.6.0 // indirect
45-
github.com/stretchr/objx v0.2.0 // indirect
4646
go.uber.org/atomic v1.7.0 // indirect
4747
go.uber.org/multierr v1.6.0 // indirect
4848
go.uber.org/zap v1.19.1 // indirect

0 commit comments

Comments
 (0)