Skip to content

Commit e36e3d5

Browse files
authored
Make ephemeral storage defaults configurable via env vars (#1407)
* Added support for the env vars `POD_EPHEMERAL_STORAGE_SIZE_LIMIT` and `POD_EPHEMERAL_STORAGE_SIZE_REQUEST` * Reverted pnpm lockfile * Made sure there is no diff between the main lockfile & PR's lockfile * Not touching the storage for the index containers * Not touching the storage for the prePull container
1 parent be7790b commit e36e3d5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/kubernetes-provider/src/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ const UPTIME_MAX_PENDING_RUNS = Number(process.env.UPTIME_MAX_PENDING_RUNS || "2
3434
const UPTIME_MAX_PENDING_INDECES = Number(process.env.UPTIME_MAX_PENDING_INDECES || "10");
3535
const UPTIME_MAX_PENDING_ERRORS = Number(process.env.UPTIME_MAX_PENDING_ERRORS || "10");
3636

37+
const POD_EPHEMERAL_STORAGE_SIZE_LIMIT = process.env.POD_EPHEMERAL_STORAGE_SIZE_LIMIT || "10Gi";
38+
const POD_EPHEMERAL_STORAGE_SIZE_REQUEST = process.env.POD_EPHEMERAL_STORAGE_SIZE_REQUEST || "2Gi";
39+
3740
const logger = new SimpleLogger(`[${NODE_NAME}]`);
3841
logger.log(`running in ${RUNTIME_ENV} mode`);
3942

@@ -396,13 +399,13 @@ class KubernetesTaskOperations implements TaskOperations {
396399

397400
get #defaultResourceRequests(): ResourceQuantities {
398401
return {
399-
"ephemeral-storage": "2Gi",
402+
"ephemeral-storage": POD_EPHEMERAL_STORAGE_SIZE_REQUEST,
400403
};
401404
}
402405

403406
get #defaultResourceLimits(): ResourceQuantities {
404407
return {
405-
"ephemeral-storage": "10Gi",
408+
"ephemeral-storage": POD_EPHEMERAL_STORAGE_SIZE_LIMIT,
406409
};
407410
}
408411

0 commit comments

Comments
 (0)