Skip to content

Adding EventInvokeConfig support for Alias #93

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
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: "2023-06-27T22:12:27Z"
build_date: "2023-06-28T18:32:11Z"
build_hash: e9b68590da73ce9143ba1e4361cebdc1d876c81e
go_version: go1.19
version: v0.26.1-7-ge9b6859
api_directory_checksum: 5326aa7650a3899230ee809563bea350169fdca4
api_directory_checksum: 5f162746e8495943dae5e96f48f4a3ab887b5be5
api_version: v1alpha1
aws_sdk_go_version: v1.44.181
generator_config_info:
file_checksum: a9fdc0888330c561da4bf5f21d0f5afe48217935
file_checksum: ed4abfc994c2c47465801d301604c584bd743d41
original_file_name: generator.yaml
last_modification:
reason: API generation
17 changes: 17 additions & 0 deletions apis/v1alpha1/alias.go

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

18 changes: 17 additions & 1 deletion apis/v1alpha1/function.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/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ resources:
path: Spec.Name
FunctionVersion:
is_required: true
FunctionEventInvokeConfig:
from:
operation: PutFunctionEventInvokeConfig
path: .
hooks:
sdk_update_pre_build_request:
template_path: hooks/alias/sdk_update_pre_build_request.go.tpl
sdk_read_one_post_set_output:
template_path: hooks/alias/sdk_read_one_post_set_output.go.tpl
sdk_create_post_set_output:
template_path: hooks/alias/sdk_create_post_set_output.go.tpl
tags:
ignore: true
CodeSigningConfig:
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.

41 changes: 41 additions & 0 deletions config/crd/bases/lambda.services.k8s.aws_aliases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,47 @@ spec:
description:
description: A description of the alias.
type: string
functionEventInvokeConfig:
description: "Configures options for asynchronous invocation on an
alias. \n - DestinationConfig A destination for events after they
have been sent to a function for processing. \n Types of Destinations:
Function - The Amazon Resource Name (ARN) of a Lambda function.
Queue - The ARN of a standard SQS queue. Topic - The ARN of a standard
SNS topic. Event Bus - The ARN of an Amazon EventBridge event bus.
\n - MaximumEventAgeInSeconds The maximum age of a request that
Lambda sends to a function for processing. \n - MaximumRetryAttempts
The maximum number of times to retry when the function returns an
error."
properties:
destinationConfig:
description: A configuration object that specifies the destination
of an event after Lambda processes it.
properties:
onFailure:
description: A destination for events that failed processing.
properties:
destination:
type: string
type: object
onSuccess:
description: A destination for events that were processed
successfully.
properties:
destination:
type: string
type: object
type: object
functionName:
type: string
maximumEventAgeInSeconds:
format: int64
type: integer
maximumRetryAttempts:
format: int64
type: integer
qualifier:
type: string
type: object
functionName:
description: "The name of the Lambda function. \n Name formats \n
* Function name - MyFunction. \n * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
Expand Down
10 changes: 10 additions & 0 deletions config/crd/bases/lambda.services.k8s.aws_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ spec:
type: object
type: array
functionEventInvokeConfig:
description: "Configures options for asynchronous invocation on a
function. \n - DestinationConfig A destination for events after
they have been sent to a function for processing. \n Types of Destinations:
Function - The Amazon Resource Name (ARN) of a Lambda function.
Queue - The ARN of a standard SQS queue. Topic - The ARN of a standard
SNS topic. Event Bus - The ARN of an Amazon EventBridge event bus.
\n - MaximumEventAgeInSeconds The maximum age of a request that
Lambda sends to a function for processing. \n - MaximumRetryAttempts
The maximum number of times to retry when the function returns an
error."
properties:
destinationConfig:
description: A configuration object that specifies the destination
Expand Down
41 changes: 41 additions & 0 deletions documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
resources:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is excellent attention to detail!

Function:
fields:
FunctionEventInvokeConfig:
prepend: |
Configures options for asynchronous invocation on a function.

- DestinationConfig
A destination for events after they have been sent to a function for processing.

Types of Destinations:
Function - The Amazon Resource Name (ARN) of a Lambda function.
Queue - The ARN of a standard SQS queue.
Topic - The ARN of a standard SNS topic.
Event Bus - The ARN of an Amazon EventBridge event bus.

- MaximumEventAgeInSeconds
The maximum age of a request that Lambda sends to a function for processing.

- MaximumRetryAttempts
The maximum number of times to retry when the function returns an error.
Alias:
fields:
FunctionEventInvokeConfig:
prepend: |
Configures options for asynchronous invocation on an alias.

- DestinationConfig
A destination for events after they have been sent to a function for processing.

Types of Destinations:
Function - The Amazon Resource Name (ARN) of a Lambda function.
Queue - The ARN of a standard SQS queue.
Topic - The ARN of a standard SNS topic.
Event Bus - The ARN of an Amazon EventBridge event bus.

- MaximumEventAgeInSeconds
The maximum age of a request that Lambda sends to a function for processing.

- MaximumRetryAttempts
The maximum number of times to retry when the function returns an error.
11 changes: 11 additions & 0 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ resources:
path: Spec.Name
FunctionVersion:
is_required: true
FunctionEventInvokeConfig:
from:
operation: PutFunctionEventInvokeConfig
path: .
hooks:
sdk_update_pre_build_request:
template_path: hooks/alias/sdk_update_pre_build_request.go.tpl
sdk_read_one_post_set_output:
template_path: hooks/alias/sdk_read_one_post_set_output.go.tpl
sdk_create_post_set_output:
template_path: hooks/alias/sdk_create_post_set_output.go.tpl
tags:
ignore: true
CodeSigningConfig:
Expand Down
41 changes: 41 additions & 0 deletions helm/crds/lambda.services.k8s.aws_aliases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,47 @@ spec:
description:
description: A description of the alias.
type: string
functionEventInvokeConfig:
description: "Configures options for asynchronous invocation on an
alias. \n - DestinationConfig A destination for events after they
have been sent to a function for processing. \n Types of Destinations:
Function - The Amazon Resource Name (ARN) of a Lambda function.
Queue - The ARN of a standard SQS queue. Topic - The ARN of a standard
SNS topic. Event Bus - The ARN of an Amazon EventBridge event bus.
\n - MaximumEventAgeInSeconds The maximum age of a request that
Lambda sends to a function for processing. \n - MaximumRetryAttempts
The maximum number of times to retry when the function returns an
error."
properties:
destinationConfig:
description: A configuration object that specifies the destination
of an event after Lambda processes it.
properties:
onFailure:
description: A destination for events that failed processing.
properties:
destination:
type: string
type: object
onSuccess:
description: A destination for events that were processed
successfully.
properties:
destination:
type: string
type: object
type: object
functionName:
type: string
maximumEventAgeInSeconds:
format: int64
type: integer
maximumRetryAttempts:
format: int64
type: integer
qualifier:
type: string
type: object
functionName:
description: "The name of the Lambda function. \n Name formats \n
- Function name - MyFunction. \n - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
Expand Down
10 changes: 10 additions & 0 deletions helm/crds/lambda.services.k8s.aws_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ spec:
type: object
type: array
functionEventInvokeConfig:
description: "Configures options for asynchronous invocation on a
function. \n - DestinationConfig A destination for events after
they have been sent to a function for processing. \n Types of Destinations:
Function - The Amazon Resource Name (ARN) of a Lambda function.
Queue - The ARN of a standard SQS queue. Topic - The ARN of a standard
SNS topic. Event Bus - The ARN of an Amazon EventBridge event bus.
\n - MaximumEventAgeInSeconds The maximum age of a request that
Lambda sends to a function for processing. \n - MaximumRetryAttempts
The maximum number of times to retry when the function returns an
error."
properties:
destinationConfig:
description: A configuration object that specifies the destination
Expand Down
Loading