Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.terraform/
.terraform.lock.hcl
*.tfstate
*.tfstate.*
*.tfvars
Expand Down
30 changes: 22 additions & 8 deletions nginx_gateway_fabric/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# nginx_gateway_fabric

Cloud-agnostic base module for [NGINX Gateway Fabric](https://github.com/nginxinc/nginx-gateway-fabric) (v2.4.1) using the Kubernetes Gateway API.
Cloud-agnostic base module for [NGINX Gateway Fabric](https://github.com/nginxinc/nginx-gateway-fabric) (v2.6.5) using the Kubernetes Gateway API.

This module is designed to be called by cloud-specific flavor modules (AWS, GCP, Azure, OVH) that pass their own LB annotations and proxy configuration.

Expand Down Expand Up @@ -63,23 +63,37 @@ module "nginx_gateway_fabric" {

## What this module creates

- NGINX Gateway Fabric Helm release (chart v2.4.1)
- GatewayClass and Gateway with per-domain HTTPS listeners
- HTTPRoute and GRPCRoute resources from spec rules
- Bootstrap TLS certificates (self-signed, replaced by cert-manager)
- cert-manager ClusterIssuer for HTTP-01 validation
- cert-manager Certificate resources (when mixed cert modes)
- NGINX Gateway Fabric Helm release (chart v2.6.5), with Gateway API experimental
features enabled (required for the ListenerSet CRD)
- GatewayClass and a Gateway carrying only the HTTP (:80) listener, with
`allowedListeners` set so ListenerSets can attach
- `ListenerSet` resources holding the per-hostname HTTPS listeners, chunked at 64
listeners each — this is how the deployment scales past the 64-listeners-per-Gateway
limit
- HTTPRoute and GRPCRoute resources from spec rules (HTTPS routes attach to the
ListenerSet listeners; the HTTP listener stays on the Gateway)
- Bootstrap TLS secrets (self-signed) so each HTTPS listener is valid before
cert-manager issues — the listener-invalid / cert-not-issued deadlock breaker;
cert-manager overwrites them once HTTP-01 succeeds
- cert-manager ClusterIssuer for HTTP-01 validation, annotated onto the ListenerSet
so cert-manager's listenerset-shim issues per-hostname certs
- cert-manager Certificate resources (per hostname, apex/concrete names — HTTP-01
never issues wildcards)
- Basic auth via NGF AuthenticationFilter CRD (optional)
- PodMonitor for Prometheus scraping (optional)
- ReferenceGrant for cross-namespace backends
- ClientSettingsPolicy for body size limits
- Route53 DNS records for base domain and wildcard (AWS only)
- HTTP to HTTPS redirect route (when force_ssl_redirection enabled)

A domain may instead carry a `certificate_reference` (a pre-made TLS secret name) as
an optional escape hatch — that listener uses the supplied secret and cert-manager is
not involved for it.

## What flavor modules provide

| Config | Example (AWS) |
|--------|---------------|
| `service_annotations` | NLB scheme, target type, backend protocol, proxy protocol |
| `nginx_proxy_extra_config` | `rewriteClientIP.mode = "ProxyProtocol"` |
| ACM certificate handling | Detect ACM ARN, create ACK Certificate CRD, rewrite `certificate_reference` to K8s secret name before passing `instance` |
| ACM-at-LB handling | Detect an ACM ARN in `certificate_reference`, set `external_tls_termination` and the NLB `aws-load-balancer-ssl-cert` annotation so the NLB terminates TLS (no in-cluster ACK controller) |
Binary file not shown.
Binary file not shown.
Loading