Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Routing #1032

Open
harshsharma22 opened this issue Apr 24, 2020 · 1 comment
Open

Routing #1032

harshsharma22 opened this issue Apr 24, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@harshsharma22
Copy link

harshsharma22 commented Apr 24, 2020

Feature Utilization
problem statement :-
i have multiple docker services each service expose some endpoint example (authentication/login/ , authentication/user/ these route belong authentication service )
and in those multiple service i have a service which append name of the service in route i.e (example my route become /api/authentication/authentication/login service added this route /api/authentication
so as of now i have been using nginx as my router in which i have added this conf
location /api/authentication/ to my authentication service
how can i achieve this in rio
i have solved this but for only one route by adding rewrite in i m my route . but my other endpoint give 405 as gloo doesn't consider them the end point because of one of my service which is appending name as describe above..
so how can i give route so that rio gloo can understand them via rio ?

To Reproduce

  1. start multiple service and in one service try adding name of the service to route

Expected behavior
should be able to route

Kubernetes version & type (GKE, on-prem): kubectl version

k3s. 1.17x

Type:
Rio version: rio info

version 0.0.7

here my riofile and route

lil-auth:
env:
- xXXXX
image: "xxx:555"
imagePullSecrets:
- secret

routers:
foo:
routes:
- match: # Match rules, the first rule matching an incoming request is used
path: # Match path, can specify regxp, prefix or exact match
exact: /api/auth/
to: # Specify destination
- app: lil-auth

        port: 80
        namespace: default
@harshsharma22 harshsharma22 added the bug Something isn't working label Apr 24, 2020
@j-wil
Copy link

j-wil commented Oct 30, 2020

I believe I am running into the same issue.

Rio Version: v0.8.0 (af7ad687)
Rio CLI Version: v0.8.0 (af7ad687)

Runnin on AKS 1.17.11

routers:
  abc:
    routes:
      - match:
          path: 
            exact: /users
        to:
          - app: abc-ui
            namespace: abc
            port: 80
      - match:
          path: 
            regxp: /password.*
        to:
          - app: abc-users
            namespace: abc
            port: 8180
      - match:
          path: 
            regxp: /tokens.*
        to:
          - app: abc-users
            namespace: abc
            port: 8180

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants