Skip to content
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

feat(provider/aws): Lambda function target support for AWS ALB #7630

Merged
merged 38 commits into from
Nov 13, 2019

Conversation

sidmuls
Copy link
Contributor

@sidmuls sidmuls commented Nov 12, 2019

This change enables creating Target group with lambda function as target type.
This change also includes fixes for consistency in tags and targetGroups fields. in Function definition classes.

sidmuls and others added 30 commits October 16, 2019 02:03
This change adds a new tab for functions and facilitates listing existing functions and searching functions listed.
Corresponding provider specific changes are included in this change for AWS.

Authors: @sidmuls and @nabebe
This change adds a new tab for functions and facilitates listing existing functions and searching functions listed.
Corresponding provider specific changes are included in this change for AWS.

Authors: @sidmuls and @nabebe
…tion component.

This is a refactoring change as requested by reviewer @caseyhebebrand

Author: @sidmuls
This change is for refactoring requested by reviewer @caseyhebebrand.

Author: @sidmuls
fix(provider/aws): fixing import statement
fix(provider/aws): fixing property type for Entity Tags
… not found in AmazonFunctionDetails.tsx.

Author: @sidmuls
Merge remote-tracking branch 'upstream/master'
…ug fix for filtering and displaying subnet Ids in Network section of functions modal.

Author: @sidmuls
@spinnakerbot
Copy link
Contributor

The following commits need their title changed:

  • c7d0768: .

  • d1b43d2: refactor(provider/aws): removing extra line. Tthis is actually for retrying tests on TravisCI

  • 7fbb282: Merge pull request single UI view for insight #1 from sidmuls/function-crud

  • 718b2d7: Merge remote-tracking branch 'upstream/master'

  • a47a3ba: Merge pull request #2 from sidmuls/function-crud

  • 28ce7c8: Merge remote-tracking branch 'upstream/master'

Please format your commit title into the form:

<type>(<scope>): <subject>, e.g. fix(kubernetes): address NPE in status check

This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here.

Copy link
Contributor

@christopherthielen christopherthielen left a comment

Choose a reason for hiding this comment

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

@caseyhebebrand note that this PR is modifying the TargetGroups component and your PR will have conflicts. I think we should merge this Lambda PR first, then redo the changes from this PR into the newer TargetGroups.tsx component.

@@ -29,6 +29,7 @@ export interface IAmazonFunction extends IFunction {
subnetIds: [];
vpcId: string;
};
targetGroups: string | string[];
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this typed asstring | string[]? Why not just type these as string[]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently we support adding only one target group instead of a list of target groups. Clouddriver expects it to be a string in Create/Update operation.
However, while fetching a function's details, AWS Lambda returns a list of string for the targetGroups field.
Hence the type string | string[]

@@ -368,6 +368,7 @@ export class AwsLoadBalancerTransformer {
stickinessEnabled: targetGroup.attributes['stickiness.enabled'] === 'true',
stickinessType: targetGroup.attributes['stickiness.type'],
stickinessDuration: Number(targetGroup.attributes['stickiness.lb_cookie.duration_seconds']),
multiValueHeadersEnabled: targetGroup.attributes['multiValueHeaders.enabled'] === 'true',
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be 'multiValueHeadersEnabled'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

apologies!
it should be lambda.multiValueHeaders.enabled
that is the name of the flag used by AWS Lambda
I have fixed it and pushed the change
thank you so much for pointing it out
that was a great catch!

@christopherthielen christopherthielen added the ready to merge Reviewed and ready for merge label Nov 13, 2019
@mergify mergify bot added the auto merged Merged automatically by a bot label Nov 13, 2019
@mergify mergify bot merged commit 5c645d9 into spinnaker:master Nov 13, 2019
@caseyhebebrand
Copy link
Contributor

@chris

@caseyhebebrand note that this PR is modifying the TargetGroups component and your PR will have conflicts. I think we should merge this Lambda PR first, then redo the changes from this PR into the newer TargetGroups.tsx component.

Sounds good! I probably won't have a chance to get mine merged for the next couple days, so this works out.

sergiopena pushed a commit to sergiopena/deck that referenced this pull request Jan 10, 2020
…aker#7630)

* .

* feat(provider/aws): Function listing and searching functionality

This change adds a new tab for functions and facilitates listing existing functions and searching functions listed.
Corresponding provider specific changes are included in this change for AWS.

Authors: @sidmuls and @nabebe

* feat(provider/aws): Function listing and searching functionality

This change adds a new tab for functions and facilitates listing existing functions and searching functions listed.
Corresponding provider specific changes are included in this change for AWS.

Authors: @sidmuls and @nabebe

* refactor(provider/aws): Converting Function class component into function component.

This is a refactoring change as requested by reviewer @caseyhebebrand

Author: @sidmuls

* refactor(provider/aws): Refactoring groupings into a separate component.

This change is for refactoring requested by reviewer @caseyhebebrand.

Author: @sidmuls

* refactor(provider/aws): Removing unnecessary state from FunctionGroupings.

This change is a refactoring requested by @caseyhebebrand

Author: @sidmuls

*  refactor(provider/aws): removing extra line. Tthis is actually for retrying tests on TravisCI

* refactor(provider/aws): Adding tests for FunctionFilterService and changes as requested by @christopherthielen

Author: @sidmuls

* refactor(provider/aws): removing unnecessary field from IFunction

* refactor(provider/aws): adding flag to turn off functions feature

* feat(provider/aws): Function CREATE EDIT and DELETE feature.

Author: @sidmuls and @nabebe

* fix(provider/aws): fixing import statement

Author: @sidmuls

* fix(provider/aws): resolving merge conflicts

* fix(provider/aws): fixing property type for Entity Tags

Author: @sidmuls

* fix(provider/aws): removing unnecessary component from AwsFunctionDetails

Author: @sidmuls

* refactor(provider/aws): fixing review comments by @caseyhebebrand

Author: @sidmuls

* refactor(provider/aws): changes for following best practices as requested by @christophertheilen

Author: @sidmuls

* refactor(provider/aws): Adding  message to display in case function is not found in AmazonFunctionDetails.tsx.

Author: @sidmuls

* refactor(provider/aws): Replacing MapEditor with MapEditorInput in FunctionEnvironmentVariables.tsx

Author: @sidmuls

* refactor(provider/aws): fixes for comments requested by @christheilen

Author: @sidmuls

* refactor(provider/aws): changes as requested by @ChrisThielen and a bug fix for filtering and displaying subnet Ids in Network section of functions modal.

Author: @sidmuls

* feat(provider/aws): ALB Lambda target support

Author: @sidmuls

* fix(provider/aws): fixing error with tags and targetGroups

Author: @sidmuls

* fix(provider/aws): fixing error with target group field in function request and response objects

Author: @sidmuls

* refactor(provider/aws): changes as requested by @ChrisThielen

Author: @sidmuls

* fix(provider/aws): fixing multiValueHeadersEnabled flag usage in lambda support for AWS Application load balancer

Author: @sidmuls
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
…aker#7630)

* .

* feat(provider/aws): Function listing and searching functionality

This change adds a new tab for functions and facilitates listing existing functions and searching functions listed.
Corresponding provider specific changes are included in this change for AWS.

Authors: @sidmuls and @nabebe

* feat(provider/aws): Function listing and searching functionality

This change adds a new tab for functions and facilitates listing existing functions and searching functions listed.
Corresponding provider specific changes are included in this change for AWS.

Authors: @sidmuls and @nabebe

* refactor(provider/aws): Converting Function class component into function component.

This is a refactoring change as requested by reviewer @caseyhebebrand

Author: @sidmuls

* refactor(provider/aws): Refactoring groupings into a separate component.

This change is for refactoring requested by reviewer @caseyhebebrand.

Author: @sidmuls

* refactor(provider/aws): Removing unnecessary state from FunctionGroupings.

This change is a refactoring requested by @caseyhebebrand

Author: @sidmuls

*  refactor(provider/aws): removing extra line. Tthis is actually for retrying tests on TravisCI

* refactor(provider/aws): Adding tests for FunctionFilterService and changes as requested by @christopherthielen

Author: @sidmuls

* refactor(provider/aws): removing unnecessary field from IFunction

* refactor(provider/aws): adding flag to turn off functions feature

* feat(provider/aws): Function CREATE EDIT and DELETE feature.

Author: @sidmuls and @nabebe

* fix(provider/aws): fixing import statement

Author: @sidmuls

* fix(provider/aws): resolving merge conflicts

* fix(provider/aws): fixing property type for Entity Tags

Author: @sidmuls

* fix(provider/aws): removing unnecessary component from AwsFunctionDetails

Author: @sidmuls

* refactor(provider/aws): fixing review comments by @caseyhebebrand

Author: @sidmuls

* refactor(provider/aws): changes for following best practices as requested by @christophertheilen

Author: @sidmuls

* refactor(provider/aws): Adding  message to display in case function is not found in AmazonFunctionDetails.tsx.

Author: @sidmuls

* refactor(provider/aws): Replacing MapEditor with MapEditorInput in FunctionEnvironmentVariables.tsx

Author: @sidmuls

* refactor(provider/aws): fixes for comments requested by @christheilen

Author: @sidmuls

* refactor(provider/aws): changes as requested by @ChrisThielen and a bug fix for filtering and displaying subnet Ids in Network section of functions modal.

Author: @sidmuls

* feat(provider/aws): ALB Lambda target support

Author: @sidmuls

* fix(provider/aws): fixing error with tags and targetGroups

Author: @sidmuls

* fix(provider/aws): fixing error with target group field in function request and response objects

Author: @sidmuls

* refactor(provider/aws): changes as requested by @ChrisThielen

Author: @sidmuls

* fix(provider/aws): fixing multiValueHeadersEnabled flag usage in lambda support for AWS Application load balancer

Author: @sidmuls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merged Merged automatically by a bot ready to merge Reviewed and ready for merge target-release/1.18
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants