fix: split report global keys into raw and computed across plugins
The `<plugin>-global-<property>` keys in `:report` output returned the resolved value with the built-in default substituted in, so external tooling could not distinguish a property that had been set globally to the default from one that had never been set. The bare keys for caddy, haproxy, and traefik global-only properties had the same shape. The `global-<property>` keys now hold the raw stored value and are empty when nothing has been set, and a new `computed-<property>` key holds the effective value used at runtime, falling back through the per-app value (where one exists), the global value, and the built-in default. The bare global-only keys for the three proxy plugins are removed in favor of the raw/computed pair. Closes #8631.
This commit is contained in:
@@ -205,13 +205,20 @@ dokku haproxy:report
|
||||
|
||||
```
|
||||
=====> node-js-app haproxy information
|
||||
Haproxy image: byjg/easy-haproxy:4.0.0
|
||||
=====> python-app haproxy information
|
||||
Haproxy image: byjg/easy-haproxy:4.0.0
|
||||
=====> ruby-app haproxy information
|
||||
Haproxy image: byjg/easy-haproxy:4.0.0
|
||||
Haproxy computed image: byjg/easy-haproxy:4.0.0
|
||||
Haproxy computed letsencrypt email:
|
||||
Haproxy computed letsencrypt server: https://acme-v02.api.letsencrypt.org/directory
|
||||
Haproxy computed log level: ERROR
|
||||
Haproxy computed refresh conf: 10
|
||||
Haproxy global image:
|
||||
Haproxy global letsencrypt email:
|
||||
Haproxy global letsencrypt server:
|
||||
Haproxy global log level:
|
||||
Haproxy global refresh conf:
|
||||
```
|
||||
|
||||
The `global-<prop>` keys hold the raw global value and are empty when nothing has been set globally. The `computed-<prop>` keys hold the effective value used at deploy time, falling back to the built-in default when the global value is empty.
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
@@ -220,11 +227,20 @@ dokku haproxy:report node-js-app
|
||||
|
||||
```
|
||||
=====> node-js-app haproxy information
|
||||
Haproxy image: byjg/easy-haproxy:4.0.0
|
||||
Haproxy computed image: byjg/easy-haproxy:4.0.0
|
||||
Haproxy computed letsencrypt email:
|
||||
Haproxy computed letsencrypt server: https://acme-v02.api.letsencrypt.org/directory
|
||||
Haproxy computed log level: ERROR
|
||||
Haproxy computed refresh conf: 10
|
||||
Haproxy global image:
|
||||
Haproxy global letsencrypt email:
|
||||
Haproxy global letsencrypt server:
|
||||
Haproxy global log level:
|
||||
Haproxy global refresh conf:
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku haproxy:report node-js-app --haproxy-image
|
||||
dokku haproxy:report node-js-app --haproxy-computed-image
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user