feat: allow all network properties to be globally set

Global settings are cool if managed in a standard way (ugh env vars) so we'll add them back for golang plugins as necessary.
This commit is contained in:
Jose Diaz-Gonzalez
2021-03-22 17:13:54 -04:00
parent 84907be0cd
commit 8d26d06f5e
5 changed files with 210 additions and 41 deletions

View File

@@ -20,9 +20,7 @@ func attachAppToNetwork(containerID string, networkName string, appName string,
}
if phase == "deploy" {
property := "tld"
defaultValue := GetDefaultValue(property)
tld := common.PropertyGetDefault("network", appName, property, defaultValue)
tld := reportComputedTld(appName)
networkAlias := fmt.Sprintf("%v.%v", appName, processType)
if tld != "" {
@@ -62,14 +60,13 @@ func isConflictingPropertyValue(appName string, property string, value string) b
return false
}
otherProperty := "attach-post-create"
if property == otherProperty {
otherProperty = "attach-post-deploy"
otherValue := ""
if property == "attach-post-create" {
otherValue = reportComputedAttachPostDeploy(appName)
} else {
otherValue = reportComputedAttachPostCreate(appName)
}
defaultValue := GetDefaultValue(otherProperty)
otherValue := common.PropertyGetDefault("network", appName, otherProperty, defaultValue)
return value == otherValue
}