Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Commit

Permalink
Add memory limits to functions
Browse files Browse the repository at this point in the history
Adding memory limits to functions all except
the dashboard are set to limits.memory 128Mi
requests.memory 64Mi the dashboard's limits
are doubled. All functions have requests.cpu
limit of 50m

Signed-off-by: Martin Dekov <[email protected]>
  • Loading branch information
martindekov authored and alexellis committed Jul 1, 2020
1 parent 0be8582 commit 70ea949
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dashboard/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ functions:
role: openfaas-system
environment_file:
- dashboard_config.yml
limits:
memory: 256Mi
requests:
memory: 64Mi
cpu: 50m
15 changes: 15 additions & 0 deletions gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ functions:
- payload-secret
- gitlab-api-token
- customers
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

gitlab-push:
lang: go
Expand All @@ -44,6 +49,11 @@ functions:
secrets:
- payload-secret
- customers
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

gitlab-status:
lang: go
Expand All @@ -61,3 +71,8 @@ functions:
secrets:
- gitlab-api-token
- payload-secret
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m
65 changes: 65 additions & 0 deletions stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ functions:
- github-webhook-secret
- payload-secret
- customers
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

github-push:
lang: go
Expand All @@ -45,6 +50,11 @@ functions:
- github-webhook-secret
- payload-secret
- customers
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

git-tar:
lang: dockerfile
Expand All @@ -67,6 +77,11 @@ functions:
- private-key
# Uncomment this for GitLab
# - gitlab-api-token
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

buildshiprun:
lang: go
Expand All @@ -91,6 +106,11 @@ functions:
- basic-auth-password
- payload-secret
# - swarm-pull-secret
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

garbage-collect:
lang: go
Expand All @@ -111,6 +131,11 @@ functions:
- basic-auth-user
- basic-auth-password
- payload-secret
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

github-status:
lang: go
Expand All @@ -132,6 +157,11 @@ functions:
secrets:
- private-key
- payload-secret
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

import-secrets:
lang: go
Expand All @@ -150,6 +180,11 @@ functions:
- github.yml
secrets:
- payload-secret
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

pipeline-log:
lang: go
Expand All @@ -169,6 +204,11 @@ functions:
- s3-access-key
- s3-secret-key
- payload-secret
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

list-functions:
lang: go
Expand All @@ -186,6 +226,11 @@ functions:
secrets:
- basic-auth-user
- basic-auth-password
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

audit-event:
lang: go
Expand All @@ -196,6 +241,11 @@ functions:
com.openfaas.scale.zero: false
environment_file:
- slack.yml
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

echo:
skip_build: true
Expand All @@ -207,6 +257,11 @@ functions:
environment:
write_debug: true
read_debug: true
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

metrics:
lang: go
Expand All @@ -220,6 +275,11 @@ functions:
- gateway_config.yml
environment:
content_type: "application/json"
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

function-logs:
lang: go
Expand All @@ -237,5 +297,10 @@ functions:
secrets:
- basic-auth-user
- basic-auth-password
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m


0 comments on commit 70ea949

Please sign in to comment.