You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/yaml.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -319,10 +319,20 @@ Example of setting a custom HTTP health check path and initial check delay:
319
319
320
320
Applying memory and CPU limits can be done through the `limits` and `requests` [fields](https://godoc.org/github.com/openfaas/faas-cli/stack#FunctionResources). It is advisable to always set a limit for your functions to prevent them consuming too many resources in your system.
321
321
322
-
> Important note: The value for memory for Kubernetes needs to be in the format "Mi".
322
+
When using OpenFaaS on Kubernetes:
323
+
324
+
- Requests ensure the stated host resource is available for the container to use.
325
+
- Limits specify the maximum amount of host resources that a container can consume.
326
+
327
+
On OpenFaaS Edge:
328
+
329
+
- Limits specify the maximum amount of host resources that a container can consume.
330
+
- Setting requests is not supported. Any requests set on functions will be ignored.
323
331
324
332
Here we constrain the url-ping function to only use 40Mb of RAM at a maximum.
325
333
334
+
> Important note: The value for memory for Kubernetes needs to be in the format "Mi".
335
+
326
336
```YAML
327
337
url-ping:
328
338
lang: python
@@ -347,11 +357,6 @@ Here we constrain a function to use only `100m` which is equivalent to 1/10 of [
347
357
cpu: 100m
348
358
```
349
359
350
-
The meanings and formats of `limits` and `requests` may vary depending on whether you are using Kubernetes or Docker Swarm. In general:
351
-
352
-
- Requests ensures the stated host resource is available for the container to use
353
-
- Limits specify the maximum amount of host resources that a container can consume
354
-
355
360
Read more for: [Kubernetes](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#how-pods-with-resource-limits-are-run).
0 commit comments