Infrastructure Service Architecture
The Infrastructure Service manages the lifecycle of tenant infrastructure on the MATIH platform. Running on port 8089, it handles infrastructure provisioning, drift detection, credential management, ingress configuration, service discovery, topology mapping, and Terraform state management. It acts as the bridge between the control plane and the underlying cloud infrastructure.
Service Overview
| Property | Value |
|---|---|
| Service Name | infrastructure-service |
| Port | 8089 |
| Technology | Spring Boot 3.2, Java 21 |
| Database | PostgreSQL (JPA/Hibernate) |
| IaC Engine | Terraform (via TerraformExecutor) |
| Cloud Providers | Azure (primary), AWS, GCP |
| Reconciliation | Kubernetes-style reconciliation loop |
| Autoscaling | HPA and VPA management |
Controllers
| Controller | Base Path | Purpose |
|---|---|---|
InfrastructureController | /api/v1/infrastructure | Tenant infrastructure provisioning and management |
CredentialController | /api/v1/infrastructure/credentials | Platform credential management |
IngressController | /api/v1/infrastructure/ingress | Ingress and DNS management |
ServiceController | /api/v1/infrastructure/services | Service deployment and scaling |
TopologyController | /api/v1/infrastructure/topology | Infrastructure topology and health |
ArtifactController | /api/v1/infrastructure/artifacts | Platform artifact registry |
Key Components
| Component | Description |
|---|---|
TenantInfrastructureService | Orchestrates tenant infrastructure lifecycle |
DriftDetectionService | Detects configuration drift from desired state |
PlatformCredentialService | Manages cloud and service credentials |
IngressManagementService | Manages NGINX ingress and DNS zones |
TopologyRefreshService | Refreshes infrastructure topology views |
TerraformExecutor | Executes Terraform plans and applies |
TerraformStateManager | Manages Terraform state backends |
InfrastructureReconciler | Reconciles actual vs. desired infrastructure state |
HorizontalPodAutoscalerManager | Manages Kubernetes HPA configs |
VerticalPodAutoscalerManager | Manages Kubernetes VPA configs |
Next Steps
- Provisioning -- tenant infrastructure lifecycle
- Drift Detection -- detecting configuration drift
- Credentials -- credential management
- Ingress Management -- ingress and DNS
- Service Discovery -- service deployment and scaling
- Topology -- infrastructure topology
- Terraform State -- state management
- API Reference -- complete endpoint listing