KUBERNETES INGRESS CONTROLLER (HG-INGRESS)

The hg-ingress controller connects standard Kubernetes Kind: Ingress resources to Hackergate edge dataplanes. It runs as a control-plane component, watches cluster resources, translates annotations, and pushes routing tables via ConnectRPC.

Ingress Controller Control Plane Architecture

HG-INGRESS CONTROLLER FLOW
┌────────────────────────────────────────────────────────────────────────┐ │ Kubernetes API Server │ │ │ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │ │ │ Kind: Ingress│ │ Kind: Secret │ │ Kind: IngressClass │ │ │ │ (routes/rule)│ │ (TLS certs) │ │ (name: hackergate) │ │ │ └──────┬───────┘ └──────┬───────┘ └──────────┬───────────┘ │ └──────────┼────────────────────┼────────────────────────┼───────────────┘ │ watch │ read │ filter ▼ ▼ ▼ ┌────────────────────────────────────────────────────────────────────────┐ │ hg-ingress controller (Control Plane Replica) │ │ │ │ 1. SharedInformer watches Ingress + IngressClass │ │ 2. IngressConverter: Translates rules & annotations → VhostConfig │ │ 3. ConnectRPC Pusher: Atomically pushes desired vhost fleet config │ │ 4. Stale Domain Cleanup: Automatically prunes deleted domains │ │ 5. DevOps Status Service (:8080 ConnectRPC): Real-time route health │ └───────────────────────────────────┬────────────────────────────────────┘ │ ConnectRPC PushVHosts (:50051) ▼ ┌────────────────────────────────────────────────────────────────────────┐ │ Hackergate Edge Dataplane (Bare Metal / Edge Fleet) │ │ │ │ • Terminates TLS 1.3 / HTTP/3 QUIC for all ingress domains │ │ • Enforces Coraza v3 + OWASP CRS v4 WAF rules │ │ • Executes cryptographic PoW & BOLA / IDOR detection │ │ • Proxies traffic directly to Kubernetes Service ClusterIPs │ └────────────────────────────────────────────────────────────────────────┘

Production Kubernetes Ingress Manifest

Below is a production-grade Ingress resource configuring automatic HTTPS redirection, WAF protection, token bucket rate limiting, and Let's Encrypt TLS:

ingress.yaml
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: billing-api-ingress namespace: production annotations: # Hackergate Ingress Controller Directives hackergate.hu/ssl-redirect: "true" hackergate.hu/acme: "true" hackergate.hu/acme-email: "secops@example.com" hackergate.hu/waf-enabled: "true" hackergate.hu/waf-paranoia-level: "2" hackergate.hu/rate-limit: "250r/s" hackergate.hu/proxy-body-size: "25m" hackergate.hu/load-balance: "least-conn" hackergate.hu/whitelist-source-range: "10.0.0.0/8, 172.16.0.0/12" spec: ingressClassName: hackergate tls: - hosts: - billing.example.com secretName: billing-tls rules: - host: billing.example.com http: paths: - path: / pathType: Prefix backend: service: name: billing-service port: number: 8080

Complete Annotation Reference

AnnotationDefaultDescription
hackergate.hu/waf-enabled"false"Activates Coraza v3 WAF inspection for this ingress.
hackergate.hu/waf-paranoia-level"1"Paranoia level (1–4) for OWASP CRS v4 rules.
hackergate.hu/ssl-redirect"false"Enforces HTTP to HTTPS 301 redirection.
hackergate.hu/acme"false"Enables Let's Encrypt automated TLS certificate issuance.
hackergate.hu/acme-email""Account email registered with Let's Encrypt CA.
hackergate.hu/rate-limit""Rate limit expression (e.g. "100r/s" or "1000r/m").
hackergate.hu/mtls-enabled"false"Enforces Mutual TLS client certificate verification.
hackergate.hu/mtls-client-ca""Kubernetes Secret containing trusted Client CA PEM.
hackergate.hu/whitelist-source-range""Allowed CIDR ranges; requests outside are rejected immediately.
hackergate.hu/load-balance"round-robin"Algorithm: round-robin, least-conn, or ip-hash.
hackergate.hu/proxy-body-size"10m"Maximum allowable HTTP request payload size.
hackergate.hu/canary"false"Enables canary traffic splitting.
hackergate.hu/canary-weight"0"Percentage of total traffic routed to canary upstream (0–100).
← PREV: VHOSTS & ROUTINGNEXT: CORAZA WAF & CRS v4 TUNING →