Add global.gatewayApi.externalTlsTermination for TLS at a load balancer
What does this MR do?
Adds global.gatewayApi.externalTlsTermination for deployments where a load balancer, such as an AWS NLB, terminates TLS in front of Envoy Gateway. Envoy otherwise sends X-Forwarded-Proto: http, so SAML sign-in loops, the Registry returns http:// upload URLs, and Pages HTTPS redirects misbehave. A manual setup was incomplete: HTTP listeners were fixed to port 80, and the Webservice and KAS section-scoped ClientTrafficPolicy resources conflict on shared HTTP ports and override the gateway-wide policy.
With the setting enabled:
- Listeners that inherit the root protocol serve HTTP on
gatewayApiResources.gateway.port(new, default443). The HTTP to HTTPS redirect stays on port 80. - cert-manager is skipped for the Gateway.
- Section-scoped
ClientTrafficPolicyresources are skipped. The gateway-wide policy defaults toKeepUnchanged,stripTrailingHostDot, and the larger HTTP/2 flow-control windows of the Webservice policies, and user values win. - The Webservice, Registry, KAS, and Pages HTTPRoutes set
X-Forwarded-Proto: https, merged into existingRequestHeaderModifierfilters. A filter that already sets the header keeps its value. - The config check rejects
global.hosts.https: false, smartcard, listeners set to HTTPS or TLS, and listeners other thanhttp-defaultset to HTTP. - The docs stay provider-neutral: they list what the load balancer must do (port 443, port 80 for the redirect, ALPN for
grpcs://agents, optional PROXY protocol for client IP addresses) and link to the AWS Load Balancer Controller annotations.
Renders without the setting are unchanged.
flowchart LR
C[Client] -->|HTTPS :443| LB["Load balancer<br/>terminates TLS, ALPN h2"]
C -->|HTTP :80| LB
LB -->|HTTP :443| L443["Envoy HTTP listeners :443<br/>gitlab-web, registry-web, kas-web, kas-workspaces-web, pages-web"]
LB -->|HTTP :80| L80["Envoy http-default :80"]
L80 -->|301 to HTTPS| C
L443 -->|"X-Forwarded-Proto: https"| B["Webservice, Registry, KAS, Pages"]Related issues
Closes #6722
Author checklist
For general guidance, please follow our Contributing guide.
Required
For anything in this list which will not be completed, please provide a reason in the MR discussion.
- Merge Request Title and Description are up to date, accurate, and descriptive.
- MR targeting the appropriate branch.
- MR has a green pipeline.
- Documentation created/updated.
- Tests added/updated.
- Have you validated that your change works end-to-end on a real cluster deployment?
- Partially: in kind with the bundled Envoy Gateway 1.9.2 and nginx
streamas an NLB stand-in. Verified HTTP listeners on 443, h2c from the load balancer, gRPC with and without ALPN, header overwrite on all chart-managed routes including workspaces, the port 80 redirect, the HTTP/2 windows in the Envoy config dump, PROXY protocol with and without it at the load balancer, and the explicit HTTP listener case. Not tested with a full GitLab deployment or a real NLB.
- Partially: in kind with the bundled Envoy Gateway 1.9.2 and nginx
- Equivalent MR/issue for omnibus-gitlab opened. Not applicable, chart-only change.
- When ready for review, MR is marked as ready (not a draft) and assigned to a reviewer.
Reviewers checklist
- As soon as you begin reviewing, select Start a review on your first comment so the MR shows Reviewer started review.
- MR has a green pipeline on https://gitlab.com/gitlab-org/charts/gitlab.
- Consider downstream impact to the Operator, as per evaluating impact from changes to GitLab chart.