-
Notifications
You must be signed in to change notification settings - Fork 27
feat: add TenancyConfig to ACK Lambda Controller #201
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi @acaremrullah. Thanks for your PR. I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/assign @michaelhtm |
knottnt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@acaremrullah Thanks for the PR! Left a few comments.
| @@ -0,0 +1,17 @@ | |||
| apiVersion: lambda.services.k8s.aws/v1alpha1 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally there would be an e2e test associated with the resources in this folder. Could you either add a test to validate setting the tenancy config or remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added an e2e test. Happy to remove them at all as well if it's not required
| A list of tags (https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) | ||
| to apply to the function. | ||
| type: object | ||
| tenancyConfig: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When adding a new field a CRD I'd expect to see some changes the files associated with our code-generator to fetch a new version of the AWS API model that includes the new field and/or remove it from a a list of ignored fields in generator.yaml. Since, this is a newer AWS feature you'll likely need to update the version of the AWS SDK used to generate the lambda-controller here to use a newer version of AWS Lambda's API model. If that results in additional fields being added that you don't want to take on in this PR you can add them to the ignored fields (see docs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @knottnt thanks for the reviews. I just find chance to back this PR.
I see generator is adding new fields as expected. I tried to avoid adding new fields like CapacityProvider or DurableConfig with following documentation ignore fields but it didn't work during to run code-generator.
Somehow it still add them into CRDs. I don't have any doubt to not have them but also couldn't find a way to avoid them to be created.
You can check my last 2 comment for changes I apply, and results of the output after run makefile with code generator.
I would be appreciated if you can help me to remove those extra fields that's out of my purpose to open PR for tenancyConfig. Thanks in advance
…te version of sdk to support tenancyconfig
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: acaremrullah The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Issue #, if available: N/A
Description of changes:
Summary
Adds support for AWS Lambda's Tenant Isolation Mode feature to enable per-tenant isolation for multi-tenant applications.
Changes
SDK Update
github.com/aws/aws-sdk-go-v2/service/lambdafromv1.75.0tov1.87.1to include TenancyConfig API supportAPI Types
TenancyConfigtype withTenantIsolationModefield toapis/v1alpha1/types.goTenancyConfigfield toFunctionSpecinapis/v1alpha1/function.goController Implementation
pkg/resource/function/sdk.goto handle TenancyConfig in:newCreateRequestPayload- sets TenancyConfig on CreateFunction API callsdkFind- reads TenancyConfig from GetFunction responsesdkCreate- reads TenancyConfig from CreateFunction responseCRD Updates
config/crd/bases/lambda.services.k8s.aws_functions.yamlandhelm/crds/lambda.services.k8s.aws_functions.yamlTesting
test/e2e/resources/function_tenancy.yamldemonstrating tenant isolation configurationUsage Example
AWS Documentation
Notes
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.