feat: add the ability to set the haproxy log level

This commit is contained in:
Jose Diaz-Gonzalez
2022-11-06 00:26:48 -04:00
parent 8bd4f66bec
commit fd09beaf48
5 changed files with 23 additions and 4 deletions

View File

@@ -9,13 +9,13 @@ cmd-haproxy-set() {
declare cmd="haproxy:set"
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1" KEY="$2" VALUE="$3"
local VALID_KEYS=("image")
local GLOBAL_KEYS=("image")
local VALID_KEYS=("image" "log-level")
local GLOBAL_KEYS=("image" "log-level")
[[ -z "$KEY" ]] && dokku_log_fail "No key specified"
if ! fn-in-array "$KEY" "${VALID_KEYS[@]}"; then
dokku_log_fail "Invalid key specified, valid keys include: image"
dokku_log_fail "Invalid key specified, valid keys include: image log-level"
fi
if ! fn-in-array "$KEY" "${GLOBAL_KEYS[@]}"; then