Skip to content

Commit f83362c

Browse files
committed
docs(limits-cmd): update limits:set usage document
1 parent 2b66e1e commit f83362c

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

parser/limits.go

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,24 @@ Options:
6161

6262
func limitSet(argv []string, cmdr cmd.Commander) error {
6363
usage := `
64-
Sets resource limits for an application.
64+
Sets resource requests and limits for an application.
6565
6666
A resource limit is a finite resource within a pod which we can apply
67-
restrictions through Kubernetes. This limit is applied to each individual
68-
pod, so setting a memory limit of 1G for an application means that each
69-
pod gets 1G of memory.
67+
restrictions through Kubernetes. A resource request is used by Kubernetes scheduler
68+
to select a node that can guarantee requested resource. If provided only one value,
69+
it'll be default by Kubernetes as both request and limit. These request and limit
70+
are applied to each individual pod, so setting a memory limit of 1G for an application
71+
means that each pod gets 1G of memory. Value needs to be within 0 <= request <= limit
7072
71-
Usage: deis limits:set [options] <type>=<limit>...
73+
Usage: deis limits:set [options] <type>=<value>...
7274
7375
Arguments:
7476
<type>
7577
the process type as defined in your Procfile, such as 'web' or 'worker'.
7678
Note that Dockerfile apps have a default 'cmd' process type.
77-
<limit>
78-
The limit to apply to the process type. By default, this is set to --memory.
79+
<value>
80+
The value to apply to the process type. By default, this is set to --memory.
81+
Can be in <limit> or <request>/<limit> format eg. web=2G db=1G/2G
7982
You can only set one type of limit per call.
8083
8184
With --memory, units are represented in Bytes (B), Kilobytes (K), Megabytes
@@ -92,9 +95,9 @@ Options:
9295
-a --app=<app>
9396
the uniquely identifiable name for the application.
9497
--cpu
95-
limits CPU.
98+
value apply to CPU.
9699
-m --memory
97-
limits memory. [default: true]
100+
value apply to memory. [default: true]
98101
`
99102

100103
args, err := docopt.Parse(usage, argv, true, "", false, true)
@@ -104,7 +107,7 @@ Options:
104107
}
105108

106109
app := safeGetValue(args, "--app")
107-
limits := args["<type>=<limit>"].([]string)
110+
limits := args["<type>=<value>"].([]string)
108111
limitType := "memory"
109112

110113
if args["--cpu"].(bool) {

0 commit comments

Comments
 (0)