Ingress Management
The IngressController and IngressManagementService manage per-tenant ingress configuration including NGINX ingress controllers, DNS zones, TLS certificates, and routing rules. Each tenant can have a dedicated ingress controller with its own LoadBalancer IP for isolation.
Ingress Architecture
Internet
|
v
Azure DNS (matih.ai)
|
+-- acme.matih.ai --> Tenant Ingress Controller (LoadBalancer IP)
| |
| +--> ai-service
| +--> bi-service
| +--> query-engine
|
+-- beta.matih.ai --> Another Tenant IngressIngress Endpoints
Deploy Ingress Controller
Endpoint: POST /api/v1/infrastructure/ingress/tenants/:tenantId/controller
Deploys a dedicated NGINX ingress controller in the tenant namespace via Helm.
curl -X POST http://localhost:8089/api/v1/infrastructure/ingress/tenants/550e8400/controller \
-H "Authorization: Bearer ${TOKEN}"Create DNS Zone
Endpoint: POST /api/v1/infrastructure/ingress/tenants/:tenantId/dns
Creates a child DNS zone (e.g., acme.matih.ai) with NS delegation from the platform zone and A records pointing to the tenant's LoadBalancer IP.
Create Tenant Ingress
Endpoint: POST /api/v1/infrastructure/ingress/tenants/:tenantId/ingress
Creates the Kubernetes Ingress resource and cert-manager Certificate for TLS.
Get Ingress Status
Endpoint: GET /api/v1/infrastructure/ingress/tenants/:tenantId
Returns the current ingress configuration and status including LoadBalancer IP, DNS records, and TLS certificate status.
Provisioning Flow
The ingress provisioning follows a three-phase sequence (Phase 5.5 of tenant provisioning):
| Step | Action | Description |
|---|---|---|
| 1 | DEPLOY_INGRESS_CONTROLLER | Helm install NGINX in tenant namespace, wait for LoadBalancer IP |
| 2 | CREATE_DNS_ZONE | Create Azure DNS child zone with NS delegation and A records |
| 3 | CREATE_TENANT_INGRESS | Create cert-manager Certificate and Kubernetes Ingress with TLS |
TLS Configuration
TLS certificates are managed automatically by cert-manager using DNS01 challenge validation:
| Environment | Issuer | Description |
|---|---|---|
| Dev | letsencrypt-staging-dns01 | Staging certificates for development |
| Production | letsencrypt-prod-dns01 | Production Let's Encrypt certificates |
The DNS01 challenge uses Azure DNS with workload identity for authentication.
Dev vs Production
| Aspect | Dev | Production |
|---|---|---|
| Domain | matih-dev.example.com or nip.io | matih.ai |
| Dedicated ingress | Disabled by default | Enabled per tenant |
| DNS zones | Disabled by default | Child zones per tenant |
| TLS issuer | Staging | Production |