From ee7f8200ac87e023078037c32707cc50e149956b Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 3 Oct 2024 22:58:06 +0200 Subject: [PATCH] fix: parser, espacing container labels --- bootstrap/helpers/shared.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index e13f019e3..4d78021c4 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -3702,6 +3702,18 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int }); } $serviceLabels = $labels->merge($defaultLabels); + if ($serviceLabels->count() > 0) { + if ($isApplication) { + $isContainerLabelEscapeEnabled = data_get($resource, 'settings.is_container_label_escape_enabled'); + } else { + $isContainerLabelEscapeEnabled = data_get($resource, 'is_container_label_escape_enabled'); + } + if ($isContainerLabelEscapeEnabled) { + $serviceLabels = $serviceLabels->map(function ($value, $key) { + return escapeDollarSign($value); + }); + } + } if (! $isDatabase && $fqdns instanceof Collection && $fqdns->count() > 0) { if ($isApplication) { $shouldGenerateLabelsExactly = $resource->destination->server->settings->generate_exact_labels;