You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/10/10 07:15:08 UTC

[GitHub] [apisix-ingress-controller] hyt05 opened a new issue, #1376: request help: ApisixRoute资源如何使用 Route 中的 vars

hyt05 opened a new issue, #1376:
URL: https://github.com/apache/apisix-ingress-controller/issues/1376

   ### Issue description
   
   In the example you can register a route using vars to match http requests
   ```
   curl -i http://127.0.0.1:9180/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "uri": "/hello",
       "host": "foo.com",
       "vars": [
           [
               "scheme",
               "==",
               "http"
           ]
       ],
       "plugins": {
           "redirect": {
               "uri": "https://$host$request_uri",
               "ret_code": 301
           }
       }
   }'
   ```
   The scope in ApisixRoute does not seem to support customization, only Header, Query and CookiePath are supported
   ```
   apiVersion: apisix.apache.org/v2beta3
   kind: ApisixRoute
   metadata:
     annotations:
       meta.helm.sh/release-name: erp-yhcbs-ui
       meta.helm.sh/release-namespace: erp
     creationTimestamp: "2022-10-10T03:34:34Z"
     generation: 5
     labels:
       app.kubernetes.io/managed-by: Helm
     name: erp-yhcbs-ui
     namespace: erp
     resourceVersion: "515415515"
     uid: 8c6bf8dc-8a2c-4528-833c-b3ff68b1475a
   spec:
     http:
     - backends:
       - serviceName: erp-yhcbs-ui
         servicePort: 80
       match:
         exprs:
         - op: Equal
           subject:
             name: env
             scope: Query
           value: http
         hosts:
         - test.test.cn
         paths:
         - /*
       name: erp-yhcbs-ui
       plugins:
       - config:
           ret_code: 301
           uri: https://$host$request_uri
         enable: true
         name: redirect
   ```
   
   ### Environment
   
   - your apisix-ingress-controller version (output of apisix-ingress-controller version --long):   apisix-ingress-controller:1.4.1
   - your Kubernetes cluster version (output of kubectl version):    v1.24.2+rke2r1
   - if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):     5.15.0-39-generic #42-Ubuntu
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #1376: request help: How ApisixRoute resources use vars in Route

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1376:
URL: https://github.com/apache/apisix-ingress-controller/issues/1376#issuecomment-1273329043

   Yes. If I remember correctly, the feature is not implemented yet


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tokers commented on issue #1376: request help: How ApisixRoute resources use vars in Route

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #1376:
URL: https://github.com/apache/apisix-ingress-controller/issues/1376#issuecomment-1273976937

   @hyt05 We don't have a specific proposal for this, but maybe extend the `exprs` would be a good idea, i.e., adding a new scope type `Variable`.
   
   ```yaml
   exprs:
     subject:
       name: http_x_user_id
             scope: Variable
       op: Equal
       value: 132
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #1376: feature request: ApisixRoute resources use vars in Route

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1376:
URL: https://github.com/apache/apisix-ingress-controller/issues/1376#issuecomment-1303187892

   Don't worry. I will reopen this for tracking.
   
   Let's keep it open and make it happen


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] hyt05 commented on issue #1376: request help: How ApisixRoute resources use vars in Route

Posted by GitBox <gi...@apache.org>.
hyt05 commented on issue #1376:
URL: https://github.com/apache/apisix-ingress-controller/issues/1376#issuecomment-1273449599

   > Yes. If I remember correctly, the feature is not implemented yet
   
   Is it in the plan


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #1376: feature request: ApisixRoute resources use vars in Route

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1376:
URL: https://github.com/apache/apisix-ingress-controller/issues/1376#issuecomment-1274028764

   Are you interested in making it happen?  Contact me if you need help


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] hyt05 commented on issue #1376: feature request: ApisixRoute resources use vars in Route

Posted by GitBox <gi...@apache.org>.
hyt05 commented on issue #1376:
URL: https://github.com/apache/apisix-ingress-controller/issues/1376#issuecomment-1277463602

   Thank you for your trust, I don't have development capabilities at the moment, and if I did, I would be honored to make it happen


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #1376: feature request: ApisixRoute resources use vars in Route

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1376:
URL: https://github.com/apache/apisix-ingress-controller/issues/1376#issuecomment-1274028079

   Yes, we can add this to our plan. 
   
   Currently we are in the development cycle of v1.6 version, I think it can add in v1.6


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] hyt05 closed issue #1376: feature request: ApisixRoute resources use vars in Route

Posted by GitBox <gi...@apache.org>.
hyt05 closed issue #1376: feature request:  ApisixRoute resources use vars in Route
URL: https://github.com/apache/apisix-ingress-controller/issues/1376


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #1376: feature request: ApisixRoute resources use vars in Route

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1376:
URL: https://github.com/apache/apisix-ingress-controller/issues/1376#issuecomment-1327250851

   #1466  has been merged. I will close this one.
   
   The feature will in v1.6 version.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 closed issue #1376: feature request: ApisixRoute resources use vars in Route

Posted by GitBox <gi...@apache.org>.
tao12345666333 closed issue #1376: feature request:  ApisixRoute resources use vars in Route
URL: https://github.com/apache/apisix-ingress-controller/issues/1376


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] AlinsRan commented on issue #1376: feature request: ApisixRoute resources use vars in Route

Posted by GitBox <gi...@apache.org>.
AlinsRan commented on issue #1376:
URL: https://github.com/apache/apisix-ingress-controller/issues/1376#issuecomment-1316652011

   > @hyt05 We don't have a specific proposal for this, but maybe extend the `exprs` would be a good idea, i.e., adding a new scope type `Variable`.
   > 
   > ```yaml
   > exprs:
   >   subject:
   >     name: http_x_user_id
   >           scope: Variable
   >     op: Equal
   >     value: 132
   > ```
   
   Agreed. This is a great idea. Let me implement it!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org