Repository navigation
fix(envoy-gateway): make module safe for upgrades, pin v1.9.2 - #40
Merged
Merged
Conversation
The deploy script deleted every Gateway API CRD (and so every Gateway and Route) when the gateways CRD lacked the string "gateway.envoyproxy.io", which is true for all current clusters. The null_resource had no triggers, so version bumps never re-ran it, and a grep in the pipeline masked kubectl apply failures. - never delete CRDs; apply CRDs first (SSA), wait Established, then the controller (EG 1.9 needs Gateway API 1.6 CRDs before the controller) - delete the finished certgen Job before re-apply (immutable template; certgen keeps existing cert secrets) - pipefail; wait for controller rollout; warn on bundle mismatch - triggers on versions + script hash; gateway_api_version now checked - defaults/example: EG v1.9.2, Gateway API v1.6.1 - GATEWAY_API_SETUP: drop standard-install v1.0.0 step (would downgrade the experimental CRDs) Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Oct 5, 2026
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.


Why
terraform/modules/envoy_gatewaycould not be used to upgrade Envoy Gateway safely:deploy-envoy-gateway.shdeleted all Gateway API CRDs whencrd/gateways.gateway.networking.k8s.iodidn't contain the stringgateway.envoyproxy.io. None of the live clusters' CRDs do (checked on prd), so any re-run would have deleted every Gateway/HTTPRoute/TCPRoute/UDPRoute on prd (game servers + high-command).null_resource.deploy_envoy_gatewayhad notriggers, so bumpingenvoy_gateway_versionwas a no-op.kubectl apply ... | grep -v ...hid apply failures (nopipefail).gateway_api_versionwas unused and documented as v1.1.0.What
install.yaml, split CRDs from the rest; SSA-apply CRDs first and wait forEstablished, then the controller (EG 1.9 requires the Gateway API 1.6 CRDs before the controller is upgraded, otherwise TCP/UDP routes are silently skipped).eg-gateway-helm-certgenJob before re-apply (its pod template is immutable). certgen does not pass--overwrite, so existing control-plane cert secrets are kept.set -o pipefail,kubectl rollout statusfor the controller, warning if the installed Gateway API bundle differs fromgateway_api_version.triggersonenvoy_gateway_version,gateway_api_versionand the script hash (no destroy provisioner, so replacement only re-runs the idempotent install).v1.9.2, Gateway APIv1.6.1(EG 1.7.x→GW API 1.4.1, 1.8.x→1.5.1, 1.9.x→1.6.1).docs/GATEWAY_API_SETUP.md: remove the "install standard-install v1.0.0 first" step, which would downgrade/strip the experimental CRDs.Part of the UPGRADE_PLAN P0 item "Envoy Gateway + Gateway API CRDs". The live upgrade is done stepwise (1.7.5 → 1.8.5 → 1.9.2) using this script, then tfvars are bumped and reconciled with a targeted
-refresh=falseapply.Testing
terraform validatepasses.bash -npasses; CRD/non-CRD splitter verified against v1.7.5, v1.8.5 and v1.9.2 manifests (all documents accounted for).status.storedVersions(incl.tlsroutesv1alpha3,referencegrantsv1beta1) are still served in each bundle.Made with Cursor