Skip to content

Commit

Permalink
fixbug: Delete match with traffic judgment
Browse files Browse the repository at this point in the history
Signed-off-by: 赵禹 <[email protected]>
  • Loading branch information
赵禹 committed Jan 3, 2024
1 parent 30dbda7 commit e5efd3c
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ function GetRulesToPatch(spec, stableService, protocol)
if #retries == 0 then
rule.retries = nil
end
-- skip routes contain matches
if (rule.match == nil) then
for _, route in ipairs(rule.route) do
if GetHost(route) == stableService then
table.insert(matchedRoutes, rule)
end

for _, route in ipairs(rule.route) do
if GetHost(route) == stableService then
table.insert(matchedRoutes, rule)
end
end
end
Expand Down Expand Up @@ -134,4 +132,4 @@ else
GenerateRoutes(spec, obj.stableService, obj.canaryService, obj.stableWeight, obj.canaryWeight, "tcp")
GenerateRoutes(spec, obj.stableService, obj.canaryService, obj.stableWeight, obj.canaryWeight, "tls")
end
return obj.data
return obj.data

0 comments on commit e5efd3c

Please sign in to comment.