Skip to content

feat(deploy): complete standalone staging Gateway migration - #1822

Open
rdimitrov wants to merge 14 commits into
mainfrom
codex/gateway-staging-complete
Open

rdimitrov wants to merge 14 commits into
mainfrom
codex/gateway-staging-complete

Conversation

@rdimitrov

@rdimitrov rdimitrov commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Complete staging’s migration to standalone OSS NGINX Gateway Fabric while preserving the public Service/IP, active TLS certificates, existing Gateway nodes, monitoring, and normal release flow. Production retains its existing ingress.

  • Retire the ingress-nginx controller/chart, Ingress objects, legacy ACME forwarding, old scrape/logging configuration, and duplicate canary Gateway/load balancer/address.
  • Use native Gateway HTTP01 renewal and cert-manager-managed internal TLS. Protect the adopted public Service and Certificates.
  • Bound proxy rollouts to existing capacity and add endpoint/LB draining followed by graceful NGINX shutdown.
  • Add feature, certificate, load, recovery, public HTTPS, and monitoring qualification helpers; document recovery through a reviewed Git redeployment.

Validation is still in progress: do not merge yet. Full staging saved-plan applies and production preview completed. Feature contract, rate limiting, native issuance/renewal, no-restart internal mTLS rotation, authenticated publishing/read/delete, and Grafana access passed. Initial load/scaling runs passed, but an initial proxy rollout exposed connection drops; the graceful-drain fix is deployed and awaits its repeat qualification. A temporary general-worker autoscaler expansion caused the full-node-count guard to stop the next run; the idle worker has since been removed automatically. Repeat qualification must use the original four nodes. Temporary fixtures still need removal, followed by final previews and the normal GitOps deployment.

Copilot feedback on no-restart verification and actual generator-traffic overlap has been addressed. Remaining recovery/load/notification checks and cleanup are currently waiting for renewed Google Cloud credentials. No production apply has been performed.

@rdimitrov rdimitrov changed the title feat(deploy): complete staging Gateway migration feat(deploy): complete standalone staging Gateway migration Nov 8, 2026
@rdimitrov
rdimitrov marked this pull request as ready for review November 8, 2026 13:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The no-restart mTLS qualification gate can falsely pass after a controller restart because deployment generation does not detect Pod replacement or container restarts.

1 open issue
What changed in this PR

This PR completes staging’s move to standalone OSS Gateway Fabric while preserving the public endpoint, existing nodes, monitoring, and release flow. Production retains its existing ingress; final staging qualification remains in progress.

Changes:

  • Retire staging’s legacy ingress and duplicate canary while adopting the existing public Service.
  • Move public renewal to Gateway HTTP01 and internal TLS to cert-manager, with capacity-bounded proxy rollouts.
  • Add public-Gateway qualification helpers and document recovery without a running legacy fallback.
File Description
deploy/​Pulumi.gcpStaging.yaml Select standalone staging mode.
deploy/​pkg/​providers/​gcp/​provider.go Preserve Gateway nodes and adjust standalone resources.
deploy/​pkg/​providers/​gcp/​gateway_canary.go Omit the separate canary IP in standalone mode.
deploy/​pkg/​k8s/​registry.go Skip staging’s legacy application Ingress.
deploy/​pkg/​k8s/​monitoring.go Skip staging’s legacy Grafana Ingress.
deploy/​pkg/​k8s/​ingress.go Use the adopted public Service instead of the ingress chart.
deploy/​pkg/​k8s/​gatewaycanary/​handoff.go Configure native renewal, public fixtures, and bounded rollouts.
deploy/​pkg/​k8s/​gatewaycanary/​handoff_test.go Test standalone topology and certificate configuration.
deploy/​pkg/​k8s/​gatewaycanary/​certificates.go Manage internal certificates and adopt public Certificates.
deploy/​pkg/​k8s/​gatewaycanary/​canary.go Orchestrate standalone resources and omit legacy components.
deploy/​pkg/​k8s/​gateway_service.go Adopt and protect the existing public Service.
deploy/​pkg/​k8s/​deploy.go Order Gateway and certificate dependencies.
deploy/​pkg/​k8s/​cert_manager.go Enable Gateway HTTP01 and public Certificate management.
deploy/​pkg/​k8s/​autoscaling.go Omit retired ingress scrape targets.
deploy/​gateway-canary/​standalone.md Document final topology, recovery, and qualification gates.
deploy/​gateway-canary/​rollout.py Support proxy replacement against the public Gateway.
deploy/​gateway-canary/​resilience.py Add disruption scenarios with cleanup and reporting.
deploy/​gateway-canary/​README.md Update operating instructions for standalone staging.
deploy/​gateway-canary/​native_acme.py Check native issuance and forced renewal.
deploy/​gateway-canary/​measure.py Target and measure the public Gateway data plane.
deploy/​gateway-canary/​collector_restart.py Select collectors using the chosen Gateway’s placement.
deploy/​gateway-canary/​certificate_rotation.py Verify internal renewal, propagation, and fresh mTLS.
deploy/​gateway-canary/​autoscale.py Support public-Gateway autoscaling qualification.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The driver-lifetime checks can falsely qualify runs with less than 60 seconds of one-node traffic; validation must instead require 60 seconds of overlap with the generator’s actual active interval.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Measure active load overlap instead of driver lifetime

deploy/​gateway-canary/​resilience.py:107

load.poll() tracks the measurement driver, which stays alive for at least 16 seconds after fixture traffic ends while collecting metrics. These checks can therefore pass even when the 60-second wait includes time without traffic, falsely qualifying a run with less than a minute of one-node load. Record the generator's actual active interval and require at least 60 seconds of overlap with one-node operation instead of checking the driver's lifetime.

1 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

A legacy Ingress owner reference can survive certificate adoption, allowing Ingress deletion to garbage-collect the Certificate despite Pulumi protection and disrupt its renewal lifecycle.

No open issues 🎉

2 previously missed issues

In code that hasn't changed since last review

High severity Detach legacy owner reference before retiring the Ingress

deploy/​pkg/​k8s/​gatewaycanary/​certificates.go:84

Applying an empty ownerReferences list does not remove an Ingress reference owned by another field manager, so that reference can survive the adopt-to-managed transition. Deleting the Ingress can then garbage-collect the Certificate despite pulumi.Protect(true), removing its renewal lifecycle. Explicitly detach the legacy reference with a merge/JSON patch and verify its removal before retiring the Ingress resources.

Medium severity Read the complete HTTP/2 header before validating its frame type

deploy/​gateway-canary/​certificate_rotation.py:91

A single SSLSocket.recv(9) can return fewer than nine bytes when the HTTP/2 header is split across TLS records. The following assertion then rejects a valid authenticated connection, so certificate-rotation qualification can fail solely because of stream framing. Accumulate the full nine-byte header, handling EOF, before checking its frame type.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants