MATIH Platform is in active MVP development. Documentation reflects current implementation status.
8. Platform Services
Ingress Management

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 Ingress

Ingress 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):

StepActionDescription
1DEPLOY_INGRESS_CONTROLLERHelm install NGINX in tenant namespace, wait for LoadBalancer IP
2CREATE_DNS_ZONECreate Azure DNS child zone with NS delegation and A records
3CREATE_TENANT_INGRESSCreate cert-manager Certificate and Kubernetes Ingress with TLS

TLS Configuration

TLS certificates are managed automatically by cert-manager using DNS01 challenge validation:

EnvironmentIssuerDescription
Devletsencrypt-staging-dns01Staging certificates for development
Productionletsencrypt-prod-dns01Production Let's Encrypt certificates

The DNS01 challenge uses Azure DNS with workload identity for authentication.


Dev vs Production

AspectDevProduction
Domainmatih-dev.example.com or nip.iomatih.ai
Dedicated ingressDisabled by defaultEnabled per tenant
DNS zonesDisabled by defaultChild zones per tenant
TLS issuerStagingProduction