Merge pull request #8640 from dokku/8631-caddy-haproxy-traefik-report-global-lacks-raw-key-for-global-properties
Split report global keys into raw and computed
This commit is contained in:
@@ -17,11 +17,16 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
var flags map[string]common.ReportFunc
|
||||
if appName == "--global" {
|
||||
flags = map[string]common.ReportFunc{
|
||||
"--network-global-attach-post-create": reportGlobalAttachPostCreate,
|
||||
"--network-global-attach-post-deploy": reportGlobalAttachPostDeploy,
|
||||
"--network-global-bind-all-interfaces": reportGlobalBindAllInterfaces,
|
||||
"--network-global-initial-network": reportGlobalInitialNetwork,
|
||||
"--network-global-tld": reportGlobalTld,
|
||||
"--network-computed-attach-post-create": reportComputedAttachPostCreate,
|
||||
"--network-computed-attach-post-deploy": reportComputedAttachPostDeploy,
|
||||
"--network-computed-bind-all-interfaces": reportComputedBindAllInterfaces,
|
||||
"--network-computed-initial-network": reportComputedInitialNetwork,
|
||||
"--network-computed-tld": reportComputedTld,
|
||||
"--network-global-attach-post-create": reportGlobalAttachPostCreate,
|
||||
"--network-global-attach-post-deploy": reportGlobalAttachPostDeploy,
|
||||
"--network-global-bind-all-interfaces": reportGlobalBindAllInterfaces,
|
||||
"--network-global-initial-network": reportGlobalInitialNetwork,
|
||||
"--network-global-tld": reportGlobalTld,
|
||||
}
|
||||
} else {
|
||||
flags = map[string]common.ReportFunc{
|
||||
@@ -91,6 +96,9 @@ func reportComputedBindAllInterfaces(appName string) string {
|
||||
if value == "" {
|
||||
value = reportGlobalBindAllInterfaces(appName)
|
||||
}
|
||||
if value == "" {
|
||||
value = "false"
|
||||
}
|
||||
|
||||
return value
|
||||
}
|
||||
@@ -122,7 +130,7 @@ func reportGlobalAttachPostDeploy(appName string) string {
|
||||
}
|
||||
|
||||
func reportGlobalBindAllInterfaces(appName string) string {
|
||||
return common.PropertyGetDefault("network", "--global", "bind-all-interfaces", "false")
|
||||
return common.PropertyGet("network", "--global", "bind-all-interfaces")
|
||||
}
|
||||
|
||||
func reportGlobalInitialNetwork(appName string) string {
|
||||
|
||||
Reference in New Issue
Block a user