You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
rename destSvcAccount variable to destinationServiceIdentity for correctness (this is no longer a Service Account)
other opportunities to simplify ListAllowedEndpointsForService
drop Allowed from the name - this should be implied from ListEndpointsForService
The signature of the function is func (mc *MeshCatalog) ListAllowedEndpointsForService(downstreamIdentity identity.K8sServiceAccount, upstreamSvc service.MeshService) ([]endpoint.Endpoint, error) { -- it is unclear - are we listing endpoints for upstreamSvc from the perspective of downstreamIdentity? Or vice versa?
Used hash map for computing the intersection of allowed outbound endpoints and endpoints for service identities. The time complexity is reduced from O(n^3) to O(n^2)
Renamed destSvcAccount variable to destServiceIdentity
Renamed method ListAllowedEndpointsForService to ListEndpointsForServiceIdentity
Dropped allowed wording from method names. Mesh services assume that certain services needs authorization to be accessed.
For the unclear method signature func (mc *MeshCatalog) ListAllowedEndpointsForService(downstreamIdentity identity.K8sServiceAccount, upstreamSvc service.MeshService), I don't have a better idea. Using downstream and upstream indicates the direction. Thus I only complemented the method comment.
This GitHub Issue is to simplify MeshCataloger's
ListAllowedEndpointsForService
implementation.ListAllowedEndpointsforService
be renamed toListEndpointsForTargetServiceIdentity
or something, which:Service
and usesServiceIdentity
(which could map to a K8s Service Account in the context of Kubernetes)ListAllowedOutboundServiceIdentities
could be removed from the MeshCataloger interface - it is only used within MeshCatalog:osm/pkg/catalog/endpoint.go
Line 50 in 6722573
destSvcAccount
variable todestinationServiceIdentity
for correctness (this is no longer a Service Account)ListAllowedEndpointsForService
Allowed
from the name - this should be implied fromListEndpointsForService
func (mc *MeshCatalog) ListAllowedEndpointsForService(downstreamIdentity identity.K8sServiceAccount, upstreamSvc service.MeshService) ([]endpoint.Endpoint, error) {
-- it is unclear - are we listing endpoints forupstreamSvc
from the perspective ofdownstreamIdentity
? Or vice versa?osm/pkg/catalog/endpoint.go
Lines 42 to 70 in 6722573
This is a sub task of #2218
The text was updated successfully, but these errors were encountered: