-
Notifications
You must be signed in to change notification settings - Fork 153
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
Support vpc configuration to lambda #4551
Support vpc configuration to lambda #4551
Conversation
Signed-off-by: sivchari <shibuuuu5@gmail.com>
…ate a vpc config Signed-off-by: sivchari <shibuuuu5@gmail.com>
Signed-off-by: sivchari <shibuuuu5@gmail.com>
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #4551 +/- ##
==========================================
- Coverage 29.99% 29.93% -0.06%
==========================================
Files 220 220
Lines 25834 25851 +17
==========================================
- Hits 7749 7739 -10
- Misses 17438 17465 +27
Partials 647 647
☔ View full report in Codecov by Sentry. |
@sivchari How about adding that vpc configuration here instead of the application configuration? Since it quite specific for Lambda (or AWS service only) |
@khanhtc1202 Thanks, oh, I've already added it, doesn't it ? |
@@ -121,6 +121,7 @@ spec: | |||
| timeout | duration | The maximum length of time to execute deployment before giving up. Default is 6h. | No | | |||
| notification | [DeploymentNotification](#deploymentnotification) | Additional configuration used while sending notification to external services. | No | | |||
| postSync | [PostSync](#postsync) | Additional configuration used as extra actions once the deployment is triggered. | No | | |||
| vpcConfig | [VPCConfig](#vpcconfig) | Additional configuration used to link to specific vpc. | No | |
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.
@sivchari I mean instead of adding it here, only make the vpc configuration available via Function manifest file. I think we should keep this configuration file contains generic configurations only.
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.
@khanhtc1202
Oops, sorry. I fixed it. Like this ?
Signed-off-by: sivchari <shibuuuu5@gmail.com>
Signed-off-by: sivchari <shibuuuu5@gmail.com>
@@ -9,7 +9,7 @@ description: > | |||
## Kubernetes Application | |||
|
|||
``` yaml | |||
apiVersion: pipecd.dev/v1beta1 | |||
apiVersion: pipecd.devI mean instead of adding it here, only make the vpc configuration available via Function manifest file. I think we should keep this configuration file contains generic configurations only./v1beta1 |
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.
what was 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.
🐱 stepped on the keyboard ?? 😄
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.
🐈
"vpcConfig": { | ||
securityGroupIds: ["sg-1234567890", "sg-0987654321"], | ||
subnetIds: ["subnet-1234567890", "subnet-0987654321"] | ||
} |
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.
indent
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.
fix
ae05b63
to
2e2eb4e
Compare
Signed-off-by: sivchari <shibuuuu5@gmail.com>
2e2eb4e
to
710800c
Compare
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.
Almost LGTM. Left a simple nits.
if fm.Spec.VPCConfig != nil { | ||
input.VpcConfig = &types.VpcConfig{ | ||
SecurityGroupIds: fm.Spec.VPCConfig.SecurityGroupIDs, | ||
SubnetIds: fm.Spec.VPCConfig.SubnetIDs, | ||
} | ||
} |
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.
Could you move this block to L128 or after L152, I want to keep "packing using container image" and "Zip on S3" block near by since they mean to same thing (code of the function).
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.
You are right. I fix.
Signed-off-by: sivchari <shibuuuu5@gmail.com>
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.
Great, thank you 🙌
@sivchari one testcase is failed, could you check? |
@khanhtc1202 |
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.
LGreatTM 👍
Signed-off-by: sZma5a <masaaki.haribote@gmail.com>
Signed-off-by: moko-poi <mokopoi44@gmail.com>
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #4550
Does this PR introduce a user-facing change?:
Users can configure a vpc configuration for lambda function.
No