feat: add message indicating that the user is looking at default limits/reservations
Without this bit of metadata, it appears to the user that the resource limits are just that, whereas this is actually scoped to per-process-type.
This commit is contained in:
@@ -70,11 +70,31 @@ dokku resource:limit --cpu 100 --memory 100 --process-type worker node-js-app
|
|||||||
|
|
||||||
#### Displaying Resource Limits
|
#### Displaying Resource Limits
|
||||||
|
|
||||||
Running the `resource:limits` command without any flags will display the currently configured app reservation.
|
Running the `resource:limit` command without any flags will display the currently configured default app limits.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku resource:limits node-js-app
|
dokku resource:limit node-js-app
|
||||||
=====> resource limits node-js-app information
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> resource limits node-js-app information [defaults]
|
||||||
|
cpu:
|
||||||
|
memory:
|
||||||
|
memory-swap: 100
|
||||||
|
network: 100
|
||||||
|
network-ingress:
|
||||||
|
network-egress:
|
||||||
|
```
|
||||||
|
|
||||||
|
This may also be combined with the `--process-type` flag to see app limits on a process-type level. Note that the displayed values are not merged with the defaults.
|
||||||
|
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku resource:limit --process-type web node-js-app
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> resource limits node-js-app information (web)
|
||||||
cpu: 100
|
cpu: 100
|
||||||
memory: 100
|
memory: 100
|
||||||
memory-swap:
|
memory-swap:
|
||||||
@@ -146,11 +166,30 @@ dokku resource:reserve --cpu 100 --memory 100 --process-type worker node-js-app
|
|||||||
|
|
||||||
#### Displaying Resource Reservations
|
#### Displaying Resource Reservations
|
||||||
|
|
||||||
Running the `resource:reserve` command without any flags will display the currently configured app reservation.
|
Running the `resource:reserve` command without any flags will display the currently configured default app reservations.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku resource:reserve node-js-app
|
dokku resource:reserve node-js-app
|
||||||
=====> resource reservation node-js-app information
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> resource reservation node-js-app information [defaults]
|
||||||
|
cpu: 100
|
||||||
|
memory: 100
|
||||||
|
memory-swap:
|
||||||
|
network:
|
||||||
|
network-ingress:
|
||||||
|
network-egress:
|
||||||
|
```
|
||||||
|
|
||||||
|
This may also be combined with the `--process-type` flag to see app reservations on a process-type level. Note that the displayed values are not merged with the defaults.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku resource:reserve --process-type web node-js-app
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> resource reservation node-js-app information (web)
|
||||||
cpu: 100
|
cpu: 100
|
||||||
memory: 100
|
memory: 100
|
||||||
memory-swap:
|
memory-swap:
|
||||||
|
|||||||
@@ -142,7 +142,9 @@ func reportResourceType(appName string, processType string, resourceType string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
message := fmt.Sprintf("resource %v %v information", noun, appName)
|
message := fmt.Sprintf("resource %v %v information", noun, appName)
|
||||||
if processType != "_default_" {
|
if processType == "_default_" {
|
||||||
|
message = fmt.Sprintf("%v [defaults]", message)
|
||||||
|
} else {
|
||||||
message = fmt.Sprintf("%v (%v)", message, processType)
|
message = fmt.Sprintf("%v (%v)", message, processType)
|
||||||
}
|
}
|
||||||
common.LogInfo2Quiet(message)
|
common.LogInfo2Quiet(message)
|
||||||
|
|||||||
Reference in New Issue
Block a user