From 2448a3aa4eb895c3c7e0c23ec01596df120e12de Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Tue, 17 Oct 2023 14:46:56 +0100 Subject: [PATCH] Expose mem/cpu limits --- kubernetes.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kubernetes.js b/kubernetes.js index e698462..49997f0 100644 --- a/kubernetes.js +++ b/kubernetes.js @@ -269,6 +269,12 @@ const createDeployment = async (project, options) => { if (this._app.license.active()) { localPod.spec.containers[0].env.push({ name: 'FORGE_LICENSE_TYPE', value: 'ee' }) } + if (stack.memory) { + localPod.spec.containers[0].env.push({ name: 'FORGE_MEMORY_LIMIT', value: stack.memory }) + } + if (stack.cpu) { + localPod.spec.containers[0].env.push({ name: 'FORGE_CPU_LIMIT', value: stack.cpu }) + } const credentialSecret = await project.getSetting('credentialSecret') if (credentialSecret) {