Skip to content

Commit b870f2e

Browse files
committed
chore: adjust api resources
1 parent 7c97d3b commit b870f2e

1 file changed

Lines changed: 20 additions & 9 deletions

File tree

.infra/index.ts

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,16 @@ if (isPersonalizedDigestEnabled) {
153153

154154
const memory = 860;
155155
const apiRequests: pulumi.Input<{ cpu: string; memory: string }> = {
156-
cpu: '600m',
157-
memory: '620Mi',
156+
cpu: '500m',
157+
memory: '575Mi',
158158
};
159159
const apiLimits: pulumi.Input<{ memory: string }> = {
160160
memory: `${memory}Mi`,
161161
};
162162

163163
const wsMemory = 1280;
164164
const wsRequests: pulumi.Input<{ cpu: string; memory: string }> = {
165-
cpu: '300m',
165+
cpu: '75m',
166166
memory: '800Mi',
167167
};
168168
const wsLimits: pulumi.Input<{
@@ -341,7 +341,7 @@ if (isAdhocEnv) {
341341
requests: apiRequests,
342342
readinessProbe,
343343
livenessProbe,
344-
metric: { type: 'memory_cpu', cpu: 80, memory: 130 },
344+
metric: { type: 'memory_cpu', cpu: 120, memory: 130 },
345345
createService: true,
346346
enableCdn: true,
347347
disableLifecycle: true,
@@ -366,15 +366,15 @@ if (isAdhocEnv) {
366366
env: [
367367
nodeOptions(wsMemory),
368368
{ name: 'ENABLE_SUBSCRIPTIONS', value: 'true' },
369+
...commonEnv,
370+
...jwtEnv,
369371
{
370372
name: 'SERVICE_NAME',
371-
value: `${envVars.serviceName as string}-bg`,
373+
value: `${envVars.serviceName as string}-ws`,
372374
},
373-
...commonEnv,
374-
...jwtEnv,
375375
],
376376
args: ['dumb-init', 'node', 'bin/cli', 'websocket'],
377-
minReplicas: 3,
377+
minReplicas: 2,
378378
maxReplicas: 10,
379379
limits: wsLimits,
380380
requests: wsRequests,
@@ -388,7 +388,14 @@ if (isAdhocEnv) {
388388
},
389389
{
390390
nameSuffix: 'bg',
391-
env: [...commonEnv, ...jwtEnv],
391+
env: [
392+
...commonEnv,
393+
...jwtEnv,
394+
{
395+
name: 'SERVICE_NAME',
396+
value: `${envVars.serviceName as string}-bg`,
397+
},
398+
],
392399
args: ['dumb-init', 'node', 'bin/cli', 'background'],
393400
minReplicas: 3,
394401
maxReplicas: 10,
@@ -430,6 +437,10 @@ if (isAdhocEnv) {
430437
{ name: 'ENABLE_PRIVATE_ROUTES', value: 'true' },
431438
...commonEnv,
432439
...jwtEnv,
440+
{
441+
name: 'SERVICE_NAME',
442+
value: `${envVars.serviceName as string}-private`,
443+
},
433444
],
434445
minReplicas: 2,
435446
maxReplicas: 2,

0 commit comments

Comments
 (0)