Topology
The TopologyController and TopologyRefreshService provide a real-time view of the platform's infrastructure topology. This includes service dependencies, resource utilization, connectivity status, and the overall health of the deployment across namespaces and cloud regions.
Topology Endpoint
Endpoint: GET /api/v1/infrastructure/topology
Returns the full platform topology including all tenants, services, and their relationships.
curl http://localhost:8089/api/v1/infrastructure/topology \
-H "Authorization: Bearer ${TOKEN}"Tenant Topology
Endpoint: GET /api/v1/infrastructure/topology/tenants/:tenantId
Returns the topology for a specific tenant, including all deployed services, their health status, and interdependencies.
Topology Data Model
Nodes
Each service or resource in the topology is represented as a node:
| Field | Type | Description |
|---|---|---|
id | String | Node identifier |
type | String | service, database, cache, queue, storage |
name | String | Display name |
namespace | String | Kubernetes namespace |
status | String | healthy, degraded, unhealthy, unknown |
version | String | Deployed version |
replicas | int | Current replica count |
metrics | Object | CPU, memory, request rate, error rate |
Edges
Dependencies between nodes are represented as edges:
| Field | Type | Description |
|---|---|---|
source | String | Source node ID |
target | String | Target node ID |
type | String | http, grpc, tcp, kafka |
latencyP50 | double | Median latency between nodes |
errorRate | double | Error rate of the connection |
Topology Refresh
The TopologyRefreshService periodically refreshes the topology view by:
- Querying Kubernetes API for current pod, service, and deployment state
- Collecting metrics from Prometheus for request rates and latencies
- Analyzing service mesh data for dependency mapping
- Aggregating health check results from the
HealthCheckService
Infrastructure Metrics
The InfrastructureMetrics class exposes Prometheus metrics for infrastructure monitoring:
| Metric | Type | Description |
|---|---|---|
infrastructure_provisioning_duration | Histogram | Time to provision infrastructure |
infrastructure_reconciliation_duration | Histogram | Reconciliation loop duration |
infrastructure_drift_detected | Counter | Number of drift detections |
infrastructure_services_total | Gauge | Total deployed services |
infrastructure_services_healthy | Gauge | Healthy service count |
Cloud Provider Integration
The AzureResourceProviderService and CloudClientConfig provide cloud-specific resource queries for topology enrichment. This includes:
- Virtual machine and AKS cluster state
- Database server health
- Storage account utilization
- Network connectivity status