Skip to content

Deprecate ServiceInsight #14845

@lobkovilya

Description

@lobkovilya

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:

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

No one assigned

    Labels

    kind/cleanupCleanup/refactor an existing component/codetriage/pendingThis issue will be reviewed during the next triage meeting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions