MATIH Platform is in active MVP development. Documentation reflects current implementation status.
18. CI/CD & Build System
Tooling
Ingress Tools

Ingress Tools

The ingress tools validate and deploy per-tenant ingress configurations, DNS zones, TLS certificates, and routing rules. They ensure that each tenant's ingress is correctly provisioned and accessible.


validate-tenant-ingress.sh

Source: scripts/tools/validate-tenant-ingress.sh

Validates DNS zones, A records, ingress controllers, TLS certificates, and routing for active tenants.

Usage

# Validate all tenants
./scripts/tools/validate-tenant-ingress.sh
 
# Validate a specific tenant
./scripts/tools/validate-tenant-ingress.sh --tenant acme
 
# Verbose output
./scripts/tools/validate-tenant-ingress.sh --verbose

Validation Checks

CheckDescription
DNS zone existsAzure DNS zone for {tenant}.matih.ai exists
NS delegationParent zone has NS records pointing to child zone
A recordsA record points to tenant LoadBalancer IP
Ingress controllerNGINX pod is running in tenant namespace
TLS certificatecert-manager Certificate is Ready
Ingress resourceKubernetes Ingress is configured with correct rules

DNS Zone Check

az network dns zone show \
    --name "$domain" \
    --resource-group "$resource_group" \
    --output json

tenant-ingress-deploy.sh

Source: scripts/tools/tenant-ingress-deploy.sh

Deploys the per-tenant ingress stack: NGINX controller, DNS zone, and TLS certificate.

Usage

./scripts/tools/tenant-ingress-deploy.sh --tenant acme --domain acme.matih.ai

Deployment Steps

StepDescription
1. Deploy NGINXHelm install NGINX ingress controller in tenant namespace
2. Wait for IPWait for LoadBalancer to receive an external IP
3. Create DNS zoneCreate Azure DNS child zone with NS delegation
4. Create A recordsPoint A records to LoadBalancer IP
5. Create Certificatecert-manager Certificate with DNS01 challenge
6. Create IngressKubernetes Ingress with TLS termination

Dev vs Production

AspectDevProduction
Domainnip.io or custom dev domain{tenant}.matih.ai
TLS issuerletsencrypt-staging-dns01letsencrypt-prod-dns01
Dedicated NGINXDisabled by defaultEnabled per tenant
DNS zonesDisabled by defaultChild zone per tenant

Libraries Used

LibraryPurpose
core/logging.shUnified logging
core/utils.shUtility functions

Related Pages