{"id":32440545,"url":"https://github.com/rinormaloku/gloo-redirector","last_synced_at":"2026-07-08T19:31:30.697Z","repository":{"id":124788450,"uuid":"518110649","full_name":"rinormaloku/gloo-redirector","owner":"rinormaloku","description":"Generate redirection configuration from a CSV file for Gloo Edge and Gloo Mesh.","archived":false,"fork":false,"pushed_at":"2022-07-28T11:35:21.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T01:51:31.563Z","etag":null,"topics":["gloo","gloo-edge","gloo-mesh"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rinormaloku.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-26T15:10:21.000Z","updated_at":"2022-07-28T11:08:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"817dd4d1-4344-4120-9843-74d6b09a03c0","html_url":"https://github.com/rinormaloku/gloo-redirector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rinormaloku/gloo-redirector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinormaloku%2Fgloo-redirector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinormaloku%2Fgloo-redirector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinormaloku%2Fgloo-redirector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinormaloku%2Fgloo-redirector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rinormaloku","download_url":"https://codeload.github.com/rinormaloku/gloo-redirector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinormaloku%2Fgloo-redirector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35276605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["gloo","gloo-edge","gloo-mesh"],"created_at":"2025-10-26T01:50:06.771Z","updated_at":"2026-07-08T19:31:30.690Z","avatar_url":"https://github.com/rinormaloku.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gloo Redirector\n\nGenerate redirection configuration from a CSV file for Gloo Edge and Gloo Mesh.\n\n**Install Gloo Redirector** by executing:\n```bash\ngo install github.com/rinormaloku/gloo-redirector@latest\n```\n\nAnd proceed with the examples below.\n\n## How to generate redirections\n\nWrite all the redirections in a CSV file. For example, to redirect traffic from the **initial_location** `https://solo.io/docs/a` to the **redirect_location** `https://docs.solo.io/a` with a **redirect_code** of `301` you'd use the following sequence: `initial_location,redirect_location,redirect_code`. \n\nThus, for the above example we'd write the following file (keep adding further entries in new lines):\n```\ncat \u003c\u003cEOF \u003e /tmp/redirections.csv\nhttps://solo.io/docs/a,https://docs.solo.io/a,301\nEOF\n```\n\nThen use the CSV as the source in the command below:\n```\ngloo-redirector edge generate --source /tmp/redirections.csv\n```\n\nThis produces the virtual services to configure the gateway proxies for redirecting traffic, as shown below:\n\n```yaml\napiVersion: gateway.solo.io/v1\nkind: VirtualService\nmetadata:\n  name: redirect-solo-io\n  namespace: gloo-system\nspec:\n  virtualHost:\n    domains:\n      - solo.io\n    routes:\n      - matchers:\n          - exact: /docs/a\n        redirectAction:\n          hostRedirect: docs.solo.io\n          pathRedirect: /a\n          responseCode: MOVED_PERMANENTLY\n```\n\n### Customizing the default template\n\nThe above output is based on a default template. The default one however, might not fit with your use-case.\nYou can print the template with the command below:\n```bash\n$ gloo-redirector edge print-template \n\napiVersion: gateway.solo.io/v1\nkind: VirtualService\nmetadata:\n  name: redirect-{{ .ResourceName }}\n  namespace: gloo-system\nspec:\n  virtualHost:\n    domains:\n      - {{  .Host }}\n    routes:\n    {{- range $matcher := .Matchers }}\n      - matchers:\n          - exact: {{ $matcher.ExactPath }}\n        redirectAction:\n          hostRedirect: {{ $matcher.HostRewrite }}\n          pathRedirect: {{ $matcher.PathRewrite }}\n          responseCode: {{ $matcher.RedirectCode }}\n    {{- end }}\n```\n\nRedirect the output to a file (e.g. `/tmp/template.yaml`) and modify it to your liking.\nThen you can execute the generate command with your template:\n\n```bash\ngloo-redirector edge generate --source /tmp/redirections.csv --template /tmp/template.yaml\n```\n\n**TIP**: You can pipe the output to kubectl:\n```bash\ngloo-redirector edge generate --source /tmp/redirections.csv | kubectl apply -f - \n```\n\n## Gloo Redirector Help\n```bash\n$ gloo-redirector --help\n\nGloo Redirector generates 3xx redirection configuration for either Gloo Edge and Gloo Mesh.\nExamples:\n  # Generate Gloo Mesh redirection configuration using a file as a source with the default template\n  gloo-redirector mesh generate --source /tmp/redirections.csv\n\n  # Generate Gloo Edge redirection configuration using a file as a source with the default template\n  gloo-redirector edge generate --source /tmp/redirections.csv\n\nUsage:\n  gloo-redirector [command]\n\nAvailable Commands:\n  edge        Gloo Edge commands\n  mesh        Gloo Mesh commands\n\nFlags:\n  -h, --help   help for gloo-redirector\n\nUse \"gloo-redirector [command] --help\" for more information about a command.\n```\n\n**NOTE:** [istio-redirector](https://github.com/blablacar/istio-redirector) was the starting point for this CLI.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frinormaloku%2Fgloo-redirector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frinormaloku%2Fgloo-redirector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frinormaloku%2Fgloo-redirector/lists"}