Skip to content

Commit

Permalink
feat: fc3 as defult fc runtime
Browse files Browse the repository at this point in the history
Signed-off-by: seven <zilisheng1996@gmail.com>
  • Loading branch information
Blankll committed Oct 22, 2024
1 parent c453097 commit be209c4
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 103 deletions.
117 changes: 55 additions & 62 deletions package-lock.json

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

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@geek-fun/serverlessinsight",
"version": "0.0.4",
"version": "0.0.5",
"description": "Full life cycle cross providers serverless application management for your fast-growing business.",
"homepage": "https://serverlessinsight.geekfun.club",
"main": "dist/src/index.js",
Expand Down Expand Up @@ -50,10 +50,10 @@
],
"dependencies": {
"@alicloud/openapi-client": "^0.4.12",
"@alicloud/ros-cdk-apigateway": "^1.3.0",
"@alicloud/ros-cdk-core": "^1.3.0",
"@alicloud/ros-cdk-fc3": "^1.3.0",
"@alicloud/ros-cdk-ram": "^1.3.0",
"@alicloud/ros-cdk-apigateway": "^1.4.0",
"@alicloud/ros-cdk-core": "^1.4.0",
"@alicloud/ros-cdk-fc3": "^1.4.0",
"@alicloud/ros-cdk-ram": "^1.4.0",
"@alicloud/ros20190910": "^3.5.0",
"ajv": "^8.17.1",
"chalk": "^5.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/stack/iacStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class IacStack extends ros.Stack {
fcRegionId: context.region,
functionName: trigger.backend,
roleArn: gatewayAccessRole.attrArn,
// fcVersion: '3.0',
fcVersion: '3.0',
},
},
resultSample: 'ServerlessInsight resultSample',
Expand Down
22 changes: 3 additions & 19 deletions tests/fixtures/deployFixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const oneFcOneGatewayRos = {
FunctionComputeConfig: {
FunctionName: 'demo_fn_gateway',
RoleArn: { 'Fn::GetAtt': ['my-demo-service_role', 'Arn'] },
ServiceName: 'my-demo-service-service',
FcVersion: '3.0',
},
ServiceProtocol: 'FunctionCompute',
},
Expand All @@ -95,17 +95,9 @@ export const oneFcOneGatewayRos = {
Handler: 'index.handler',
MemorySize: 128,
Runtime: 'nodejs18',
ServiceName: 'my-demo-service-service',
Timeout: 10,
},
Type: 'ALIYUN::FC::Function',
},
'my-demo-service-service': {
Properties: {
ServiceName: 'my-demo-service-service',
Tags: [{ Key: 'owner', Value: 'geek-fun' }],
},
Type: 'ALIYUN::FC::Service',
Type: 'ALIYUN::FC3::Function',
},
'my-demo-service_apigroup': {
Properties: {
Expand Down Expand Up @@ -199,17 +191,9 @@ export const oneFcRos = {
Handler: 'index.handler',
MemorySize: 128,
Runtime: 'nodejs18',
ServiceName: 'my-demo-service-service',
Timeout: 10,
},
Type: 'ALIYUN::FC::Function',
},
'my-demo-service-service': {
Properties: {
ServiceName: 'my-demo-service-service',
Tags: [{ Key: 'owner', Value: 'geek-fun' }],
},
Type: 'ALIYUN::FC::Service',
Type: 'ALIYUN::FC3::Function',
},
},
};
Expand Down
32 changes: 16 additions & 16 deletions tests/fixtures/serverless-insight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ functions:
TEST_VAR: ${vars.testv}
TEST_VAR_EXTRA: abcds-${vars.testv}-andyou

databases:
insight_poc_db:
name: insight-poc-db
type: RDS
region: ${vars.region}
instance_class: rds.mysql.t5.xlarge
storage_size: 20
username: root
password: 123456
database: insight_poc_db

#databases:
# insight_poc_db:
# name: insight-poc-db
# type: RDS
# region: ${vars.region}
# instance_class: rds.mysql.t5.xlarge
# storage_size: 20
# username: root
# password: 123456
# database: insight_poc_db
#
events:
gateway_event:
type: API_GATEWAY
Expand All @@ -49,8 +49,8 @@ events:
- method: GET
path: /api/hello
backend: insight-poc-fn
custom_domain:
domain_name: test.com
certificate_name: test
certificate_private_key: test
certificate_body: test
# custom_domain:
# domain_name: test.com
# certificate_name: test
# certificate_private_key: test
# certificate_body: test

0 comments on commit be209c4

Please sign in to comment.