mirror of
https://github.com/dokku/dokku.git
synced 2026-08-29 10:08:53 +02:00
fix: expose remaining settable properties via :report
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.
This commit is contained in:
@@ -17,12 +17,17 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
flags = map[string]common.ReportFunc{
|
||||
"--scheduler-computed-selected": reportComputedSelected,
|
||||
"--scheduler-global-selected": reportGlobalSelected,
|
||||
"--scheduler-computed-shell": reportComputedShell,
|
||||
"--scheduler-global-shell": reportGlobalShell,
|
||||
}
|
||||
} else {
|
||||
flags = map[string]common.ReportFunc{
|
||||
"--scheduler-computed-selected": reportComputedSelected,
|
||||
"--scheduler-global-selected": reportGlobalSelected,
|
||||
"--scheduler-selected": reportSelected,
|
||||
"--scheduler-computed-shell": reportComputedShell,
|
||||
"--scheduler-global-shell": reportGlobalShell,
|
||||
"--scheduler-shell": reportShell,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,3 +61,20 @@ func reportGlobalSelected(appName string) string {
|
||||
func reportSelected(appName string) string {
|
||||
return common.PropertyGet("scheduler", appName, "selected")
|
||||
}
|
||||
|
||||
func reportComputedShell(appName string) string {
|
||||
value := reportShell(appName)
|
||||
if value == "" {
|
||||
value = reportGlobalShell(appName)
|
||||
}
|
||||
|
||||
return value
|
||||
}
|
||||
|
||||
func reportGlobalShell(appName string) string {
|
||||
return common.PropertyGet("scheduler", "--global", "shell")
|
||||
}
|
||||
|
||||
func reportShell(appName string) string {
|
||||
return common.PropertyGet("scheduler", appName, "shell")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user