From 1176f318ca7b62e042463f94fb426a948b49ed16 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Mon, 23 Oct 2023 10:59:30 +0100 Subject: [PATCH 1/3] Force Resource limits to Strings fixes #121 --- kubernetes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes.js b/kubernetes.js index d801253..02e1a3c 100644 --- a/kubernetes.js +++ b/kubernetes.js @@ -271,10 +271,10 @@ const createDeployment = async (project, options) => { 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 }) + localPod.spec.containers[0].env.push({ name: 'FORGE_MEMORY_LIMIT', value: stack.memory.toString() }) } if (stack.cpu) { - localPod.spec.containers[0].env.push({ name: 'FORGE_CPU_LIMIT', value: stack.cpu }) + localPod.spec.containers[0].env.push({ name: 'FORGE_CPU_LIMIT', value: stack.cpu.toString() }) } const credentialSecret = await project.getSetting('credentialSecret') From e06ef96107d846c0fb45f278633a9b6499da6339 Mon Sep 17 00:00:00 2001 From: Pez Cuckow Date: Mon, 23 Oct 2023 12:42:38 +0200 Subject: [PATCH 2/3] Update kubernetes.js Co-authored-by: Ben Hardill --- kubernetes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes.js b/kubernetes.js index 02e1a3c..80f11a7 100644 --- a/kubernetes.js +++ b/kubernetes.js @@ -271,7 +271,7 @@ const createDeployment = async (project, options) => { 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.toString() }) + 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.toString() }) From 9fda5fe07711dfceaf15f386a8a53449276df99f Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Mon, 23 Oct 2023 11:43:12 +0100 Subject: [PATCH 3/3] Update kubernetes.js Co-authored-by: Pez Cuckow --- kubernetes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes.js b/kubernetes.js index 80f11a7..e96e13b 100644 --- a/kubernetes.js +++ b/kubernetes.js @@ -274,7 +274,7 @@ const createDeployment = async (project, options) => { 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.toString() }) + localPod.spec.containers[0].env.push({ name: 'FORGE_CPU_LIMIT', value: `${stack.cpu}` }) } const credentialSecret = await project.getSetting('credentialSecret')