Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions apps/kubernetes-provider/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ const UPTIME_MAX_PENDING_RUNS = Number(process.env.UPTIME_MAX_PENDING_RUNS || "2
const UPTIME_MAX_PENDING_INDECES = Number(process.env.UPTIME_MAX_PENDING_INDECES || "10");
const UPTIME_MAX_PENDING_ERRORS = Number(process.env.UPTIME_MAX_PENDING_ERRORS || "10");

const POD_EPHEMERAL_STORAGE_SIZE_LIMIT = process.env.POD_EPHEMERAL_STORAGE_SIZE_LIMIT || "10Gi";
const POD_EPHEMERAL_STORAGE_SIZE_REQUEST = process.env.POD_EPHEMERAL_STORAGE_SIZE_REQUEST || "2Gi";

const logger = new SimpleLogger(`[${NODE_NAME}]`);
logger.log(`running in ${RUNTIME_ENV} mode`);

Expand Down Expand Up @@ -108,7 +111,7 @@ class KubernetesTaskOperations implements TaskOperations {
limits: {
cpu: "1",
memory: "2G",
"ephemeral-storage": "2Gi",
"ephemeral-storage": POD_EPHEMERAL_STORAGE_SIZE_LIMIT,
},
},
lifecycle: {
Expand Down Expand Up @@ -338,7 +341,10 @@ class KubernetesTaskOperations implements TaskOperations {
limits: {
cpu: "0.25",
memory: "100Mi",
"ephemeral-storage": "1Gi",
"ephemeral-storage": POD_EPHEMERAL_STORAGE_SIZE_LIMIT,
},
requests: {
"ephemeral-storage": POD_EPHEMERAL_STORAGE_SIZE_REQUEST,
},
},
},
Expand Down Expand Up @@ -396,13 +402,13 @@ class KubernetesTaskOperations implements TaskOperations {

get #defaultResourceRequests(): ResourceQuantities {
return {
"ephemeral-storage": "2Gi",
"ephemeral-storage": POD_EPHEMERAL_STORAGE_SIZE_REQUEST,
};
}

get #defaultResourceLimits(): ResourceQuantities {
return {
"ephemeral-storage": "10Gi",
"ephemeral-storage": POD_EPHEMERAL_STORAGE_SIZE_LIMIT,
};
}

Expand Down
Loading
Loading