From 54b2586732dc97cdcc2fc81052503da9bd849741 Mon Sep 17 00:00:00 2001 From: Rafael Gomes Date: Fri, 12 Jan 2024 15:40:56 -0300 Subject: [PATCH] feat: improve matching for finding domain for workloads --- lib/core/controlplane.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/controlplane.rb b/lib/core/controlplane.rb index f3fb885b..0f73ae5b 100644 --- a/lib/core/controlplane.rb +++ b/lib/core/controlplane.rb @@ -265,7 +265,7 @@ def find_domain_for(workloads) route = find_domain_route(domain_data) next false if route.nil? - workloads.any? { |workload| route["workloadLink"].split("/").last == workload } + workloads.any? { |workload| route["workloadLink"].match?(%r{/org/#{org}/gvc/#{gvc}/workload/#{workload}}) } end end