Skip to content

Commit 6034e25

Browse files
authored
Revert "feat: yml支持job镜像配置&修复cfs找不到挂载点问题 (#296)" (#297)
This reverts commit 0bff41b.
1 parent 0bff41b commit 6034e25

File tree

3 files changed

+6
-29
lines changed

3 files changed

+6
-29
lines changed

src/modules/scf/constants.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/modules/scf/interface.ts

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ export interface FunctionCode {
1212
RegistryId?: string;
1313
Command?: string;
1414
Args?: string;
15-
ContainerImageAccelerate?: boolean;
16-
ImagePort?: number;
1715
};
1816
}
1917

@@ -205,7 +203,6 @@ export interface ScfCreateFunctionInputs {
205203

206204
cfs?: {
207205
cfsId: string;
208-
mountInsId?: string;
209206
MountInsId?: string;
210207
localMountDir: string;
211208
remoteMountDir: string;
@@ -231,10 +228,6 @@ export interface ScfCreateFunctionInputs {
231228
command?: string;
232229
// 启动命令参数
233230
args?: string;
234-
// 是否开启镜像加速
235-
containerImageAccelerate?: boolean;
236-
// 监听端口: -1 表示job镜像,0~65535 表示Web Server镜像
237-
imagePort?: number;
238231
};
239232

240233
// 异步调用重试配置
@@ -398,25 +391,25 @@ export interface GetRequestStatusOptions {
398391
/**
399392
* 函数名称
400393
*/
401-
functionName: string;
394+
functionName: string
402395

403396
/**
404397
* 需要查询状态的请求id
405398
*/
406-
functionRequestId: string;
399+
functionRequestId: string
407400

408401
/**
409402
* 函数的所在的命名空间
410403
*/
411-
namespace?: string;
404+
namespace?: string
412405

413406
/**
414407
* 查询的开始时间,例如:2017-05-16 20:00:00,不填默认为当前时间 - 15min
415408
*/
416-
startTime?: string;
409+
startTime?: string
417410

418411
/**
419412
* 查询的结束时间,例如:2017-05-16 20:59:59,不填默认为当前时间。EndTime 需要晚于 StartTime。
420413
*/
421-
endTime?: string;
414+
endTime?: string
422415
}

src/modules/scf/utils.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { WebServerImageDefaultPort } from './constants';
21
import { ScfCreateFunctionInputs, BaseFunctionConfig, ProtocolParams } from './interface';
32
const CONFIGS = require('./config').default;
43

@@ -53,20 +52,6 @@ export const formatInputs = (inputs: ScfCreateFunctionInputs) => {
5352
if (imageConfig.args) {
5453
functionInputs.Code!.ImageConfig!.Args = imageConfig.args;
5554
}
56-
// 镜像加速
57-
if (imageConfig.containerImageAccelerate !== undefined) {
58-
functionInputs.Code!.ImageConfig!.ContainerImageAccelerate =
59-
imageConfig.containerImageAccelerate;
60-
}
61-
// 监听端口: -1 表示 job镜像,0 ~ 65526 表示webServer镜像
62-
if (imageConfig.imagePort) {
63-
functionInputs.Code!.ImageConfig!.ImagePort =
64-
Number.isInteger(imageConfig?.imagePort) &&
65-
imageConfig?.imagePort >= -1 &&
66-
imageConfig?.imagePort <= 65535
67-
? imageConfig.imagePort
68-
: WebServerImageDefaultPort;
69-
}
7055
} else {
7156
// 基于 COS 代码部署
7257
functionInputs.Code = {
@@ -164,7 +149,7 @@ export const formatInputs = (inputs: ScfCreateFunctionInputs) => {
164149
inputs.cfs.forEach((item) => {
165150
functionInputs.CfsConfig?.CfsInsList.push({
166151
CfsId: item.cfsId,
167-
MountInsId: item.mountInsId || item.MountInsId || item.cfsId,
152+
MountInsId: item.MountInsId || item.cfsId,
168153
LocalMountDir: item.localMountDir,
169154
RemoteMountDir: item.remoteMountDir,
170155
UserGroupId: String(item.userGroupId || 10000),

0 commit comments

Comments
 (0)