mirror of
https://github.com/dokku/dokku.git
synced 2026-07-11 13:01:51 +02:00
Adds the missing raw/global/computed report keys for ten settable properties across the ps, builder, scheduler, proxy, openresty, nginx, and scheduler-k3s plugins so external tooling can verify drift through `:report --format json`. The scheduler-k3s `token` is masked as `*******` in default stdout output and only unmasked when the report is requested via `--format json` or when the flag is queried explicitly by name; the same explicit-query unmasking rule is extended to the existing traefik `dns-provider-<env_var>` keys.
73 lines
1.4 KiB
Go
73 lines
1.4 KiB
Go
package proxy
|
|
|
|
import (
|
|
"github.com/dokku/dokku/plugins/common"
|
|
)
|
|
|
|
func getAppProxyType(appName string) string {
|
|
return common.PropertyGet("proxy", appName, "type")
|
|
}
|
|
|
|
func getComputedProxyType(appName string) string {
|
|
proxyType := getAppProxyType(appName)
|
|
if proxyType == "" {
|
|
proxyType = getGlobalProxyType()
|
|
}
|
|
if proxyType == "" {
|
|
proxyType = "nginx"
|
|
}
|
|
|
|
return proxyType
|
|
}
|
|
|
|
func getGlobalProxyType() string {
|
|
return common.PropertyGet("proxy", "--global", "type")
|
|
}
|
|
|
|
func getAppProxyPort(appName string) string {
|
|
return common.PropertyGet("proxy", appName, "proxy-port")
|
|
}
|
|
|
|
func getGlobalProxyPort() string {
|
|
return common.PropertyGet("proxy", "--global", "proxy-port")
|
|
}
|
|
|
|
func getComputedProxyPort(appName string) string {
|
|
value := getAppProxyPort(appName)
|
|
if value == "" {
|
|
value = getGlobalProxyPort()
|
|
}
|
|
|
|
return value
|
|
}
|
|
|
|
func getAppProxySSLPort(appName string) string {
|
|
return common.PropertyGet("proxy", appName, "proxy-ssl-port")
|
|
}
|
|
|
|
func getGlobalProxySSLPort() string {
|
|
return common.PropertyGet("proxy", "--global", "proxy-ssl-port")
|
|
}
|
|
|
|
func getComputedProxySSLPort(appName string) string {
|
|
value := getAppProxySSLPort(appName)
|
|
if value == "" {
|
|
value = getGlobalProxySSLPort()
|
|
}
|
|
|
|
return value
|
|
}
|
|
|
|
func getAppDisabled(appName string) string {
|
|
return common.PropertyGet("proxy", appName, "disabled")
|
|
}
|
|
|
|
func getComputedDisabled(appName string) string {
|
|
value := getAppDisabled(appName)
|
|
if value == "" {
|
|
value = "false"
|
|
}
|
|
|
|
return value
|
|
}
|