Skip to content

Commit ec072bb

Browse files
committed
add env var to disable pre-pulls
1 parent 99d3815 commit ec072bb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apps/kubernetes-provider/src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ const UPTIME_MAX_PENDING_ERRORS = Number(process.env.UPTIME_MAX_PENDING_ERRORS |
3737
const POD_EPHEMERAL_STORAGE_SIZE_LIMIT = process.env.POD_EPHEMERAL_STORAGE_SIZE_LIMIT || "10Gi";
3838
const POD_EPHEMERAL_STORAGE_SIZE_REQUEST = process.env.POD_EPHEMERAL_STORAGE_SIZE_REQUEST || "2Gi";
3939

40+
const PRE_PULL_DISABLED = process.env.PRE_PULL_DISABLED === "true";
41+
4042
const logger = new SimpleLogger(`[${NODE_NAME}]`);
4143
logger.log(`running in ${RUNTIME_ENV} mode`);
4244

@@ -301,6 +303,11 @@ class KubernetesTaskOperations implements TaskOperations {
301303
}
302304

303305
async prePullDeployment(opts: TaskOperationsPrePullDeploymentOptions) {
306+
if (PRE_PULL_DISABLED) {
307+
logger.debug("Pre-pull is disabled, skipping.", { opts });
308+
return;
309+
}
310+
304311
const metaName = this.#getPrePullContainerName(opts.shortCode);
305312

306313
const metaLabels = {

0 commit comments

Comments
 (0)