feat: use ports-clear plugn trigger to manage clearing the port map
This removes any access to the underlying implementation for port map clearing, which will make it easier to refactor the actual clearing.
This commit is contained in:
1 parent
fb9d77878d
commit
1431724b85
12 files changed
+45
-8
No files matched your search
@@ -20,6 +20,13 @@ func addPortMaps(appName string, portMaps []PortMap) error {
|
||||
return setPortMaps(appName, allPortMaps)
|
||||
}
|
||||
|
||||
func clearPorts(appName string) error {
|
||||
return common.EnvWrap(func() error {
|
||||
keys := []string{"DOKKU_PROXY_PORT_MAP"}
|
||||
return config.UnsetMany(appName, keys, false)
|
||||
}, map[string]string{"DOKKU_QUIET_OUTPUT": "1"})
|
||||
}
|
||||
|
||||
func filterAppPortMaps(appName string, scheme string, hostPort int) []PortMap {
|
||||
var filteredPortMaps []PortMap
|
||||
for _, portMap := range getPortMaps(appName) {
|
||||
|
||||
Reference in new issue
Block a user