{"id":43172921,"url":"https://github.com/pmady/ingress2gateway","last_synced_at":"2026-02-01T02:37:17.528Z","repository":{"id":329167507,"uuid":"1112042443","full_name":"pmady/ingress2gateway","owner":"pmady","description":"Convert Kubernetes Ingress objects to Gateway API resources - Web GUI and REST API","archived":false,"fork":false,"pushed_at":"2025-12-17T21:46:41.000Z","size":213,"stargazers_count":2,"open_issues_count":12,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-21T06:51:16.128Z","etag":null,"topics":["cloud-native","converter","fastapi","gateway-api","ingress","kubernetes","python"],"latest_commit_sha":null,"homepage":"https://ingress2gateway.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmady.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-08T04:20:11.000Z","updated_at":"2025-12-17T21:46:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pmady/ingress2gateway","commit_stats":null,"previous_names":["pmady/ingress2gateway"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pmady/ingress2gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmady%2Fingress2gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmady%2Fingress2gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmady%2Fingress2gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmady%2Fingress2gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmady","download_url":"https://codeload.github.com/pmady/ingress2gateway/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmady%2Fingress2gateway/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28965430,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T02:14:24.993Z","status":"ssl_error","status_checked_at":"2026-02-01T02:13:55.706Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud-native","converter","fastapi","gateway-api","ingress","kubernetes","python"],"created_at":"2026-02-01T02:37:15.551Z","updated_at":"2026-02-01T02:37:17.522Z","avatar_url":"https://github.com/pmady.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ingress to Gateway API Converter\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![CI](https://github.com/pmady/ingress2gateway/actions/workflows/ci.yml/badge.svg)](https://github.com/pmady/ingress2gateway/actions/workflows/ci.yml)\n[![Documentation Status](https://readthedocs.org/projects/ingress2gateway/badge/?version=latest)](https://ingress2gateway.readthedocs.io/en/latest/?badge=latest)\n\nA comprehensive tool to convert Kubernetes Ingress objects to Gateway API resources with CLI, Web UI, and GitHub Action support.\n\n## Features\n\n### Core Conversion\n\n- **Ingress → Gateway API**: Convert Ingress to Gateway + HTTPRoute resources\n- **Gateway API → Ingress**: Reverse conversion for migration rollback\n- **Multi-document YAML**: Process multiple Ingress resources at once\n- **GRPCRoute Support**: Automatic detection and conversion of gRPC backends\n- **TCPRoute/UDPRoute**: Support for TCP and UDP backend services\n- **ReferenceGrant**: Auto-generate ReferenceGrants for cross-namespace references\n\n### Annotation Support\n\n- **Nginx Ingress**: Rewrite rules, SSL redirect, CORS, rate limiting\n- **Traefik**: Middlewares, entrypoints, priorities\n- **Istio**: Ingress class, revision labels\n- **AWS ALB**: Certificate ARN, target type, scheme, actions\n- **GCE/GKE**: Static IP, managed certificates, backend config\n\n### Provider Presets\n\n| Provider | Gateway Class | gRPC | TCP |\n|----------|---------------|------|-----|\n| Istio | `istio` | ✓ | ✓ |\n| Envoy Gateway | `eg` | ✓ | ✓ |\n| Contour | `contour` | ✓ | ✓ |\n| Kong | `kong` | ✓ | ✓ |\n| NGINX Gateway Fabric | `nginx` | ✗ | ✗ |\n| Traefik | `traefik` | ✓ | ✓ |\n| GKE | `gke-l7-global-external-managed` | ✓ | ✗ |\n\n### User Interfaces\n\n- **Web GUI**: Interactive interface with dark/light theme, diff view, validation\n- **CLI Tool**: Full-featured command-line interface\n- **REST API**: Programmatic conversion endpoints\n- **GitHub Action**: CI/CD integration for automated conversion\n- **kubectl Plugin**: Native kubectl integration\n- **Helm Chart**: Deploy web UI to Kubernetes\n\n### Additional Features\n\n- **Validation**: Input and output schema validation\n- **Migration Reports**: Detailed markdown reports with manual steps\n- **Download Options**: Single YAML, separate files, or Kustomize structure\n\n## Installation\n\n### Using pip\n\n```bash\npip install ingress2gateway\n```\n\n### Using uv (recommended for development)\n\n```bash\n# Install uv if not already installed\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Clone and install\ngit clone https://github.com/pmady/ingress2gateway.git\ncd ingress2gateway\nuv sync\n```\n\n### From source\n\n```bash\ngit clone https://github.com/pmady/ingress2gateway.git\ncd ingress2gateway\npip install -e .\n```\n\n## Quick Start\n\n### CLI Usage\n\nThe CLI is available as `i2g` (short) or `ingress2gateway` (full name):\n\n```bash\n# Basic conversion\ni2g convert ingress.yaml -o gateway.yaml\n\n# With provider preset\ni2g convert ingress.yaml -o gateway.yaml -p istio\n\n# Enable gRPC detection\ni2g convert ingress.yaml -o gateway.yaml --grpc\n\n# Generate migration report\ni2g convert ingress.yaml -o gateway.yaml --report migration.md\n\n# Reverse conversion (Gateway API to Ingress)\ni2g reverse gateway.yaml -o ingress.yaml\n\n# Validate Ingress file\ni2g validate ingress.yaml\n\n# List available providers\ni2g providers\n\n# Start web server\ni2g serve --port 8000\n```\n\n### Web Interface\n\n1. Start the server:\n\n   ```bash\n   i2g serve --port 8000\n   ```\n\n2. Open \u003chttp://localhost:8000\u003e in your browser\n\n3. Paste your Ingress YAML in the left panel\n\n4. Select your provider preset\n\n5. Click \"Convert\" to generate Gateway API resources\n\n**Web UI Features:**\n\n- Dark/light theme toggle\n- Provider selection dropdown\n- Bidirectional conversion (Ingress ↔ Gateway)\n- gRPC detection option\n- Diff summary showing field mappings\n- Validation results with errors/warnings\n- Multiple download formats (YAML, ZIP, Kustomize)\n- Migration report generation\n\n### REST API\n\n```bash\n# Convert Ingress to Gateway API\ncurl -X POST http://localhost:8000/api/convert \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"ingress_yaml\": \"apiVersion: networking.k8s.io/v1\\nkind: Ingress...\",\n    \"provider\": \"istio\",\n    \"detect_grpc\": false\n  }'\n\n# Reverse conversion\ncurl -X POST http://localhost:8000/api/reverse \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"gateway_yaml\": \"...\"}'\n\n# Validate YAML\ncurl -X POST http://localhost:8000/api/validate \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"yaml_content\": \"...\", \"resource_type\": \"ingress\"}'\n\n# List providers\ncurl http://localhost:8000/api/providers\n\n# Download as single YAML\ncurl -X POST http://localhost:8000/api/download/single \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ingress_yaml\": \"...\"}' -o gateway.yaml\n\n# Download as Kustomize\ncurl -X POST http://localhost:8000/api/download/kustomize \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ingress_yaml\": \"...\"}' -o gateway-kustomize.zip\n\n# Generate migration report\ncurl -X POST http://localhost:8000/api/report \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"ingress_yaml\": \"...\"}' -o migration-report.md\n```\n\n### GitHub Action\n\nAdd to your workflow:\n\n```yaml\nname: Convert Ingress to Gateway API\n\non:\n  push:\n    paths:\n      - 'k8s/ingress.yaml'\n\njobs:\n  convert:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Convert Ingress to Gateway API\n        uses: pmady/ingress2gateway@v1\n        with:\n          input-file: k8s/ingress.yaml\n          output-file: k8s/gateway.yaml\n          provider: istio\n          generate-report: true\n          report-file: migration-report.md\n\n      - name: Commit converted files\n        run: |\n          git config --local user.email \"action@github.com\"\n          git config --local user.name \"GitHub Action\"\n          git add k8s/gateway.yaml migration-report.md\n          git commit -m \"Convert Ingress to Gateway API\" || exit 0\n          git push\n```\n\n**Action Inputs:**\n\n| Input | Description | Required | Default |\n|-------|-------------|----------|---------|\n| `input-file` | Path to input Ingress YAML | Yes | - |\n| `output-file` | Path to output Gateway YAML | No | `gateway-resources.yaml` |\n| `provider` | Gateway provider preset | No | `istio` |\n| `detect-grpc` | Enable gRPC detection | No | `false` |\n| `generate-report` | Generate migration report | No | `false` |\n| `report-file` | Path to report file | No | `migration-report.md` |\n\n### kubectl Plugin\n\nInstall the kubectl plugin for native kubectl integration:\n\n```bash\n# Download and install\ncurl -LO https://github.com/pmady/ingress2gateway/releases/latest/download/kubectl-ingress2gateway\nchmod +x kubectl-ingress2gateway\nsudo mv kubectl-ingress2gateway /usr/local/bin/\n\n# Usage\nkubectl ingress2gateway convert my-ingress -n default\nkubectl ingress2gateway list -A\nkubectl ingress2gateway apply my-ingress -n default --dry-run\nkubectl ingress2gateway diff my-ingress -n default\n```\n\n### Helm Chart\n\nDeploy the web UI to your Kubernetes cluster:\n\n```bash\n# Add the Helm repository\nhelm repo add ingress2gateway https://pmady.github.io/ingress2gateway\nhelm repo update\n\n# Install\nhelm install ingress2gateway ingress2gateway/ingress2gateway\n\n# With custom values\nhelm install ingress2gateway ingress2gateway/ingress2gateway \\\n  --set ingress.enabled=true \\\n  --set ingress.hosts[0].host=ingress2gateway.example.com\n```\n\n## Conversion Mapping\n\n### Resource Mapping\n\n| Ingress | Gateway API |\n|---------|-------------|\n| `Ingress` | `Gateway` + `HTTPRoute` |\n| `spec.ingressClassName` | `spec.gatewayClassName` |\n| `spec.tls` | `Gateway.spec.listeners` (HTTPS) |\n| `spec.rules[].host` | `HTTPRoute.spec.hostnames` |\n| `spec.rules[].http.paths` | `HTTPRoute.spec.rules` |\n| `backend.service` | `HTTPRoute.spec.rules[].backendRefs` |\n| `pathType: Prefix` | `path.type: PathPrefix` |\n| `pathType: Exact` | `path.type: Exact` |\n\n### Annotation Mapping\n\n| Nginx Annotation | Gateway API Equivalent |\n|------------------|------------------------|\n| `nginx.ingress.kubernetes.io/rewrite-target` | `HTTPRoute.filters[].urlRewrite` |\n| `nginx.ingress.kubernetes.io/ssl-redirect` | `HTTPRoute.filters[].requestRedirect` |\n| `nginx.ingress.kubernetes.io/backend-protocol: GRPC` | Creates `GRPCRoute` instead |\n\n## API Reference\n\n### Endpoints\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/` | Web UI |\n| `GET` | `/health` | Health check |\n| `GET` | `/api/providers` | List available providers |\n| `POST` | `/api/convert` | Convert Ingress to Gateway API |\n| `POST` | `/api/reverse` | Convert Gateway API to Ingress |\n| `POST` | `/api/validate` | Validate YAML content |\n| `POST` | `/api/download/single` | Download as single YAML |\n| `POST` | `/api/download/separate` | Download as separate files (ZIP) |\n| `POST` | `/api/download/kustomize` | Download as Kustomize structure |\n| `POST` | `/api/report` | Generate migration report |\n\n### Python API\n\n```python\nfrom ingress2gateway import (\n    convert_ingress_to_gateway,\n    parse_ingress,\n    resources_to_yaml,\n    apply_provider_defaults,\n    validate_ingress,\n    convert_gateway_to_ingress,\n    generate_migration_report,\n)\n\n# Parse and convert\ningress = parse_ingress(yaml_content)\nresources = convert_ingress_to_gateway(ingress)\n\n# Apply provider defaults\nresources[\"gateway\"] = apply_provider_defaults(resources[\"gateway\"], \"istio\")\n\n# Validate\nresult = validate_ingress(ingress)\nif result.is_valid:\n    print(\"Valid!\")\n\n# Generate YAML output\noutput = resources_to_yaml(resources)\nprint(output)\n```\n\n## Development\n\n```bash\n# Clone repository\ngit clone https://github.com/pmady/ingress2gateway.git\ncd ingress2gateway\n\n# Install dev dependencies\nuv sync --all-extras\n\n# Run tests\nuv run pytest\n\n# Run tests with coverage\nuv run pytest --cov=src/ingress2gateway\n\n# Format code\nuv run ruff format .\n\n# Lint\nuv run ruff check .\n\n# Start dev server with auto-reload\nuv run uvicorn src.ingress2gateway.main:app --reload\n```\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\nAll contributors must sign off their commits (DCO). See the contributing guide for instructions.\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n\n## Related Projects\n\n- [Gateway API](https://gateway-api.sigs.k8s.io/) - Official Kubernetes Gateway API\n- [Kubernetes SIG Network](https://github.com/kubernetes-sigs/ingress2gateway) - Official ingress2gateway tool\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmady%2Fingress2gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmady%2Fingress2gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmady%2Fingress2gateway/lists"}