refactor: store labels in key=value format

This makes it easier to display at the cost of removing the override warnings (for now).
This commit is contained in:
Jose Diaz-Gonzalez
2025-11-16 18:44:21 -05:00
parent a40c42019b
commit 5df11a0a1f
6 changed files with 37 additions and 60 deletions

View File

@@ -125,12 +125,11 @@ trigger-haproxy-vhosts-docker-args-process-deploy() {
fi
local proxy_labels_file_path=$(fn-proxy-get-labels-file-path "haproxy" "$APP")
fn-proxy-report-label-overwrite "$output" "$proxy_labels_file_path"
if [[ -f "$proxy_labels_file_path" ]]; then
local user_proxy_labels="$(<"$proxy_labels_file_path")"
user_proxy_labels="$(echo "$user_proxy_labels" | tr '\r\n' ' ')"
output="$output $user_proxy_labels"
while read -r line; do
[[ -z "$line" ]] && continue
output="$output --label '$line'"
done <"$proxy_labels_file_path"
fi
echo -n "$STDIN$output"