Skip to content
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-09-12T19:48:02Z"
build_hash: 2944c8772f216656d84ee02d392eaca501274c1e
go_version: go1.17.5
version: v0.20.1
api_directory_checksum: 944b0a250ed0cea5848ac5724812128f74177e8b
build_date: "2022-10-12T20:02:48Z"
build_hash: 5ee0ac052c54f008dff50f6f5ebb73f2cf3a0bd7
go_version: go1.19
version: v0.19.3-11-g5ee0ac0-dirty
api_directory_checksum: e20f002cfa1d08ee4f7ff59aa4011e6c538b5836
api_version: v1alpha1
aws_sdk_go_version: v1.44.93
generator_config_info:
file_checksum: 5ad03a60a59749711f687c6ffb7b01a5bf7f28e2
file_checksum: 0b802e2a5f0169c37248fd40a259ab988a3714df
original_file_name: generator.yaml
last_modification:
reason: API generation
3 changes: 2 additions & 1 deletion apis/v1alpha1/function.go

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

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:
KMSKeyARN:
references:
resource: Key
path: Status.ACKResourceMetadata.ARN
service_name: kms
Name:
is_primary_key: true
is_required: true
Expand Down
5 changes: 5 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.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
Streams - Default 100. Max 10,000. \n * Amazon Simple Queue Service
- Default 10. For standard queues the max is 10,000. For FIFO queues
the max is 10. \n * Amazon Managed Streaming for Apache Kafka -
Default 100. Max 10,000. \n * Self-Managed Apache Kafka - Default
Default 100. Max 10,000. \n * Self-managed Apache Kafka - Default
100. Max 10,000. \n * Amazon MQ (ActiveMQ and RabbitMQ) - Default
100. Max 10,000."
format: int64
Expand Down
13 changes: 13 additions & 0 deletions config/crd/bases/lambda.services.k8s.aws_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,19 @@ spec:
(KMS) key that's used to encrypt your function's environment variables.
If it's not provided, Lambda uses a default service key.
type: string
kmsKeyRef:
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
layers:
description: A list of function layers (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
to add to the function's execution environment. Specify each layer
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:
- kms.services.k8s.aws
resources:
- keys
verbs:
- get
- list
- apiGroups:
- kms.services.k8s.aws
resources:
- keys/status
verbs:
- get
- list
- apiGroups:
- lambda.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:
KMSKeyARN:
references:
resource: Key
path: Status.ACKResourceMetadata.ARN
service_name: kms
Name:
is_primary_key: true
is_required: true
Expand Down
2 changes: 1 addition & 1 deletion 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/kms-controller v0.1.2
github.com/aws-controllers-k8s/runtime v0.20.1
github.com/aws/aws-sdk-go v1.44.93
github.com/go-logr/logr v1.2.0
Expand Down Expand Up @@ -42,7 +43,6 @@ require (
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
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/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=
github.com/aws-controllers-k8s/runtime v0.20.1/go.mod h1:k7z4qlf6aK1Kzd4ff49wzcyhDKHjWaUpqxrwgl4uS1o=
github.com/aws/aws-sdk-go v1.44.93 h1:hAgd9fuaptBatSft27/5eBMdcA8+cIMqo96/tZ6rKl8=
Expand Down
2 changes: 1 addition & 1 deletion helm/crds/lambda.services.k8s.aws_eventsourcemappings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
Streams - Default 100. Max 10,000. \n * Amazon Simple Queue Service
- Default 10. For standard queues the max is 10,000. For FIFO queues
the max is 10. \n * Amazon Managed Streaming for Apache Kafka -
Default 100. Max 10,000. \n * Self-Managed Apache Kafka - Default
Default 100. Max 10,000. \n * Self-managed Apache Kafka - Default
100. Max 10,000. \n * Amazon MQ (ActiveMQ and RabbitMQ) - Default
100. Max 10,000."
format: int64
Expand Down
13 changes: 13 additions & 0 deletions helm/crds/lambda.services.k8s.aws_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,19 @@ spec:
(KMS) key that's used to encrypt your function's environment variables.
If it's not provided, Lambda uses a default service key.
type: string
kmsKeyRef:
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
layers:
description: A list of function layers (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
to add to the function's execution environment. Specify each layer
Expand Down
22 changes: 22 additions & 0 deletions helm/templates/cluster-role-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@ kind: ClusterRole
metadata:
creationTimestamp: null
name: ack-lambda-controller
labels:
{{- range $key, $value := .Values.role.labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{ else }}
kind: Role
metadata:
creationTimestamp: null
name: ack-lambda-controller
labels:
{{- range $key, $value := .Values.role.labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
namespace: {{ .Release.Namespace }}
{{ end }}
rules:
Expand Down Expand Up @@ -38,6 +46,20 @@ rules:
- list
- patch
- watch
- apiGroups:
- kms.services.k8s.aws
resources:
- keys
verbs:
- get
- list
- apiGroups:
- kms.services.k8s.aws
resources:
- keys/status
verbs:
- get
- list
- apiGroups:
- lambda.services.k8s.aws
resources:
Expand Down
8 changes: 8 additions & 0 deletions helm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@
],
"type": "object"
},
"role": {
"description": "Role settings",
"properties": {
"labels": {
"type": "object"
}
}
},
"metrics": {
"description": "Metrics settings",
"properties": {
Expand Down
4 changes: 4 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ deployment:
# Which priorityClassName to set?
# See: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority
priorityClassName: ""

# If "installScope: cluster" then these labels will be applied to ClusterRole
role:
labels: {}

metrics:
service:
Expand Down
3 changes: 3 additions & 0 deletions pkg/resource/function/delta.go

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

90 changes: 88 additions & 2 deletions pkg/resource/function/references.go

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