feat: split openresty report into raw/computed/global
Exposes raw, global, and computed report flags for every openresty per-app property and allows those properties to be set with `--global`, so external tooling can distinguish a property that was never set from one left at its built-in default. The computed value resolves the per-app value first, then the global value, then the default. Also corrects `client-header-timeout` which read the `client-body-timeout` key and sets the computed `client-max-body-size` default to `1m`.
This commit is contained in:
@@ -141,27 +141,27 @@ trigger-openresty-vhosts-docker-args-process-deploy() {
|
||||
|
||||
output="$output '--label=openresty.letsencrypt=$letsencrypt_value'"
|
||||
|
||||
value="$(fn-openresty-access-log-format "$APP")"
|
||||
value="$(fn-openresty-computed-access-log-format "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.access-log-format=$value'"
|
||||
value="$(fn-openresty-access-log-path "$APP")"
|
||||
value="$(fn-openresty-computed-access-log-path "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.access-log-path=$value'"
|
||||
value="$(fn-openresty-bind-address-ipv4 "$APP")"
|
||||
value="$(fn-openresty-computed-bind-address-ipv4 "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.bind-address-ipv4=$value'"
|
||||
value="$(fn-openresty-bind-address-ipv6 "$APP")"
|
||||
value="$(fn-openresty-computed-bind-address-ipv6 "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.bind-address-ipv6=$value'"
|
||||
value="$(fn-openresty-client-body-timeout "$APP")"
|
||||
value="$(fn-openresty-computed-client-body-timeout "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.client-body-timeout=$value'"
|
||||
value="$(fn-openresty-client-header-timeout "$APP")"
|
||||
value="$(fn-openresty-computed-client-header-timeout "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.client-header-timeout=$value'"
|
||||
value="$(fn-openresty-client-max-body-size "$APP")"
|
||||
value="$(fn-openresty-computed-client-max-body-size "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.client-max-body-size=$value'"
|
||||
value="$(fn-openresty-error-log-path "$APP")"
|
||||
value="$(fn-openresty-computed-error-log-path "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.error-log-path=$value'"
|
||||
value="$(fn-openresty-hsts-include-subdomains "$APP")"
|
||||
value="$(fn-openresty-computed-hsts-include-subdomains "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.hsts-include-subdomains=$value'"
|
||||
value="$(fn-openresty-hsts-max-age "$APP")"
|
||||
value="$(fn-openresty-computed-hsts-max-age "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.hsts-max-age=$value'"
|
||||
value="$(fn-openresty-hsts-preload "$APP")"
|
||||
value="$(fn-openresty-computed-hsts-preload "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.hsts-preload=$value'"
|
||||
value="$(fn-openresty-hsts-is-enabled "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.hsts=$value'"
|
||||
@@ -171,39 +171,39 @@ trigger-openresty-vhosts-docker-args-process-deploy() {
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.domains=$value'"
|
||||
value="$(plugn trigger network-get-property "$APP" initial-network)"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.initial-network=$value'"
|
||||
value="$(fn-openresty-keepalive-timeout "$APP")"
|
||||
value="$(fn-openresty-computed-keepalive-timeout "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.keepalive-timeout=$value'"
|
||||
value="$(fn-openresty-lingering-timeout "$APP")"
|
||||
value="$(fn-openresty-computed-lingering-timeout "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.lingering-timeout=$value'"
|
||||
value="$(echo "$APP_PORT_MAP" | xargs)"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.port-mapping=$value'"
|
||||
value="$(fn-openresty-proxy-buffer-size "$APP")"
|
||||
value="$(fn-openresty-computed-proxy-buffer-size "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.proxy-buffer-size=$value'"
|
||||
value="$(fn-openresty-proxy-buffering "$APP")"
|
||||
value="$(fn-openresty-computed-proxy-buffering "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.proxy-buffering=$value'"
|
||||
value="$(fn-openresty-proxy-buffers "$APP")"
|
||||
value="$(fn-openresty-computed-proxy-buffers "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.proxy-buffers=$value'"
|
||||
value="$(fn-openresty-proxy-busy-buffers-size "$APP")"
|
||||
value="$(fn-openresty-computed-proxy-busy-buffers-size "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.proxy-busy-buffer-size=$value'"
|
||||
value="$(fn-openresty-proxy-connect-timeout "$APP")"
|
||||
value="$(fn-openresty-computed-proxy-connect-timeout "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.proxy-connect-timeout=$value'"
|
||||
value="$(fn-openresty-proxy-read-timeout "$APP")"
|
||||
value="$(fn-openresty-computed-proxy-read-timeout "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.proxy-read-timeout=$value'"
|
||||
value="$(fn-openresty-proxy-send-timeout "$APP")"
|
||||
value="$(fn-openresty-computed-proxy-send-timeout "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.proxy-send-timeout=$value'"
|
||||
value="$(fn-openresty-send-timeout "$APP")"
|
||||
value="$(fn-openresty-computed-send-timeout "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.send-timeout=$value'"
|
||||
value="$(fn-openresty-send-timeout "$APP")"
|
||||
value="$(fn-openresty-computed-send-timeout "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.send-timeout=$value'"
|
||||
value="$(fn-openresty-underscore-in-headers "$APP")"
|
||||
value="$(fn-openresty-computed-underscore-in-headers "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.underscore-in-headers=$value'"
|
||||
value="$(fn-openresty-x-forwarded-for-value "$APP")"
|
||||
value="$(fn-openresty-computed-x-forwarded-for-value "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.x-forwarded-for-value=$value'"
|
||||
value="$(fn-openresty-x-forwarded-port-value "$APP")"
|
||||
value="$(fn-openresty-computed-x-forwarded-port-value "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.x-forwarded-port-value=$value'"
|
||||
value="$(fn-openresty-x-forwarded-proto-value "$APP")"
|
||||
value="$(fn-openresty-computed-x-forwarded-proto-value "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.x-forwarded-proto-value=$value'"
|
||||
value="$(fn-openresty-x-forwarded-ssl "$APP")"
|
||||
value="$(fn-openresty-computed-x-forwarded-ssl "$APP")"
|
||||
[[ -n "$value" ]] && output="$output '--label=openresty.x-forwarded-ssl=$value'"
|
||||
|
||||
local proxy_labels_file_path=$(fn-proxy-get-labels-file-path "openresty" "$APP")
|
||||
|
||||
Reference in New Issue
Block a user