-
Notifications
You must be signed in to change notification settings - Fork 138
feat: add native NGINX Ingress migration tool #2623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| description: Migrate your NGINX Ingress resources to Calico Ingress Gateway (Envoy Gateway) with an automated conversion tool and step-by-step playbook. | ||
| title: Migrating from NGINX | ||
| --- | ||
|
|
||
| import { IngressConverter } from '/src/___new___/components'; | ||
|
|
||
| # Migrating from NGINX Ingress | ||
|
|
||
| NGINX Ingress Controller [retired in March 2026](https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/) — no more releases, bugfixes, or security patches. Calico Ingress Gateway, powered by Envoy Gateway, is the recommended replacement. | ||
|
Check failure on line 10 in calico/networking/ingress-gateway/migrate-from-nginx.mdx
|
||
|
|
||
| This migration tool converts your NGINX Ingress resources (including annotations) into Gateway API equivalents and generates a personalised migration playbook. | ||
|
|
||
| ## What it converts | ||
|
|
||
| - **Structural Ingress fields** — hosts, paths, TLS, backends → Gateway, HTTPRoute, ReferenceGrant | ||
| - **NGINX annotations** — CORS, timeouts, rate limiting, auth, session affinity, rewrites, and 130+ more → SecurityPolicy, BackendTrafficPolicy, ClientTrafficPolicy | ||
| - **Supports both NGINX controllers** — community (`nginx.ingress.kubernetes.io/*`) and NGINX Inc/F5 (`nginx.org/*`, `nginx.com/*`) | ||
|
|
||
| Annotations that can't be auto-converted are flagged with "think in Envoy terms" guidance explaining how to achieve the same behavior in Envoy Gateway. | ||
|
|
||
| ## Try it now | ||
|
|
||
| Paste your NGINX Ingress YAML below to generate a conversion and migration playbook — everything runs in your browser, nothing is sent to a server. | ||
|
|
||
| <IngressConverter /> | ||
|
|
||
| ## Migration playbook | ||
|
|
||
| The converter generates a 6-section playbook tailored to your resources: | ||
|
|
||
| 1. **Pre-Migration Assessment** — what you have, what you'll get, what needs manual attention | ||
| 2. **Prepare** — install Envoy Gateway, review and apply converted resources | ||
| 3. **Verify (Parallel Running)** — test routes through Envoy Gateway without disrupting NGINX traffic | ||
| 4. **Traffic Shift** — DNS-based, weighted, or canary strategies with rollback instructions | ||
| 5. **Cleanup** — remove Ingress resources and NGINX controller | ||
| 6. **Post-Migration** — explore Gateway API features, set up observability | ||
|
|
||
| ## Need help? | ||
|
|
||
| For complex migrations (hundreds of Ingress resources, custom NGINX snippets, mTLS, NGINX Plus features), [talk to a Tigera engineer](https://www.tigera.io/contact/). | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| description: Migrate your NGINX Ingress resources to Calico Ingress Gateway (Envoy Gateway) with an automated conversion tool and step-by-step playbook. | ||
| title: Migrating from NGINX | ||
| --- | ||
|
|
||
| import { IngressConverter } from '/src/___new___/components'; | ||
|
|
||
| # Migrating from NGINX Ingress | ||
|
|
||
| NGINX Ingress Controller [retired in March 2026](https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/) — no more releases, bugfixes, or security patches. Calico Ingress Gateway, powered by Envoy Gateway, is the recommended replacement. | ||
|
Check failure on line 10 in calico_versioned_docs/version-3.31/networking/ingress-gateway/migrate-from-nginx.mdx
|
||
|
|
||
| This migration tool converts your NGINX Ingress resources (including annotations) into Gateway API equivalents and generates a personalised migration playbook. | ||
|
|
||
| ## What it converts | ||
|
|
||
| - **Structural Ingress fields** — hosts, paths, TLS, backends → Gateway, HTTPRoute, ReferenceGrant | ||
| - **NGINX annotations** — CORS, timeouts, rate limiting, auth, session affinity, rewrites, and 130+ more → SecurityPolicy, BackendTrafficPolicy, ClientTrafficPolicy | ||
| - **Supports both NGINX controllers** — community (`nginx.ingress.kubernetes.io/*`) and NGINX Inc/F5 (`nginx.org/*`, `nginx.com/*`) | ||
|
|
||
| Annotations that can't be auto-converted are flagged with "think in Envoy terms" guidance explaining how to achieve the same behavior in Envoy Gateway. | ||
|
|
||
| ## Try it now | ||
|
|
||
| Paste your NGINX Ingress YAML below to generate a conversion and migration playbook — everything runs in your browser, nothing is sent to a server. | ||
|
|
||
| <IngressConverter /> | ||
|
|
||
| ## Migration playbook | ||
|
|
||
| The converter generates a 6-section playbook tailored to your resources: | ||
|
|
||
| 1. **Pre-Migration Assessment** — what you have, what you'll get, what needs manual attention | ||
| 2. **Prepare** — install Envoy Gateway, review and apply converted resources | ||
| 3. **Verify (Parallel Running)** — test routes through Envoy Gateway without disrupting NGINX traffic | ||
| 4. **Traffic Shift** — DNS-based, weighted, or canary strategies with rollback instructions | ||
| 5. **Cleanup** — remove Ingress resources and NGINX controller | ||
| 6. **Post-Migration** — explore Gateway API features, set up observability | ||
|
|
||
| ## Need help? | ||
|
|
||
| For complex migrations (hundreds of Ingress resources, custom NGINX snippets, mTLS, NGINX Plus features), [talk to a Tigera engineer](https://www.tigera.io/contact/). | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,74 @@ | ||||||||||||||||||||||||||
| // Vendored from @tigera/ingress-to-gateway-web@0.7.0 | ||||||||||||||||||||||||||
| // Source: https://github.com/tigera/ing2gw (private) | ||||||||||||||||||||||||||
| // To update: copy packages/web/dist/{index.js,styles.css} → vendor/ | ||||||||||||||||||||||||||
| import { IngressInput, PlaybookOutput, YamlOutput, useConversion } from './vendor/ing2gw-web'; | ||||||||||||||||||||||||||
| import './vendor/ing2gw-web.css'; | ||||||||||||||||||||||||||
| import { marked } from 'marked'; | ||||||||||||||||||||||||||
| import React, { useCallback, useState } from 'react'; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| function MarkdownRenderer({ children }: { children: string }) { | ||||||||||||||||||||||||||
| const html = marked.parse(children, { async: false }) as string; | ||||||||||||||||||||||||||
| // biome-ignore lint/security/noDangerouslySetInnerHtml: markdown is generated by our own report engine, not user input | ||||||||||||||||||||||||||
|
Comment on lines
+8
to
+11
|
||||||||||||||||||||||||||
| function MarkdownRenderer({ children }: { children: string }) { | |
| const html = marked.parse(children, { async: false }) as string; | |
| // biome-ignore lint/security/noDangerouslySetInnerHtml: markdown is generated by our own report engine, not user input | |
| import sanitizeHtml from 'sanitize-html'; | |
| function MarkdownRenderer({ children }: { children: string }) { | |
| const rawHtml = marked.parse(children, { async: false }) as string; | |
| const html = sanitizeHtml(rawHtml, { | |
| allowedTags: sanitizeHtml.defaults.allowedTags, | |
| allowedAttributes: sanitizeHtml.defaults.allowedAttributes, | |
| }); |
Copilot
AI
Apr 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new React component doesn’t appear to have a Jest test alongside it, while other components under src/___new___/components/* commonly have snapshot tests in __test__/ (e.g., src/___new___/components/Explore/__test__/index.test.tsx). Adding at least a basic render/snapshot test would help prevent regressions when updating @tigera/ingress-to-gateway-web or the wrapper logic.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow now authenticates to GitHub Packages during
yarn install, but it doesn’t declarepermissions: packages: read. If the repository’s default GITHUB_TOKEN permissions don’t include packages access, dependency installation fromnpm.pkg.github.comwill fail. Consider adding explicitpackages: readpermissions (workflow- or job-level).