Skip to content
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

discuss: ApisixRoute change struct #248

Closed
gxthrj opened this issue Feb 8, 2021 · 20 comments · Fixed by #262
Closed

discuss: ApisixRoute change struct #248

gxthrj opened this issue Feb 8, 2021 · 20 comments · Fixed by #262
Labels
Milestone

Comments

@gxthrj
Copy link
Contributor

gxthrj commented Feb 8, 2021

No description provided.

@gxthrj gxthrj added this to the 0.4.0 milestone Feb 8, 2021
@tokers
Copy link
Contributor

tokers commented Feb 18, 2021

The ApisixRoute should leverage the advantages of APISIX Routes as soon as possible, for instance, the flexible route match, native plugins support.

apiVersion: apisix.apache.org/v2alpha1
kind: ApisixRoute
metadata:
  name: httpbin-route
spec:
  http:
    - priority: 10
      name: rule1
       match:
         paths:
           - "/a"
           - "/bb*"
         methods:
          - GET
          - POST
        hosts:
          - a.com
          - aa.com
        remote_addrs:
          - 192.168.1.0/24
          - 10.0.5.12
        nginxVars:
          - subject: "$remote_addr"
            op: in
            array:
                - 127.0.0.1
                -  10.0.5.11
      backend:
        serviceName: httpbin
        servicePort: 8080
        resolveGranularity: endpoint # by default is endpoint, optional value can be "service".
      plugins:
        - name: redirect
           enable: true
           config:
             aaa: bbb
             ccc: ddd

The scripts are used by plugin orchestration, we don't use it.

@tokers
Copy link
Contributor

tokers commented Feb 18, 2021

@gxthrj

@gxthrj
Copy link
Contributor Author

gxthrj commented Feb 18, 2021

I think it might be a good idea to keep the pathtype, the structure is more expressive than *, and it will be easy to expand

@gxthrj
Copy link
Contributor Author

gxthrj commented Feb 18, 2021

Are priority and match the same level ?

@gxthrj
Copy link
Contributor Author

gxthrj commented Feb 18, 2021

I think it is more readable using upstream instead of route
Such as

upstream:
  serviceName: xxx
  servicePort: xxx

@tokers
Copy link
Contributor

tokers commented Feb 18, 2021

I think it is more readable using upstream instead of route

Such as

upstream:

  serviceName: xxx

  servicePort: xxx

Might as well. The route here is a verb.

@tokers
Copy link
Contributor

tokers commented Feb 19, 2021

Are priority and match the same level ?

Yep.

@tokers
Copy link
Contributor

tokers commented Feb 19, 2021

I think it is more readable using upstream instead of route
Such as

upstream:

  serviceName: xxx

  servicePort: xxx

Might as well. The route here is a verb.

What about backend? Just like Ingress.

@tokers
Copy link
Contributor

tokers commented Feb 19, 2021

I think it might be a good idea to keep the pathtype, the structure is more expressive than *, and it will be easy to expand

Well, I think anyone who uses Linux is familiar with "*"; Also, I think we don't need to consider the extensibility now, it depends on Apache APISIX's iteration and if so, just use a new version of ApisixRoute.

@gxthrj
Copy link
Contributor Author

gxthrj commented Feb 19, 2021

I think it is more readable using upstream instead of route
Such as

upstream:

  serviceName: xxx

  servicePort: xxx

Might as well. The route here is a verb.

What about backend? Just like Ingress.

Agreee

@gxthrj
Copy link
Contributor Author

gxthrj commented Feb 19, 2021

We need a field to specify whether to use pod IP or cluster service.

@tokers
Copy link
Contributor

tokers commented Feb 20, 2021

We need a field to specify whether to use pod IP or cluster service.

We always use Cluster Service, why we need this field?

@gxthrj
Copy link
Contributor Author

gxthrj commented Feb 20, 2021

We need a field to specify whether to use pod IP or cluster service.

We always use Cluster Service, why we need this field?

I mean is to give users the ability to choose whether to automatically register the pod IP.
The difference is that the node under upstream in APISIX is the pod IP or the cluster server name.

@tokers
Copy link
Contributor

tokers commented Feb 21, 2021

We need a field to specify whether to use pod IP or cluster service.

We always use Cluster Service, why we need this field?

I mean is to give users the ability to choose whether to automatically register the pod IP.

The difference is that the node under upstream in APISIX is the pod IP or the cluster server name.

What is automatically register pod ip? What can we get from it?

@gxthrj
Copy link
Contributor Author

gxthrj commented Feb 22, 2021

I mean to give users a choice, use clusterip or POD IP

@tokers
Copy link
Contributor

tokers commented Feb 22, 2021

I mean to give users a choice, use clusterip or POD IP

Got it.

@pioneer-hash
Copy link

Will the routing rules under Ingress be the same as the standard version of Apisix?

@tokers tokers mentioned this issue Feb 23, 2021
4 tasks
@tokers
Copy link
Contributor

tokers commented Feb 23, 2021

Will the routing rules under Ingress be the same as the standard version of Apisix?

Sure~.

@pioneer-hash
Copy link

pioneer-hash commented Mar 1, 2021

Is there any progress on Apisix-Route?

@tokers
Copy link
Contributor

tokers commented Mar 1, 2021

@pioneer-hash See #262 for more details.

@tokers tokers linked a pull request Mar 3, 2021 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants