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 <akeesler@vmware.com>
This commit is contained in:
Ryan Richard 2020-08-28 15:18:48 -04:00 committed by Andrew Keesler
parent 371b172616
commit f0c400235a
No known key found for this signature in database
GPG Key ID: 27CE0444346F9413
1 changed files with 3 additions and 1 deletions

View File

@ -50,7 +50,6 @@ data:
.dockerconfigjson: #@ data.values.image_pull_dockerconfigjson .dockerconfigjson: #@ data.values.image_pull_dockerconfigjson
#@ end #@ end
--- ---
#! TODO set resource minimums (e.g. 512MB RAM) to make sure we get scheduled onto a reasonable node?
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@ -83,6 +82,9 @@ spec:
image: #@ data.values.image_repo + ":" + data.values.image_tag image: #@ data.values.image_repo + ":" + data.values.image_tag
#@ end #@ end
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
resources:
requests:
memory: "128Mi"
args: args:
- --config=/etc/config/pinniped.yaml - --config=/etc/config/pinniped.yaml
- --downward-api-path=/etc/podinfo - --downward-api-path=/etc/podinfo