From f0c400235ae52da2a9a8dde67aaacbf4916ca0ff Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Fri, 28 Aug 2020 15:18:48 -0400 Subject: [PATCH] Add memory request to pinniped deployment - We are not setting an upper limit because Kubernetes might randomly decide to unschedule our pod in ways that we can't anticipate in advance, causing very hard to reproduce production bugs. - We noticed that our app currently uses ~30 MB of memory when idle, and ~35 MB of memory under some load. So a memory request of 128 MB should be reasonable. Signed-off-by: Andrew Keesler --- deploy/deployment.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index 9271bc8e..913450fb 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -50,7 +50,6 @@ data: .dockerconfigjson: #@ data.values.image_pull_dockerconfigjson #@ end --- -#! TODO set resource minimums (e.g. 512MB RAM) to make sure we get scheduled onto a reasonable node? apiVersion: apps/v1 kind: Deployment metadata: @@ -83,6 +82,9 @@ spec: image: #@ data.values.image_repo + ":" + data.values.image_tag #@ end imagePullPolicy: IfNotPresent + resources: + requests: + memory: "128Mi" args: - --config=/etc/config/pinniped.yaml - --downward-api-path=/etc/podinfo