Skip to content

Commit

Permalink
chore(routes): fix plugin after merge (#8651)
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Beaumont <[email protected]>
  • Loading branch information
michaelbeaumont authored Dec 18, 2023
1 parent 1ba0f09 commit 257f873
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (p plugin) Apply(rs *core_xds.ResourceSet, xdsCtx xds_context.Context, prox
policies := proxy.Policies.Dynamic[api.MeshHTTPRouteType]

// Only fallback if we have TrafficRoutes & No MeshHTTPRoutes
if len(xdsCtx.Mesh.Resources.TrafficRoutes().Items) != 0 && len(policies.ToRules.Rules) == 0 && len(policies.GatewayRules.Rules) == 0 {
if len(xdsCtx.Mesh.Resources.TrafficRoutes().Items) != 0 && len(policies.ToRules.Rules) == 0 && len(policies.GatewayRules.ToRules) == 0 {
return nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (p plugin) Apply(

policies := proxy.Policies.Dynamic[api.MeshTCPRouteType]
// Only fallback if we have TrafficRoutes & No MeshTCPRoutes
if len(ctx.Mesh.Resources.TrafficRoutes().Items) > 0 && len(policies.ToRules.Rules) == 0 && len(policies.GatewayRules.Rules) == 0 {
if len(ctx.Mesh.Resources.TrafficRoutes().Items) > 0 && len(policies.ToRules.Rules) == 0 && len(policies.GatewayRules.ToRules) == 0 {
return nil
}

Expand Down

0 comments on commit 257f873

Please sign in to comment.