@catladder/cli 0.0.0-main-44c3ecb9 → 0.0.0-main-a5fa4316
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles/catenv/index.js +69 -4
- package/dist/bundles/cli/index.js +69 -4
- package/dist/pipeline/src/build/node/meteor.js +0 -2
- package/dist/pipeline/src/build/node/meteor.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.d.ts +4 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.js +52 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.js.map +1 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +5 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.js +5 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.js.map +1 -1
- package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +45 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -2338,8 +2338,6 @@ const createMeteorBuildJobs = (context) => {
|
|
|
2338
2338
|
},
|
|
2339
2339
|
script: [
|
|
2340
2340
|
...yarnInstall,
|
|
2341
|
-
'echo "add healthcheck package"',
|
|
2342
|
-
"meteor add panter:healthroute --allow-superuser",
|
|
2343
2341
|
"meteor add qualia:prod-shell --allow-superuser",
|
|
2344
2342
|
'TOOL_NODE_FLAGS="--max_old_space_size=3584 --min_semi_space_size=8 --max_semi_space_size=256 --optimize_for_size" meteor build ./dist --architecture os.linux.x86_64 --allow-superuser --server-only --directory',
|
|
2345
2343
|
"cp ./__build_info.json ./dist/bundle/programs/server",
|
|
@@ -4192,6 +4190,65 @@ const requiresBeta = (config) => {
|
|
|
4192
4190
|
|
|
4193
4191
|
/***/ }),
|
|
4194
4192
|
|
|
4193
|
+
/***/ 7709:
|
|
4194
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4195
|
+
|
|
4196
|
+
"use strict";
|
|
4197
|
+
|
|
4198
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4199
|
+
exports.getWorkerPoolDeleteScript = exports.getWorkerPoolDeployScript = void 0;
|
|
4200
|
+
const getLabels_1 = __nccwpck_require__(482);
|
|
4201
|
+
const createArgsString_1 = __nccwpck_require__(5516);
|
|
4202
|
+
const getJobOrServiceArgs_1 = __nccwpck_require__(2790);
|
|
4203
|
+
const getServiceName_1 = __nccwpck_require__(6428);
|
|
4204
|
+
const common_1 = __nccwpck_require__(4884);
|
|
4205
|
+
const constants_1 = __nccwpck_require__(7180);
|
|
4206
|
+
const volumes_1 = __nccwpck_require__(7770);
|
|
4207
|
+
const getWorkerPoolDeployScript = (context, workerPool, nameSuffix) => {
|
|
4208
|
+
var _a, _b, _c, _d;
|
|
4209
|
+
const commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
|
|
4210
|
+
const serviceName = (0, getServiceName_1.getServiceName)(context);
|
|
4211
|
+
const command = workerPool.command;
|
|
4212
|
+
const commandArray = Array.isArray(command) ? command : command.split(" ");
|
|
4213
|
+
const fullWorkerPoolName = `${serviceName}-${nameSuffix}`;
|
|
4214
|
+
const argsString = (0, createArgsString_1.createArgsString)({
|
|
4215
|
+
command: '"' + commandArray.join(",") + '"',
|
|
4216
|
+
args: (0, getJobOrServiceArgs_1.getCloudRunServiceOrJobArgsArg)(workerPool.args),
|
|
4217
|
+
...commonDeployArgs,
|
|
4218
|
+
image: (_a = workerPool.image) !== null && _a !== void 0 ? _a : commonDeployArgs.image,
|
|
4219
|
+
labels: (0, common_1.makeLabelString)({
|
|
4220
|
+
...(0, getLabels_1.getLabels)(context),
|
|
4221
|
+
"cloud-run-worker-pool-name": fullWorkerPoolName,
|
|
4222
|
+
}),
|
|
4223
|
+
"env-vars-file": constants_1.ENV_VARS_FILENAME,
|
|
4224
|
+
instances: (_b = workerPool.instances) !== null && _b !== void 0 ? _b : 1,
|
|
4225
|
+
cpu: (_c = workerPool.cpu) !== null && _c !== void 0 ? _c : 1,
|
|
4226
|
+
memory: (_d = workerPool.memory) !== null && _d !== void 0 ? _d : "512Mi",
|
|
4227
|
+
"vpc-connector": workerPool.vpcConnector,
|
|
4228
|
+
"vpc-egress": workerPool.vpcEgress,
|
|
4229
|
+
network: workerPool.network,
|
|
4230
|
+
subnet: workerPool.subnet,
|
|
4231
|
+
gpu: workerPool.gpu,
|
|
4232
|
+
"gpu-type": workerPool.gpuType,
|
|
4233
|
+
}, ...(0, volumes_1.createVolumeConfig)(workerPool.volumes, "worker-pool"));
|
|
4234
|
+
// Worker pools are in beta and require the beta command
|
|
4235
|
+
return `${(0, common_1.gcloudRunCmd)("beta")} worker-pools deploy ${fullWorkerPoolName} ${argsString}`;
|
|
4236
|
+
};
|
|
4237
|
+
exports.getWorkerPoolDeployScript = getWorkerPoolDeployScript;
|
|
4238
|
+
const getWorkerPoolDeleteScript = (context, workerPoolSuffix) => {
|
|
4239
|
+
const commonArgs = (0, common_1.getCommonCloudRunArgs)(context);
|
|
4240
|
+
const commonArgsString = (0, createArgsString_1.createArgsString)(commonArgs);
|
|
4241
|
+
const serviceName = (0, getServiceName_1.getServiceName)(context);
|
|
4242
|
+
const fullWorkerPoolName = `${serviceName}-${workerPoolSuffix}`;
|
|
4243
|
+
return [
|
|
4244
|
+
`${(0, common_1.gcloudRunCmd)("beta")} worker-pools delete ${fullWorkerPoolName} ${commonArgsString}`,
|
|
4245
|
+
];
|
|
4246
|
+
};
|
|
4247
|
+
exports.getWorkerPoolDeleteScript = getWorkerPoolDeleteScript;
|
|
4248
|
+
//# sourceMappingURL=cloudRunWorkerPools.js.map
|
|
4249
|
+
|
|
4250
|
+
/***/ }),
|
|
4251
|
+
|
|
4195
4252
|
/***/ 4884:
|
|
4196
4253
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4197
4254
|
|
|
@@ -4516,11 +4573,12 @@ const gcloudServiceAccountLoginCommands_1 = __nccwpck_require__(1201);
|
|
|
4516
4573
|
const cloudRunJobs_1 = __nccwpck_require__(2579);
|
|
4517
4574
|
const onDeploy_1 = __nccwpck_require__(9099);
|
|
4518
4575
|
const cloudRunServices_1 = __nccwpck_require__(675);
|
|
4576
|
+
const cloudRunWorkerPools_1 = __nccwpck_require__(7709);
|
|
4519
4577
|
const common_1 = __nccwpck_require__(4884);
|
|
4520
4578
|
const constants_1 = __nccwpck_require__(7180);
|
|
4521
4579
|
const schedules_1 = __nccwpck_require__(1503);
|
|
4522
4580
|
function getCloudRunDeployScripts(context) {
|
|
4523
|
-
var _a;
|
|
4581
|
+
var _a, _b;
|
|
4524
4582
|
const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
|
|
4525
4583
|
const allEnvVars = (0, lodash_1.omit)(context.environment.envVars, __1.GCLOUD_DEPLOY_CREDENTIALS_KEY);
|
|
4526
4584
|
return [
|
|
@@ -4542,6 +4600,9 @@ function getCloudRunDeployScripts(context) {
|
|
|
4542
4600
|
...Object.entries((_a = deployConfig.additionalServices) !== null && _a !== void 0 ? _a : {})
|
|
4543
4601
|
.filter(([_, service]) => service !== false && service !== null)
|
|
4544
4602
|
.map(([name, service]) => (0, cloudRunServices_1.getServiceDeployScript)(context, service, "-" + name)),
|
|
4603
|
+
...Object.entries((_b = deployConfig.workerPools) !== null && _b !== void 0 ? _b : {})
|
|
4604
|
+
.filter(([_, workerPool]) => workerPool !== false && workerPool !== null)
|
|
4605
|
+
.map(([name, workerPool]) => (0, cloudRunWorkerPools_1.getWorkerPoolDeployScript)(context, workerPool, name)),
|
|
4545
4606
|
...(0, onDeploy_1.getOnDeployExecuteScript)(context, "postDeploy"),
|
|
4546
4607
|
]),
|
|
4547
4608
|
...(0, gitlab_1.collapseableSection)("cleanup", "Cleanup")((0, cleanup_1.getRemoveOldRevisionsAndImagesCommand)(context, "postDeploy")),
|
|
@@ -4566,9 +4627,10 @@ const cloudRunJobs_1 = __nccwpck_require__(2579);
|
|
|
4566
4627
|
const onDeploy_1 = __nccwpck_require__(9099);
|
|
4567
4628
|
const schedules_1 = __nccwpck_require__(1503);
|
|
4568
4629
|
const cloudRunServices_1 = __nccwpck_require__(675);
|
|
4630
|
+
const cloudRunWorkerPools_1 = __nccwpck_require__(7709);
|
|
4569
4631
|
const common_1 = __nccwpck_require__(4884);
|
|
4570
4632
|
function getCloudRunStopScripts(context) {
|
|
4571
|
-
var _a;
|
|
4633
|
+
var _a, _b;
|
|
4572
4634
|
const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
|
|
4573
4635
|
return [
|
|
4574
4636
|
...(0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context),
|
|
@@ -4577,6 +4639,9 @@ function getCloudRunStopScripts(context) {
|
|
|
4577
4639
|
...Object.entries((_a = deployConfig.additionalServices) !== null && _a !== void 0 ? _a : {})
|
|
4578
4640
|
.filter(([_, service]) => service !== false && service !== null)
|
|
4579
4641
|
.flatMap(([name]) => (0, cloudRunServices_1.getServiceDeleteScript)(context, name)),
|
|
4642
|
+
...Object.entries((_b = deployConfig.workerPools) !== null && _b !== void 0 ? _b : {})
|
|
4643
|
+
.filter(([_, workerPool]) => workerPool !== false && workerPool !== null)
|
|
4644
|
+
.flatMap(([name]) => (0, cloudRunWorkerPools_1.getWorkerPoolDeleteScript)(context, name)),
|
|
4580
4645
|
...(0, onDeploy_1.getOnDeployExecuteScript)(context, "postStop"),
|
|
4581
4646
|
...(0, schedules_1.getDeleteSchedulesScript)(context),
|
|
4582
4647
|
...(0, cloudRunJobs_1.getDeleteJobsScripts)(context),
|
|
@@ -5604,8 +5604,6 @@ const createMeteorBuildJobs = (context) => {
|
|
|
5604
5604
|
},
|
|
5605
5605
|
script: [
|
|
5606
5606
|
...yarnInstall,
|
|
5607
|
-
'echo "add healthcheck package"',
|
|
5608
|
-
"meteor add panter:healthroute --allow-superuser",
|
|
5609
5607
|
"meteor add qualia:prod-shell --allow-superuser",
|
|
5610
5608
|
'TOOL_NODE_FLAGS="--max_old_space_size=3584 --min_semi_space_size=8 --max_semi_space_size=256 --optimize_for_size" meteor build ./dist --architecture os.linux.x86_64 --allow-superuser --server-only --directory',
|
|
5611
5609
|
"cp ./__build_info.json ./dist/bundle/programs/server",
|
|
@@ -7458,6 +7456,65 @@ const requiresBeta = (config) => {
|
|
|
7458
7456
|
|
|
7459
7457
|
/***/ }),
|
|
7460
7458
|
|
|
7459
|
+
/***/ 10090:
|
|
7460
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
7461
|
+
|
|
7462
|
+
"use strict";
|
|
7463
|
+
|
|
7464
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7465
|
+
exports.getWorkerPoolDeleteScript = exports.getWorkerPoolDeployScript = void 0;
|
|
7466
|
+
const getLabels_1 = __nccwpck_require__(70482);
|
|
7467
|
+
const createArgsString_1 = __nccwpck_require__(35516);
|
|
7468
|
+
const getJobOrServiceArgs_1 = __nccwpck_require__(42790);
|
|
7469
|
+
const getServiceName_1 = __nccwpck_require__(96428);
|
|
7470
|
+
const common_1 = __nccwpck_require__(54884);
|
|
7471
|
+
const constants_1 = __nccwpck_require__(17180);
|
|
7472
|
+
const volumes_1 = __nccwpck_require__(47770);
|
|
7473
|
+
const getWorkerPoolDeployScript = (context, workerPool, nameSuffix) => {
|
|
7474
|
+
var _a, _b, _c, _d;
|
|
7475
|
+
const commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
|
|
7476
|
+
const serviceName = (0, getServiceName_1.getServiceName)(context);
|
|
7477
|
+
const command = workerPool.command;
|
|
7478
|
+
const commandArray = Array.isArray(command) ? command : command.split(" ");
|
|
7479
|
+
const fullWorkerPoolName = `${serviceName}-${nameSuffix}`;
|
|
7480
|
+
const argsString = (0, createArgsString_1.createArgsString)({
|
|
7481
|
+
command: '"' + commandArray.join(",") + '"',
|
|
7482
|
+
args: (0, getJobOrServiceArgs_1.getCloudRunServiceOrJobArgsArg)(workerPool.args),
|
|
7483
|
+
...commonDeployArgs,
|
|
7484
|
+
image: (_a = workerPool.image) !== null && _a !== void 0 ? _a : commonDeployArgs.image,
|
|
7485
|
+
labels: (0, common_1.makeLabelString)({
|
|
7486
|
+
...(0, getLabels_1.getLabels)(context),
|
|
7487
|
+
"cloud-run-worker-pool-name": fullWorkerPoolName,
|
|
7488
|
+
}),
|
|
7489
|
+
"env-vars-file": constants_1.ENV_VARS_FILENAME,
|
|
7490
|
+
instances: (_b = workerPool.instances) !== null && _b !== void 0 ? _b : 1,
|
|
7491
|
+
cpu: (_c = workerPool.cpu) !== null && _c !== void 0 ? _c : 1,
|
|
7492
|
+
memory: (_d = workerPool.memory) !== null && _d !== void 0 ? _d : "512Mi",
|
|
7493
|
+
"vpc-connector": workerPool.vpcConnector,
|
|
7494
|
+
"vpc-egress": workerPool.vpcEgress,
|
|
7495
|
+
network: workerPool.network,
|
|
7496
|
+
subnet: workerPool.subnet,
|
|
7497
|
+
gpu: workerPool.gpu,
|
|
7498
|
+
"gpu-type": workerPool.gpuType,
|
|
7499
|
+
}, ...(0, volumes_1.createVolumeConfig)(workerPool.volumes, "worker-pool"));
|
|
7500
|
+
// Worker pools are in beta and require the beta command
|
|
7501
|
+
return `${(0, common_1.gcloudRunCmd)("beta")} worker-pools deploy ${fullWorkerPoolName} ${argsString}`;
|
|
7502
|
+
};
|
|
7503
|
+
exports.getWorkerPoolDeployScript = getWorkerPoolDeployScript;
|
|
7504
|
+
const getWorkerPoolDeleteScript = (context, workerPoolSuffix) => {
|
|
7505
|
+
const commonArgs = (0, common_1.getCommonCloudRunArgs)(context);
|
|
7506
|
+
const commonArgsString = (0, createArgsString_1.createArgsString)(commonArgs);
|
|
7507
|
+
const serviceName = (0, getServiceName_1.getServiceName)(context);
|
|
7508
|
+
const fullWorkerPoolName = `${serviceName}-${workerPoolSuffix}`;
|
|
7509
|
+
return [
|
|
7510
|
+
`${(0, common_1.gcloudRunCmd)("beta")} worker-pools delete ${fullWorkerPoolName} ${commonArgsString}`,
|
|
7511
|
+
];
|
|
7512
|
+
};
|
|
7513
|
+
exports.getWorkerPoolDeleteScript = getWorkerPoolDeleteScript;
|
|
7514
|
+
//# sourceMappingURL=cloudRunWorkerPools.js.map
|
|
7515
|
+
|
|
7516
|
+
/***/ }),
|
|
7517
|
+
|
|
7461
7518
|
/***/ 54884:
|
|
7462
7519
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
7463
7520
|
|
|
@@ -7782,11 +7839,12 @@ const gcloudServiceAccountLoginCommands_1 = __nccwpck_require__(61201);
|
|
|
7782
7839
|
const cloudRunJobs_1 = __nccwpck_require__(2579);
|
|
7783
7840
|
const onDeploy_1 = __nccwpck_require__(69099);
|
|
7784
7841
|
const cloudRunServices_1 = __nccwpck_require__(60675);
|
|
7842
|
+
const cloudRunWorkerPools_1 = __nccwpck_require__(10090);
|
|
7785
7843
|
const common_1 = __nccwpck_require__(54884);
|
|
7786
7844
|
const constants_1 = __nccwpck_require__(17180);
|
|
7787
7845
|
const schedules_1 = __nccwpck_require__(91503);
|
|
7788
7846
|
function getCloudRunDeployScripts(context) {
|
|
7789
|
-
var _a;
|
|
7847
|
+
var _a, _b;
|
|
7790
7848
|
const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
|
|
7791
7849
|
const allEnvVars = (0, lodash_1.omit)(context.environment.envVars, __1.GCLOUD_DEPLOY_CREDENTIALS_KEY);
|
|
7792
7850
|
return [
|
|
@@ -7808,6 +7866,9 @@ function getCloudRunDeployScripts(context) {
|
|
|
7808
7866
|
...Object.entries((_a = deployConfig.additionalServices) !== null && _a !== void 0 ? _a : {})
|
|
7809
7867
|
.filter(([_, service]) => service !== false && service !== null)
|
|
7810
7868
|
.map(([name, service]) => (0, cloudRunServices_1.getServiceDeployScript)(context, service, "-" + name)),
|
|
7869
|
+
...Object.entries((_b = deployConfig.workerPools) !== null && _b !== void 0 ? _b : {})
|
|
7870
|
+
.filter(([_, workerPool]) => workerPool !== false && workerPool !== null)
|
|
7871
|
+
.map(([name, workerPool]) => (0, cloudRunWorkerPools_1.getWorkerPoolDeployScript)(context, workerPool, name)),
|
|
7811
7872
|
...(0, onDeploy_1.getOnDeployExecuteScript)(context, "postDeploy"),
|
|
7812
7873
|
]),
|
|
7813
7874
|
...(0, gitlab_1.collapseableSection)("cleanup", "Cleanup")((0, cleanup_1.getRemoveOldRevisionsAndImagesCommand)(context, "postDeploy")),
|
|
@@ -7832,9 +7893,10 @@ const cloudRunJobs_1 = __nccwpck_require__(2579);
|
|
|
7832
7893
|
const onDeploy_1 = __nccwpck_require__(69099);
|
|
7833
7894
|
const schedules_1 = __nccwpck_require__(91503);
|
|
7834
7895
|
const cloudRunServices_1 = __nccwpck_require__(60675);
|
|
7896
|
+
const cloudRunWorkerPools_1 = __nccwpck_require__(10090);
|
|
7835
7897
|
const common_1 = __nccwpck_require__(54884);
|
|
7836
7898
|
function getCloudRunStopScripts(context) {
|
|
7837
|
-
var _a;
|
|
7899
|
+
var _a, _b;
|
|
7838
7900
|
const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
|
|
7839
7901
|
return [
|
|
7840
7902
|
...(0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context),
|
|
@@ -7843,6 +7905,9 @@ function getCloudRunStopScripts(context) {
|
|
|
7843
7905
|
...Object.entries((_a = deployConfig.additionalServices) !== null && _a !== void 0 ? _a : {})
|
|
7844
7906
|
.filter(([_, service]) => service !== false && service !== null)
|
|
7845
7907
|
.flatMap(([name]) => (0, cloudRunServices_1.getServiceDeleteScript)(context, name)),
|
|
7908
|
+
...Object.entries((_b = deployConfig.workerPools) !== null && _b !== void 0 ? _b : {})
|
|
7909
|
+
.filter(([_, workerPool]) => workerPool !== false && workerPool !== null)
|
|
7910
|
+
.flatMap(([name]) => (0, cloudRunWorkerPools_1.getWorkerPoolDeleteScript)(context, name)),
|
|
7846
7911
|
...(0, onDeploy_1.getOnDeployExecuteScript)(context, "postStop"),
|
|
7847
7912
|
...(0, schedules_1.getDeleteSchedulesScript)(context),
|
|
7848
7913
|
...(0, cloudRunJobs_1.getDeleteJobsScripts)(context),
|
|
@@ -35,8 +35,6 @@ const createMeteorBuildJobs = (context) => {
|
|
|
35
35
|
},
|
|
36
36
|
script: [
|
|
37
37
|
...yarnInstall,
|
|
38
|
-
'echo "add healthcheck package"',
|
|
39
|
-
"meteor add panter:healthroute --allow-superuser",
|
|
40
38
|
"meteor add qualia:prod-shell --allow-superuser",
|
|
41
39
|
'TOOL_NODE_FLAGS="--max_old_space_size=3584 --min_semi_space_size=8 --max_semi_space_size=256 --optimize_for_size" meteor build ./dist --architecture os.linux.x86_64 --allow-superuser --server-only --directory',
|
|
42
40
|
"cp ./__build_info.json ./dist/bundle/programs/server",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meteor.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/meteor.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAQ9C,kCAAmD;AACnD,sCAAsE;AAEtE,oCAAyC;AACzC,mCAAuC;AACvC,iCAAwC;AAExC,MAAM,cAAc,GAAG,CAAC,OAAyB,EAAiB,EAAE,CAAC;IACnE;QACE,GAAG,EAAE,oBAAoB;QACzB,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE;YACL,0CAA0C;YAC1C,4BAA4B;YAC5B,wBAAwB;YACxB,qCAAqC;SACtC;KACF;CACF,CAAC;AACK,MAAM,qBAAqB,GAAG,CACnC,OAAkC,EAClB,EAAE;IAClB,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;IAEzC,IAAI,CAAC,IAAA,qBAAa,EAAC,WAAW,EAAE,QAAQ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E5C,OAAO,IAAA,+BAAwB,EAAC,OAAO,EAAE;QACvC,QAAQ,EACN,WAAW,CAAC,YAAY,KAAK,IAAI;YAC/B,CAAC,CAAC;gBACE,KAAK,EAAE,CAAC,GAAG,IAAA,oBAAY,EAAC,OAAO,CAAC,EAAE,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;gBAC7D,KAAK,EAAE,IAAA,uBAAc,EAAC,aAAa,CAAC;gBACpC,SAAS,EAAE;oBACT,iCAAiC,EAAE,GAAG,EAAE,yGAAyG;iBAClJ;gBACD,MAAM,EAAE;oBACN,GAAG,WAAW;oBAEd,gDAAgD;oBAEhD,kNAAkN;oBAElN,sDAAsD;iBACvD;aACF;YACH,CAAC,CAAC,SAAS;QACf,WAAW,EAAE;YACX,MAAM,EAAE,IAAA,kDAAyC,EAAC,OAAO,EAAE,QAAQ,CAAC;YACpE,SAAS,EAAE;gBACT,sBAAsB,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;aACjE;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAtCW,QAAA,qBAAqB,yBAsChC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
|
+
import type { DeployConfigCloudRunWorkerPool } from "../../types/googleCloudRun";
|
|
3
|
+
export declare const getWorkerPoolDeployScript: (context: ComponentContext, workerPool: DeployConfigCloudRunWorkerPool, nameSuffix: string) => string;
|
|
4
|
+
export declare const getWorkerPoolDeleteScript: (context: ComponentContext, workerPoolSuffix: string) => string[];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWorkerPoolDeleteScript = exports.getWorkerPoolDeployScript = void 0;
|
|
4
|
+
const getLabels_1 = require("../../../context/getLabels");
|
|
5
|
+
const createArgsString_1 = require("../utils/createArgsString");
|
|
6
|
+
const getJobOrServiceArgs_1 = require("../utils/getJobOrServiceArgs");
|
|
7
|
+
const getServiceName_1 = require("../utils/getServiceName");
|
|
8
|
+
const common_1 = require("./common");
|
|
9
|
+
const constants_1 = require("./constants");
|
|
10
|
+
const volumes_1 = require("./volumes");
|
|
11
|
+
const getWorkerPoolDeployScript = (context, workerPool, nameSuffix) => {
|
|
12
|
+
var _a, _b, _c, _d;
|
|
13
|
+
const commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
|
|
14
|
+
const serviceName = (0, getServiceName_1.getServiceName)(context);
|
|
15
|
+
const command = workerPool.command;
|
|
16
|
+
const commandArray = Array.isArray(command) ? command : command.split(" ");
|
|
17
|
+
const fullWorkerPoolName = `${serviceName}-${nameSuffix}`;
|
|
18
|
+
const argsString = (0, createArgsString_1.createArgsString)({
|
|
19
|
+
command: '"' + commandArray.join(",") + '"',
|
|
20
|
+
args: (0, getJobOrServiceArgs_1.getCloudRunServiceOrJobArgsArg)(workerPool.args),
|
|
21
|
+
...commonDeployArgs,
|
|
22
|
+
image: (_a = workerPool.image) !== null && _a !== void 0 ? _a : commonDeployArgs.image,
|
|
23
|
+
labels: (0, common_1.makeLabelString)({
|
|
24
|
+
...(0, getLabels_1.getLabels)(context),
|
|
25
|
+
"cloud-run-worker-pool-name": fullWorkerPoolName,
|
|
26
|
+
}),
|
|
27
|
+
"env-vars-file": constants_1.ENV_VARS_FILENAME,
|
|
28
|
+
instances: (_b = workerPool.instances) !== null && _b !== void 0 ? _b : 1,
|
|
29
|
+
cpu: (_c = workerPool.cpu) !== null && _c !== void 0 ? _c : 1,
|
|
30
|
+
memory: (_d = workerPool.memory) !== null && _d !== void 0 ? _d : "512Mi",
|
|
31
|
+
"vpc-connector": workerPool.vpcConnector,
|
|
32
|
+
"vpc-egress": workerPool.vpcEgress,
|
|
33
|
+
network: workerPool.network,
|
|
34
|
+
subnet: workerPool.subnet,
|
|
35
|
+
gpu: workerPool.gpu,
|
|
36
|
+
"gpu-type": workerPool.gpuType,
|
|
37
|
+
}, ...(0, volumes_1.createVolumeConfig)(workerPool.volumes, "worker-pool"));
|
|
38
|
+
// Worker pools are in beta and require the beta command
|
|
39
|
+
return `${(0, common_1.gcloudRunCmd)("beta")} worker-pools deploy ${fullWorkerPoolName} ${argsString}`;
|
|
40
|
+
};
|
|
41
|
+
exports.getWorkerPoolDeployScript = getWorkerPoolDeployScript;
|
|
42
|
+
const getWorkerPoolDeleteScript = (context, workerPoolSuffix) => {
|
|
43
|
+
const commonArgs = (0, common_1.getCommonCloudRunArgs)(context);
|
|
44
|
+
const commonArgsString = (0, createArgsString_1.createArgsString)(commonArgs);
|
|
45
|
+
const serviceName = (0, getServiceName_1.getServiceName)(context);
|
|
46
|
+
const fullWorkerPoolName = `${serviceName}-${workerPoolSuffix}`;
|
|
47
|
+
return [
|
|
48
|
+
`${(0, common_1.gcloudRunCmd)("beta")} worker-pools delete ${fullWorkerPoolName} ${commonArgsString}`,
|
|
49
|
+
];
|
|
50
|
+
};
|
|
51
|
+
exports.getWorkerPoolDeleteScript = getWorkerPoolDeleteScript;
|
|
52
|
+
//# sourceMappingURL=cloudRunWorkerPools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudRunWorkerPools.js","sourceRoot":"","sources":["../../../../../../../pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.ts"],"names":[],"mappings":";;;AAAA,0DAAuD;AAIvD,gEAA6D;AAC7D,sEAA8E;AAC9E,4DAAyD;AACzD,qCAKkB;AAClB,2CAAgD;AAChD,uCAA+C;AAExC,MAAM,yBAAyB,GAAG,CACvC,OAAyB,EACzB,UAA0C,EAC1C,UAAkB,EAClB,EAAE;;IACF,MAAM,gBAAgB,GAAG,IAAA,4BAAmB,EAAC,OAAO,CAAC,CAAC;IAEtD,MAAM,WAAW,GAAG,IAAA,+BAAc,EAAC,OAAO,CAAC,CAAC;IAE5C,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;IAEnC,MAAM,YA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,6BAyCpC;AAEK,MAAM,yBAAyB,GAAG,CACvC,OAAyB,EACzB,gBAAwB,EACxB,EAAE;IACF,MAAM,UAAU,GAAG,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;IAElD,MAAM,gBAAgB,GAAG,IAAA,mCAAgB,EAAC,UAAU,CAAC,CAAC;IAEtD,MAAM,WAAW,GAAG,IAAA,+BAAc,EAAC,OAAO,CAAC,CAAC;IAE5C,MAAM,kBAAkB,GAAG,GAAG,WAAW,IAAI,gBAAgB,EAAE,CAAC;IAEhE,OAAO;QACL,GAAG,IAAA,qBAAY,EAAC,MAAM,CAAC,wBAAwB,kBAAkB,IAAI,gBAAgB,EAAE;KACxF,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,yBAAyB,6BAepC"}
|
|
@@ -11,11 +11,12 @@ const gcloudServiceAccountLoginCommands_1 = require("../utils/gcloudServiceAccou
|
|
|
11
11
|
const cloudRunJobs_1 = require("./cloudRunJobs");
|
|
12
12
|
const onDeploy_1 = require("./execute/onDeploy");
|
|
13
13
|
const cloudRunServices_1 = require("./cloudRunServices");
|
|
14
|
+
const cloudRunWorkerPools_1 = require("./cloudRunWorkerPools");
|
|
14
15
|
const common_1 = require("./common");
|
|
15
16
|
const constants_1 = require("./constants");
|
|
16
17
|
const schedules_1 = require("./execute/schedules");
|
|
17
18
|
function getCloudRunDeployScripts(context) {
|
|
18
|
-
var _a;
|
|
19
|
+
var _a, _b;
|
|
19
20
|
const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
|
|
20
21
|
const allEnvVars = (0, lodash_1.omit)(context.environment.envVars, __1.GCLOUD_DEPLOY_CREDENTIALS_KEY);
|
|
21
22
|
return [
|
|
@@ -37,6 +38,9 @@ function getCloudRunDeployScripts(context) {
|
|
|
37
38
|
...Object.entries((_a = deployConfig.additionalServices) !== null && _a !== void 0 ? _a : {})
|
|
38
39
|
.filter(([_, service]) => service !== false && service !== null)
|
|
39
40
|
.map(([name, service]) => (0, cloudRunServices_1.getServiceDeployScript)(context, service, "-" + name)),
|
|
41
|
+
...Object.entries((_b = deployConfig.workerPools) !== null && _b !== void 0 ? _b : {})
|
|
42
|
+
.filter(([_, workerPool]) => workerPool !== false && workerPool !== null)
|
|
43
|
+
.map(([name, workerPool]) => (0, cloudRunWorkerPools_1.getWorkerPoolDeployScript)(context, workerPool, name)),
|
|
40
44
|
...(0, onDeploy_1.getOnDeployExecuteScript)(context, "postDeploy"),
|
|
41
45
|
]),
|
|
42
46
|
...(0, gitlab_1.collapseableSection)("cleanup", "Cleanup")((0, cleanup_1.getRemoveOldRevisionsAndImagesCommand)(context, "postDeploy")),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCloudRunDeployScripts.js","sourceRoot":"","sources":["../../../../../../../pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAE9B,kDAA4D;AAE5D,0BAAmD;AACnD,qDAAmE;AACnE,wCAAmE;AACnE,gDAA4D;AAC5D,kGAA+F;AAC/F,iDAAqD;AACrD,iDAA8D;AAC9D,yDAA4D;AAC5D,qCAGkB;AAClB,2CAAgD;AAChD,mDAA8D;
|
|
1
|
+
{"version":3,"file":"getCloudRunDeployScripts.js","sourceRoot":"","sources":["../../../../../../../pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAE9B,kDAA4D;AAE5D,0BAAmD;AACnD,qDAAmE;AACnE,wCAAmE;AACnE,gDAA4D;AAC5D,kGAA+F;AAC/F,iDAAqD;AACrD,iDAA8D;AAC9D,yDAA4D;AAC5D,+DAAkE;AAClE,qCAGkB;AAClB,2CAAgD;AAChD,mDAA8D;AAM9D,SAAgB,wBAAwB,CAAC,OAAyB;;IAChE,MAAM,YAAY,GAAG,IAAA,gCAAuB,EAAC,OAAO,CAAC,CAAC;IACtD,MAAM,UAAU,GAAG,IAAA,aAAI,EACrB,OAAO,CAAC,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C,OAAO,CAAC,MAAA,YAAY,CAAC,WAAW,mCAAI,EAAE,CAAC;iBAC9C,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC,UAAU,KAAK,KAAK,IAAI,UAAU,KAAK,IAAI,CAAC;iBACxE,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,CAC1B,IAAA,+CAAyB,EACvB,OAAO,EACP,UAA4C,EAC5C,IAAI,CACL,CACF;YACH,GAAG,IAAA,mCAAwB,EAAC,OAAO,EAAE,YAAY,CAAC;SACnD,CAAC;QACF,GAAG,IAAA,4BAAmB,EACpB,SAAS,EACT,SAAS,CACV,CACC,IAAA,+CAAqC,EAAC,OAAO,EAAE,YAAY,CAAC,CAC7D;KACF,CAAC;AACJ,CAAC;AA7DD,4DA6DC"}
|
|
@@ -8,9 +8,10 @@ const cloudRunJobs_1 = require("./cloudRunJobs");
|
|
|
8
8
|
const onDeploy_1 = require("./execute/onDeploy");
|
|
9
9
|
const schedules_1 = require("./execute/schedules");
|
|
10
10
|
const cloudRunServices_1 = require("./cloudRunServices");
|
|
11
|
+
const cloudRunWorkerPools_1 = require("./cloudRunWorkerPools");
|
|
11
12
|
const common_1 = require("./common");
|
|
12
13
|
function getCloudRunStopScripts(context) {
|
|
13
|
-
var _a;
|
|
14
|
+
var _a, _b;
|
|
14
15
|
const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
|
|
15
16
|
return [
|
|
16
17
|
...(0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context),
|
|
@@ -19,6 +20,9 @@ function getCloudRunStopScripts(context) {
|
|
|
19
20
|
...Object.entries((_a = deployConfig.additionalServices) !== null && _a !== void 0 ? _a : {})
|
|
20
21
|
.filter(([_, service]) => service !== false && service !== null)
|
|
21
22
|
.flatMap(([name]) => (0, cloudRunServices_1.getServiceDeleteScript)(context, name)),
|
|
23
|
+
...Object.entries((_b = deployConfig.workerPools) !== null && _b !== void 0 ? _b : {})
|
|
24
|
+
.filter(([_, workerPool]) => workerPool !== false && workerPool !== null)
|
|
25
|
+
.flatMap(([name]) => (0, cloudRunWorkerPools_1.getWorkerPoolDeleteScript)(context, name)),
|
|
22
26
|
...(0, onDeploy_1.getOnDeployExecuteScript)(context, "postStop"),
|
|
23
27
|
...(0, schedules_1.getDeleteSchedulesScript)(context),
|
|
24
28
|
...(0, cloudRunJobs_1.getDeleteJobsScripts)(context),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCloudRunStopScripts.js","sourceRoot":"","sources":["../../../../../../../pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.ts"],"names":[],"mappings":";;;AAEA,wCAAmE;AACnE,gDAA4D;AAC5D,kGAA+F;AAC/F,iDAAsD;AACtD,iDAA8D;AAC9D,mDAA+D;AAC/D,yDAA4D;AAC5D,qCAAmD;AAEnD,SAAgB,sBAAsB,CAAC,OAAyB;;IAC9D,MAAM,YAAY,GAAG,IAAA,gCAAuB,EAAC,OAAO,CAAC,CAAC;IACtD,OAAO;QACL,GAAG,IAAA,qEAAiC,EAAC,OAAO,CAAC;QAC7C,GAAG,IAAA,mCAAwB,EAAC,OAAO,EAAE,SAAS,CAAC;QAC/C,GAAG,CAAC,YAAY,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,IAAA,yCAAsB,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1E,GAAG,MAAM,CAAC,OAAO,CAAC,MAAA,YAAY,CAAC,kBAAkB,mCAAI,EAAE,CAAC;aACrD,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,IAAI,OAAO,KAAK,IAAI,CAAC;aAC/D,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAA,yCAAsB,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC7D,GAAG,IAAA,mCAAwB,EAAC,OAAO,EAAE,UAAU,CAAC;QAChD,GAAG,IAAA,oCAAwB,EAAC,OAAO,CAAC;QACpC,GAAG,IAAA,mCAAoB,EAAC,OAAO,CAAC;QAChC,GAAG,CAAC,YAAY,CAAC,QAAQ,IAAI,YAAY,CAAC,QAAQ,CAAC,oBAAoB;YACrE,CAAC,CAAC,IAAA,kCAAuB,EAAC,OAAO,EAAE,YAAY,CAAC;YAChD,CAAC,CAAC,EAAE,CAAC;QAEP,GAAG,IAAA,+CAAqC,EAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,qDAAqD;KACnH,CAAC;AACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"getCloudRunStopScripts.js","sourceRoot":"","sources":["../../../../../../../pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.ts"],"names":[],"mappings":";;;AAEA,wCAAmE;AACnE,gDAA4D;AAC5D,kGAA+F;AAC/F,iDAAsD;AACtD,iDAA8D;AAC9D,mDAA+D;AAC/D,yDAA4D;AAC5D,+DAAkE;AAClE,qCAAmD;AAEnD,SAAgB,sBAAsB,CAAC,OAAyB;;IAC9D,MAAM,YAAY,GAAG,IAAA,gCAAuB,EAAC,OAAO,CAAC,CAAC;IACtD,OAAO;QACL,GAAG,IAAA,qEAAiC,EAAC,OAAO,CAAC;QAC7C,GAAG,IAAA,mCAAwB,EAAC,OAAO,EAAE,SAAS,CAAC;QAC/C,GAAG,CAAC,YAAY,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,IAAA,yCAAsB,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1E,GAAG,MAAM,CAAC,OAAO,CAAC,MAAA,YAAY,CAAC,kBAAkB,mCAAI,EAAE,CAAC;aACrD,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,IAAI,OAAO,KAAK,IAAI,CAAC;aAC/D,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAA,yCAAsB,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC7D,GAAG,MAAM,CAAC,OAAO,CAAC,MAAA,YAAY,CAAC,WAAW,mCAAI,EAAE,CAAC;aAC9C,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC,UAAU,KAAK,KAAK,IAAI,UAAU,KAAK,IAAI,CAAC;aACxE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAA,+CAAyB,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAChE,GAAG,IAAA,mCAAwB,EAAC,OAAO,EAAE,UAAU,CAAC;QAChD,GAAG,IAAA,oCAAwB,EAAC,OAAO,CAAC;QACpC,GAAG,IAAA,mCAAoB,EAAC,OAAO,CAAC;QAChC,GAAG,CAAC,YAAY,CAAC,QAAQ,IAAI,YAAY,CAAC,QAAQ,CAAC,oBAAoB;YACrE,CAAC,CAAC,IAAA,kCAAuB,EAAC,OAAO,EAAE,YAAY,CAAC;YAChD,CAAC,CAAC,EAAE,CAAC;QAEP,GAAG,IAAA,+CAAqC,EAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,qDAAqD;KACnH,CAAC;AACJ,CAAC;AArBD,wDAqBC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { DeployConfigCloudRunVolumes } from "../../types";
|
|
2
2
|
import type { keyValuesArg } from "../utils/createArgsString";
|
|
3
|
-
export declare const createVolumeConfig: (volumes: DeployConfigCloudRunVolumes | undefined, type: "service" | "job") => keyValuesArg[];
|
|
3
|
+
export declare const createVolumeConfig: (volumes: DeployConfigCloudRunVolumes | undefined, type: "service" | "job" | "worker-pool") => keyValuesArg[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volumes.js","sourceRoot":"","sources":["../../../../../../../pipeline/src/deploy/cloudRun/createJobs/volumes.ts"],"names":[],"mappings":";;;AAGO,MAAM,kBAAkB,GAAG,CAChC,OAAgD,EAChD,
|
|
1
|
+
{"version":3,"file":"volumes.js","sourceRoot":"","sources":["../../../../../../../pipeline/src/deploy/cloudRun/createJobs/volumes.ts"],"names":[],"mappings":";;;AAGO,MAAM,kBAAkB,GAAG,CAChC,OAAgD,EAChD,IAAuC,EACvB,EAAE;IAClB,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO;QACL,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAC5B,CAAC,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YACxD,YAAY,EAAE,QAAQ,UAAU,SAAS,IAAI,WAAW,MAAM,GAC5D,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAChC,EAAE;YACF,kBAAkB,EAAE,UAAU,UAAU,eAAe,SAAS,EAAE;SACnE,CAAC,CACH;QACD,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,uBAAuB,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE;KAC9D,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,kBAAkB,sBAmB7B"}
|
|
@@ -323,6 +323,43 @@ export type DeployConfigCloudRunWithVolumes = {
|
|
|
323
323
|
volumes?: DeployConfigCloudRunVolumes;
|
|
324
324
|
};
|
|
325
325
|
export type DeployConfigCloudRunJob = DeployConfigCloudRunJobNormal | DeployConfigCloudRunJobWithSchedule;
|
|
326
|
+
export type DeployConfigCloudRunWorkerPool = {
|
|
327
|
+
/**
|
|
328
|
+
* command / entrypoint for the worker pool
|
|
329
|
+
*/
|
|
330
|
+
command: string | string[];
|
|
331
|
+
/**
|
|
332
|
+
* number of instances to run. Defaults to 1.
|
|
333
|
+
* Worker pools do not support autoscaling.
|
|
334
|
+
*/
|
|
335
|
+
instances?: number;
|
|
336
|
+
/**
|
|
337
|
+
* CPU limit. Defaults to 1
|
|
338
|
+
*/
|
|
339
|
+
cpu?: Cpu;
|
|
340
|
+
/**
|
|
341
|
+
* memory limit. Defaults to 512Mi
|
|
342
|
+
*/
|
|
343
|
+
memory?: Memory;
|
|
344
|
+
/**
|
|
345
|
+
* the image to use. Defaults to the image from the build.
|
|
346
|
+
*/
|
|
347
|
+
image?: string;
|
|
348
|
+
/**
|
|
349
|
+
* args to pass to the command
|
|
350
|
+
*/
|
|
351
|
+
args?: string[];
|
|
352
|
+
/**
|
|
353
|
+
* Number of GPUs to use. Defaults to 0
|
|
354
|
+
*
|
|
355
|
+
* This is a preview feature and not all regions support it.
|
|
356
|
+
*/
|
|
357
|
+
gpu?: number;
|
|
358
|
+
/**
|
|
359
|
+
* gpu type to use. Refer to https://cloud.google.com/run/docs/configuring/services/gpu#gcloud for defaults
|
|
360
|
+
*/
|
|
361
|
+
gpuType?: string;
|
|
362
|
+
} & DeployConfigCloudRunWithVolumes & DeployConfigCloudRunNetworkConfig;
|
|
326
363
|
export type DeployConfigCloudRun = Omit<DeployConfigBase, "execute"> & {
|
|
327
364
|
/**
|
|
328
365
|
* cloud run deployment.
|
|
@@ -353,6 +390,14 @@ export type DeployConfigCloudRun = Omit<DeployConfigBase, "execute"> & {
|
|
|
353
390
|
jobs?: {
|
|
354
391
|
[name: string]: DeployConfigCloudRunJob | false | null;
|
|
355
392
|
};
|
|
393
|
+
/**
|
|
394
|
+
* deploy worker pools for continuous background work.
|
|
395
|
+
* Worker pools are cost-effective alternatives to services for background processing.
|
|
396
|
+
* They don't have a load balanced endpoint and don't support autoscaling.
|
|
397
|
+
*/
|
|
398
|
+
workerPools?: {
|
|
399
|
+
[name: string]: DeployConfigCloudRunWorkerPool | false | null;
|
|
400
|
+
};
|
|
356
401
|
/**
|
|
357
402
|
* add cloudSql
|
|
358
403
|
*/
|