From 4039e10cd5e0e8c9455599232247e1a5eef77139 Mon Sep 17 00:00:00 2001 From: ciryu <35194652+ciryu@users.noreply.github.com> Date: Sun, 24 Apr 2022 17:08:47 +0800 Subject: [PATCH 1/5] feat:support GPU node type (#276) --- src/modules/scf/entities/scf.ts | 2 ++ src/modules/scf/interface.ts | 4 ++++ src/modules/scf/utils.ts | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/src/modules/scf/entities/scf.ts b/src/modules/scf/entities/scf.ts index a84470d..2ab2052 100644 --- a/src/modules/scf/entities/scf.ts +++ b/src/modules/scf/entities/scf.ts @@ -200,6 +200,8 @@ export default class ScfEntity extends BaseEntity { delete reqInputs.InstallDependency; delete reqInputs.DeployMode; delete reqInputs.ProtocolType; + delete reqInputs.NodeType; + delete reqInputs.NodeSpec; // +++++++++++++++++++++++ // FIXME: 以下是函数绑定层逻辑,当函数有一个层,更新的时候想删除,需要传递参数 Layers 不能为空,必须包含特殊元素:{ LayerName: '', LayerVersion: 0 } diff --git a/src/modules/scf/interface.ts b/src/modules/scf/interface.ts index cce3ec8..dce18db 100644 --- a/src/modules/scf/interface.ts +++ b/src/modules/scf/interface.ts @@ -65,6 +65,8 @@ export interface BaseFunctionConfig { InstallDependency?: 'TRUE' | 'FALSE'; ProtocolType?: string; ProtocolParams?: ProtocolParams; + NodeType?: string; + NodeSpec?: string; } export interface TriggerType { @@ -164,6 +166,8 @@ export interface ScfCreateFunctionInputs { publicAccess?: boolean; eip?: boolean; l5Enable?: boolean; + nodeType?: string; + nodeSpec?: string; role?: string; description?: string; diff --git a/src/modules/scf/utils.ts b/src/modules/scf/utils.ts index 73f07d2..0c905d1 100644 --- a/src/modules/scf/utils.ts +++ b/src/modules/scf/utils.ts @@ -22,6 +22,14 @@ export const formatInputs = (inputs: ScfCreateFunctionInputs) => { InstallDependency: inputs.installDependency === true ? 'TRUE' : 'FALSE', }; + if (inputs.nodeType) { + functionInputs.NodeType = inputs.nodeType; + } + + if (inputs.nodeSpec) { + functionInputs.NodeSpec = inputs.nodeSpec; + } + if (inputs.initTimeout) { functionInputs.InitTimeout = inputs.initTimeout; } From 6b6147674a492a55f2717946a149431a8e582a2f Mon Sep 17 00:00:00 2001 From: ciryu <35194652+ciryu@users.noreply.github.com> Date: Sun, 24 Apr 2022 20:31:37 +0800 Subject: [PATCH 2/5] feat:support GPU node type (#277) --- src/modules/scf/interface.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/scf/interface.ts b/src/modules/scf/interface.ts index dce18db..d7f3d6b 100644 --- a/src/modules/scf/interface.ts +++ b/src/modules/scf/interface.ts @@ -166,7 +166,9 @@ export interface ScfCreateFunctionInputs { publicAccess?: boolean; eip?: boolean; l5Enable?: boolean; + // 资源类型 nodeType?: string; + // 资源配置 nodeSpec?: string; role?: string; From f7db0a0e8b44771da7ff06159cbb11a17f2e5069 Mon Sep 17 00:00:00 2001 From: ciryu <35194652+ciryu@users.noreply.github.com> Date: Mon, 25 Apr 2022 14:32:35 +0800 Subject: [PATCH 3/5] version: 2.23.4 (#278) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7a189ac..9b77e28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tencent-component-toolkit", - "version": "2.23.3", + "version": "2.23.4", "description": "Tencent component toolkit", "main": "lib/index.js", "types": "lib/index.d.ts", From e19cac731363c0fdff88fe6fe336db6eb0b2e485 Mon Sep 17 00:00:00 2001 From: ciryu <35194652+ciryu@users.noreply.github.com> Date: Mon, 25 Apr 2022 15:29:10 +0800 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81GPU=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E9=83=A8=E7=BD=B2=20(#281)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9b77e28..7a189ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tencent-component-toolkit", - "version": "2.23.4", + "version": "2.23.3", "description": "Tencent component toolkit", "main": "lib/index.js", "types": "lib/index.d.ts", From f690f1514c9a58e2ec078e16527baf79ec9b3a1c Mon Sep 17 00:00:00 2001 From: slsplus Date: Mon, 25 Apr 2022 07:29:50 +0000 Subject: [PATCH 5/5] chore(release): version 2.24.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # [2.24.0](https://github.com/serverless-tencent/tencent-component-toolkit/compare/v2.23.3...v2.24.0) (2022-04-25) ### Features * 支持GPU函数部署 ([#281](https://github.com/serverless-tencent/tencent-component-toolkit/issues/281)) ([e19cac7](https://github.com/serverless-tencent/tencent-component-toolkit/commit/e19cac731363c0fdff88fe6fe336db6eb0b2e485)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8773ce4..6b85f6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [2.24.0](https://github.com/serverless-tencent/tencent-component-toolkit/compare/v2.23.3...v2.24.0) (2022-04-25) + + +### Features + +* 支持GPU函数部署 ([#281](https://github.com/serverless-tencent/tencent-component-toolkit/issues/281)) ([e19cac7](https://github.com/serverless-tencent/tencent-component-toolkit/commit/e19cac731363c0fdff88fe6fe336db6eb0b2e485)) + ## [2.23.3](https://github.com/serverless-tencent/tencent-component-toolkit/compare/v2.23.2...v2.23.3) (2022-03-10) diff --git a/package.json b/package.json index 7a189ac..dbf71ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tencent-component-toolkit", - "version": "2.23.3", + "version": "2.24.0", "description": "Tencent component toolkit", "main": "lib/index.js", "types": "lib/index.d.ts",