fixbug: Delete match with traffic judgment
Signed-off-by: 赵禹 <12424564+craincn@user.noreply.gitee.com>
This commit is contained in:
parent
30dbda7d22
commit
e5efd3c9e1
|
|
@ -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
|
||||
|
|
@ -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
|
||||
Loading…
Reference in New Issue