chore: remove deprecated proxy-ports functions and and plugin subcommands
These were deprecated in 0.31.0 in favor of the ports plugin.
This commit is contained in:
@@ -1 +0,0 @@
|
||||
hook
|
||||
@@ -758,12 +758,6 @@ docker_cleanup() {
|
||||
"$PLUGIN_CORE_AVAILABLE_PATH/common/common" --quiet docker-cleanup "$APP"
|
||||
}
|
||||
|
||||
get_available_port() {
|
||||
declare desc="returns first currently unused port > 1024"
|
||||
dokku_log_warn "Deprecated: please use the 'ports-get-available' plugin trigger instead"
|
||||
plugn trigger ports-get-available
|
||||
}
|
||||
|
||||
dokku_auth() {
|
||||
declare desc="calls user-auth plugin trigger"
|
||||
export SSH_USER=${SSH_USER:=$USER}
|
||||
@@ -827,25 +821,6 @@ get_ipv6_regex() {
|
||||
echo "${RE_IPV6}\$"
|
||||
}
|
||||
|
||||
get_dockerfile_exposed_ports() {
|
||||
declare desc="return all exposed ports from passed file path"
|
||||
dokku_log_warn "Deprecated: this function should not be used in app code"
|
||||
|
||||
local DOCKERFILE_PORTS=$(grep -E "^EXPOSE " "$1" | awk '{ print $2 }' | xargs) || true
|
||||
echo "$DOCKERFILE_PORTS"
|
||||
}
|
||||
|
||||
get_exposed_ports_from_image() {
|
||||
declare desc="return all exposed ports from passed image name"
|
||||
dokku_log_warn "Deprecated: this function should not be used in app code"
|
||||
|
||||
local IMAGE="$1"
|
||||
verify_image "$IMAGE"
|
||||
# shellcheck disable=SC2016
|
||||
local DOCKER_IMAGE_EXPOSED_PORTS="$("$DOCKER_BIN" image inspect --format '{{range $key, $value := .Config.ExposedPorts}}{{$key}} {{end}}' "$IMAGE")"
|
||||
echo "$DOCKER_IMAGE_EXPOSED_PORTS"
|
||||
}
|
||||
|
||||
get_entrypoint_from_image() {
|
||||
declare desc="return .Config.Entrypoint from passed image name"
|
||||
local IMAGE="$1"
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-ports-proxy-configure-ports() {
|
||||
declare desc="ports proxy-configure-ports plugin trigger"
|
||||
declare trigger="proxy-configure-ports"
|
||||
declare APP="$1"
|
||||
|
||||
dokku_log_warn "Deprecated: please use the 'ports-configure' plugin trigger instead"
|
||||
plugn trigger ports-configure "$APP"
|
||||
}
|
||||
|
||||
trigger-ports-proxy-configure-ports "$@"
|
||||
@@ -5,7 +5,6 @@ go 1.19
|
||||
require (
|
||||
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
|
||||
github.com/dokku/dokku/plugins/config v0.0.0-00010101000000-000000000000
|
||||
github.com/dokku/dokku/plugins/ports v0.0.0-00010101000000-000000000000
|
||||
github.com/spf13/pflag v1.0.5
|
||||
)
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
"github.com/dokku/dokku/plugins/ports"
|
||||
"github.com/dokku/dokku/plugins/proxy"
|
||||
|
||||
flag "github.com/spf13/pflag"
|
||||
@@ -46,39 +45,6 @@ func main() {
|
||||
args.Parse(os.Args[2:])
|
||||
appName := args.Arg(0)
|
||||
err = proxy.CommandEnable(appName, *allApps, *parallelCount)
|
||||
case "ports":
|
||||
args := flag.NewFlagSet("proxy:ports", flag.ExitOnError)
|
||||
args.Parse(os.Args[2:])
|
||||
appName := args.Arg(0)
|
||||
common.LogWarn("Deprecated: Use 'ports:list' instead")
|
||||
err = ports.CommandList(appName)
|
||||
case "ports-add":
|
||||
args := flag.NewFlagSet("proxy:ports-add", flag.ExitOnError)
|
||||
args.Parse(os.Args[2:])
|
||||
appName := args.Arg(0)
|
||||
_, portMaps := common.ShiftString(args.Args())
|
||||
common.LogWarn("Deprecated: Use 'ports:add' instead")
|
||||
err = ports.CommandAdd(appName, portMaps)
|
||||
case "ports-clear":
|
||||
args := flag.NewFlagSet("proxy:ports-clear", flag.ExitOnError)
|
||||
args.Parse(os.Args[2:])
|
||||
appName := args.Arg(0)
|
||||
common.LogWarn("Deprecated: Use 'ports:clear' instead")
|
||||
err = ports.CommandClear(appName)
|
||||
case "ports-remove":
|
||||
args := flag.NewFlagSet("proxy:ports-remove", flag.ExitOnError)
|
||||
args.Parse(os.Args[2:])
|
||||
appName := args.Arg(0)
|
||||
_, portMaps := common.ShiftString(args.Args())
|
||||
common.LogWarn("Deprecated: Use 'ports:remove' instead")
|
||||
err = ports.CommandRemove(appName, portMaps)
|
||||
case "ports-set":
|
||||
args := flag.NewFlagSet("proxy:ports-set", flag.ExitOnError)
|
||||
args.Parse(os.Args[2:])
|
||||
appName := args.Arg(0)
|
||||
_, portMaps := common.ShiftString(args.Args())
|
||||
common.LogWarn("Deprecated: Use 'ports:set' instead")
|
||||
err = ports.CommandSet(appName, portMaps)
|
||||
case "report":
|
||||
args := flag.NewFlagSet("proxy:report", flag.ExitOnError)
|
||||
format := args.String("format", "stdout", "format: [ stdout | json ]")
|
||||
|
||||
Reference in New Issue
Block a user