Skip to content

Commit

Permalink
We have resolved the host before (#51563)
Browse files Browse the repository at this point in the history
  • Loading branch information
hzxuzhonghu committed Jun 13, 2024
1 parent bb06580 commit b9bcbda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pilot/pkg/model/destination_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
// 3. If the original rule did not have any exportTo, exportTo settings from the new rule will be used.
func (ps *PushContext) mergeDestinationRule(p *consolidatedDestRules, destRuleConfig config.Config, exportToSet sets.Set[visibility.Instance]) {
rule := destRuleConfig.Spec.(*networking.DestinationRule)
resolvedHost := ResolveShortnameToFQDN(rule.Host, destRuleConfig.Meta)
resolvedHost := host.Name(rule.Host)

var destRules map[host.Name][]*ConsolidatedDestRule

Expand Down Expand Up @@ -81,7 +81,7 @@ func (ps *PushContext) mergeDestinationRule(p *consolidatedDestRules, destRuleCo
for _, subset := range mergedRule.Subsets {
existingSubset.Insert(subset.Name)
}
// we have an another destination rule for same host.
// we have another destination rule for same host.
// concatenate both of them -- essentially add subsets from one to other.
// Note: we only add the subsets and do not overwrite anything else like exportTo or top level
// traffic policies if they already exist
Expand Down

0 comments on commit b9bcbda

Please sign in to comment.