- 
                Notifications
    
You must be signed in to change notification settings  - Fork 350
 
Open
Labels
kind/cleanupCleanup/refactor an existing component/codeCleanup/refactor an existing component/codetriage/pendingThis issue will be reviewed during the next triage meetingThis issue will be reviewed during the next triage meeting
Description
Description
ServiceInsight is obsolete when using MeshServices. However, we still can't remove it as it's the only way GUI can get aggregated information in delegated gateway.
Also, GlobalInsight is using ServiceInsight:
kuma/pkg/insights/globalinsight/global_insight_service.go
Lines 119 to 146 in fc66bbf
| func (gis *defaultGlobalInsightService) aggregateServices( | |
| ctx context.Context, | |
| globalInsight *api_types.GlobalInsight, | |
| ) error { | |
| serviceInsights := &mesh.ServiceInsightResourceList{} | |
| if err := gis.resourceStore.List(ctx, serviceInsights); err != nil { | |
| return err | |
| } | |
| for _, serviceInsight := range serviceInsights.GetItems() { | |
| services := serviceInsight.GetSpec().(*mesh_proto.ServiceInsight).GetServices() | |
| for _, service := range services { | |
| switch service.GetServiceType() { | |
| case mesh_proto.ServiceInsight_Service_internal: | |
| updateServiceStatus(service.GetStatus(), &globalInsight.Services.Internal) | |
| case mesh_proto.ServiceInsight_Service_external: | |
| globalInsight.Services.External.Total += 1 | |
| case mesh_proto.ServiceInsight_Service_gateway_builtin: | |
| updateServiceStatus(service.GetStatus(), &globalInsight.Services.GatewayBuiltin) | |
| case mesh_proto.ServiceInsight_Service_gateway_delegated: | |
| updateServiceStatus(service.GetStatus(), &globalInsight.Services.GatewayDelegated) | |
| } | |
| } | |
| } | |
| return nil | |
| } | 
Metadata
Metadata
Assignees
Labels
kind/cleanupCleanup/refactor an existing component/codeCleanup/refactor an existing component/codetriage/pendingThis issue will be reviewed during the next triage meetingThis issue will be reviewed during the next triage meeting