Skip to content

Commit

Permalink
MESH-5878: Admiral does not create envoy filter on client onboardings
Browse files Browse the repository at this point in the history
- Only modify cache when not an error

Signed-off-by: Adil Fulara <adil_fulara@intuit.com>
  • Loading branch information
Adil Fulara committed Jan 3, 2025
1 parent a95dd31 commit 7a7e9d9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions admiral/pkg/clusters/routingpolicy_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ func (r *RoutingPolicyService) ProcessAddOrUpdate(ctx context.Context, eventType
err = common.AppendError(err, err1)
} else {
log.Infof(LogFormat, eventType, "routingpolicy ", newRP.Name, remoteController.ClusterID, "created envoyfilters")
id := common.GetRoutingPolicyIdentity(newRP)
if oldRP != nil {
oldEnv := common.GetRoutingPolicyEnv(oldRP)
r.RemoteRegistry.AdmiralCache.RoutingPolicyCache.Delete(id, oldEnv, oldRP.Name)
}
env := common.GetRoutingPolicyEnv(newRP)
r.RemoteRegistry.AdmiralCache.RoutingPolicyCache.Put(id, env, newRP.Name, newRP)
}
}
id := common.GetRoutingPolicyIdentity(newRP)
if oldRP != nil {
oldEnv := common.GetRoutingPolicyEnv(oldRP)
r.RemoteRegistry.AdmiralCache.RoutingPolicyCache.Delete(id, oldEnv, oldRP.Name)
}
env := common.GetRoutingPolicyEnv(newRP)
r.RemoteRegistry.AdmiralCache.RoutingPolicyCache.Put(id, env, newRP.Name, newRP)
}
}
return err
Expand Down

0 comments on commit 7a7e9d9

Please sign in to comment.