Repository navigation
Route k8s traffic through Gateway API (Traefik) - #2758
Draft
hahn-kev-bot wants to merge 5 commits into
Draft
hahn-kev-bot wants to merge 5 commits into
hahn-kev-bot wants to merge 5 commits into
Conversation
Add HTTPRoutes for the main site and the hg/resumable/admin hosts, with per-environment hostname patches. develop/staging/prod keep the old ingress-nginx Ingress (moved to the legacy-ingress component) until each cluster is cut over to the LTOps shared Gateway. local-dev and CI now run Traefik (vendored helm render) with a local Gateway instead of the vendored ingress-nginx. Gateway API CRDs are installed as a cluster prerequisite in `task setup-k8s` and the setup-k8s action. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
kind-action's default node image is k8s 1.29, which rejects the Gateway API v1.6 CRDs (CEL isIP(), ValidatingAdmissionPolicy v1). Pin kind v0.33.0 with a k8s 1.34 node image and matching kubectl. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its default kind is v0.33.0, so drop the explicit version input. Keep the k8s 1.34 node image and kubectl pins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kubectl port-forward exits when a forwarded stream is reset. The 120MB upload in MediaFileTests.UploadReplacementFile_TooLarge_ThrowsError gets a 413, the connection is reset, and every later integration test failed with connection refused until the job timed out. kind now maps localhost:6579/6580 to fixed traefik NodePorts, so kubectl is no longer in the request path. The setup-k8s gateway-port input is gone since the ports are fixed by deployment/gha/kind.yaml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FwHeadless rejects uploads over Kestrel's 30 MB body limit before reading them. ingress-nginx buffered the whole upload, so clients always got the 413. Traefik streams the body, so lexbox finished the request mid-upload and the client saw a connection reset instead (UploadReplacementFile_TooLarge_ThrowsError). When the proxied response is a 413, read and discard the rest of the upload, bounded to 256 MiB and 60s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 of 4 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
prepping to migrate from ingress to gateway
AI summary
This is the first of two PRs moving routing off ingress-nginx and onto Gateway API. It adds
HTTPRoutes next to the existing Ingress, and switches local-dev and CI to Traefik.Routes
base/http-routes.yamladdslexbox-webandlexbox-hosts:lexbox-websends/api,/hg,/security.txtand/.well-knownto lexbox,/v1/tracesto the otel port, and everything else to ui.lexbox-hostssends the hg, resumable and admin hosts to lexbox.http-routes.patch.yaml. That replaces patching Ingress rules by position and the duplicated rule blocks in prod and develop. The route hostnames match the current Ingress hosts exactly in every environment.parentRefspoint at a placeholder for the LTOps shared Gateway (ltops-shared-gateway/ltops-gateway, markedTODO(LTOps)). Until we have the real name, the routes attach to nothing and the Ingress keeps serving traffic.Old Ingress
legacy-ingress/kustomize component, which develop, staging and prod include. Their rendered Ingress is identical todevelop.ingress-config*.yamlpatches once each cluster has been cut over.local-dev / CI
local-dev/traefik/values.yaml. Re-render it withtask k8s:render-traefik.readTimeout: 0, so long hg pushes aren't cut off at Traefik's 60s default.use-forwarded-headers.local-dev/gateway.yamldefines a GatewayClass and a Gateway with HTTP and HTTPS listeners and no redirect. The HTTPS listener uses an explicit self-signedCertificateinstead of the Ingress annotation.oauth-*; before, it deleted every Certificate.task setup-k8sand thesetup-k8saction. Existing local clusters need to re-runtask setup-k8sonce.setup-k8sinputingress-controller-portis renamed togateway-port. Port-forwards and log collection now useservice/traefikand theapp.kubernetes.io/name=traefiklabel.Before the clusters can switch (needed from LTOps)
sectionName, withallowedRoutespermittinglanguagedepot.ReferenceGrant.readTimeout: 0(or a high value), andforwardedHeaders.trustedIPsset to the Cloudflare ranges.Test plan
kubectl kustomizerenders local-dev, gha, develop, staging and production.developexcept for the two added HTTPRoutes, and the Ingress is unchanged.-strictpasses on all 153 rendered resources.setup-k8s).service/traefik443 port-forward.tilt upon Docker Desktop, after re-runningtask setup-k8s: https://localhost works, and hg clone and push work.🤖 Generated with Claude Code