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", 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..d7f3d6b 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,10 @@ 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; }