Skip to content

Commit

Permalink
fix:merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsheng.qi committed Oct 31, 2023
2 parents 6099548 + f371bb2 commit a04b36b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugin/servicerouter/rulebase/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,11 @@ func (g *RuleBasedInstancesFilter) matchDstMetadata(routeInfo *servicerouter.Rou
return nil, false, "", nil
}

// 如果类型是不等于,那应该单独获取实例
// 全匹配类型直接返回全量实例
if ruleMetaValueStr == matchAll && ruleMetaValue.ValueType == apimodel.MatchString_TEXT {
return cls, true, "", nil
}
// 如果是“不等于”类型,需要单独处理
var metaValues map[string]string
if ruleMetaValue.Type != apimodel.MatchString_NOT_EQUALS {
metaValues = svcCache.GetInstanceMetaValues(cls.Location, ruleMetaKey)
Expand Down

0 comments on commit a04b36b

Please sign in to comment.