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 2021/07/19 04:52:07 UTC

[GitHub] [apisix-ingress-controller] ly123-liu opened a new issue #599: apisixroute 不支持多ns隔离

ly123-liu opened a new issue #599:
URL: https://github.com/apache/apisix-ingress-controller/issues/599


   版本情况:
   * apisix version:2.6
   * etcd version: 3.5
   * apisix-dashboard version: 2.7
   
   背景:我们在一个k8s集群内部存在多个ns,我们希望每个ns调用各自ns里的服务(ns隔离流量),在测试apisixroute 发现,通过apisixroute增加的配置,默认会加在所有ns下的apisix中
   
   如下图,在prod-test ns下增加apisixroute:  prod-test-ingress-clearonline-apisix-route , 在tp-perf ns 增加apisixroute: tp-perf-ingress-trade-apisix-route
   ![image](https://user-images.githubusercontent.com/57338370/126094583-5f1910b9-de09-45ab-92c7-2da847410961.png)
   
   etcd中在prod-test 及tp-perf 可以看到两条路由均存在,如下图信息
   1)tp-perf ns
   /apisix/tp-perf/routes/56ab3ba1
   {"upstream_id":"4151458","plugins":{"proxy-rewrite":{"scheme":"http","regex_uri":["^\/clearonline\/v1\/(.*)","\/clearonline\/$1"]}},"name":"prod-test_prod-test-ingress-clearonline-apisix-route_rule1","uris":["\/clearonline\/v1\/*"],"id":"56ab3ba1","labels":{"managed-by":"apisix-ingress-controller"},"create_time":1626661747,"priority":0,"update_time":1626661747,"desc":"Created by apisix-ingress-controller, DO NOT modify it manually","status":1}
   /apisix/tp-perf/routes/5e88004f
   {"upstream_id":"a73e1061","plugins":{"proxy-rewrite":{"scheme":"http","regex_uri":["^\/trade\/v1\/(.*)","\/trade\/$1"]}},"name":"tp-perf_tp-perf-ingress-trade-apisix-route_rule1","uris":["\/trade\/v1\/*"],"id":"5e88004f","labels":{"managed-by":"apisix-ingress-controller"},"create_time":1626661747,"priority":0,"update_time":1626661747,"desc":"Created by apisix-ingress-controller, DO NOT modify it manually","status":1}
   /apisix/tp-perf/upstreams/4151458
   {"type":"roundrobin","hash_on":"vars","name":"prod-test_clearonline_8080","update_time":1626661747,"pass_host":"pass","labels":{"managed-by":"apisix-ingress-controller"},"create_time":1626661747,"nodes":[{"port":8080,"host":"172.28.0.204","priority":0,"weight":100}],"scheme":"http","desc":"Created by apisix-ingress-controller, DO NOT modify it manually","id":"4151458"}
   /apisix/tp-perf/upstreams/a73e1061
   {"type":"roundrobin","hash_on":"vars","name":"tp-perf_trade_8080","update_time":1626661747,"pass_host":"pass","labels":{"managed-by":"apisix-ingress-controller"},"create_time":1626661747,"nodes":[{"port":8080,"host":"172.28.1.93","priority":0,"weight":100}],"scheme":"http","desc":"Created by apisix-ingress-controller, DO NOT modify it manually","id":"a73e1061"}
   
   
   2)prod-test ns
   {"priority":0,"status":1,"uris":["\/clearonline\/v1\/*"],"update_time":1626661747,"name":"prod-test_prod-test-ingress-clearonline-apisix-route_rule1","create_time":1626661747,"desc":"Created by apisix-ingress-controller, DO NOT modify it manually","upstream_id":"4151458","plugins":{"proxy-rewrite":{"regex_uri":["^\/clearonline\/v1\/(.*)","\/clearonline\/$1"],"scheme":"http"}},"labels":{"managed-by":"apisix-ingress-controller"},"id":"56ab3ba1"}
   /apisix/prod-test/routes/5e88004f
   {"priority":0,"status":1,"uris":["\/trade\/v1\/*"],"update_time":1626661747,"name":"tp-perf_tp-perf-ingress-trade-apisix-route_rule1","create_time":1626661747,"desc":"Created by apisix-ingress-controller, DO NOT modify it manually","upstream_id":"a73e1061","plugins":{"proxy-rewrite":{"regex_uri":["^\/trade\/v1\/(.*)","\/trade\/$1"],"scheme":"http"}},"labels":{"managed-by":"apisix-ingress-controller"},"id":"5e88004f"}
   /apisix/prod-test/services/
   
   /apisix/prod-test/upstreams/4151458
   {"nodes":[{"weight":100,"priority":0,"port":8080,"host":"172.28.0.204"}],"hash_on":"vars","scheme":"http","update_time":1626661747,"type":"roundrobin","name":"prod-test_clearonline_8080","create_time":1626661747,"desc":"Created by apisix-ingress-controller, DO NOT modify it manually","pass_host":"pass","labels":{"managed-by":"apisix-ingress-controller"},"id":"4151458"}
   /apisix/prod-test/upstreams/a73e1061
   {"nodes":[{"weight":100,"priority":0,"port":8080,"host":"172.28.1.93"}],"hash_on":"vars","scheme":"http","update_time":1626661747,"type":"roundrobin","name":"tp-perf_trade_8080","create_time":1626661747,"desc":"Created by apisix-ingress-controller, DO NOT modify it manually","pass_host":"pass","labels":{"managed-by":"apisix-ingress-controller"},"id":"a73e1061"}
   
   
   在查看apisixroute源码看上去是不支持类似ingress controller 的ingress_class 类型?
   但是我是用ingress类型,通过配置kubernetes.io/ingress_class: "xxxx" 是可以实现prod-test ns只获取属于对应ingress class的ingress资源的,但是apisixroute 不支持,请问可以支持吗?
   


-- 
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 #599: apisixroute 不支持多ns隔离

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


   Related to https://github.com/apache/apisix-ingress-controller/issues/592.


-- 
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 #599: apisixroute 不支持多ns隔离

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


   We can track this requirement with #592 and we will implement it.  Thanks!
   
   I will close this issue. If you want to participate in more discussions you can add in #592


-- 
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] gxthrj commented on issue #599: apisixroute 不支持多ns隔离

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


   > we can not use kubernetes.app_namespaces to one ns, as some service sometimes need to be used cross ns..
   > 
   > ingressClass is really usefully, hope to be supported in the future, thanks
   
   Yes, This is one of the reasons why we need `IngressClass`.


-- 
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 #599: apisixroute 不支持多ns隔离

Posted by GitBox <gi...@apache.org>.
tao12345666333 closed issue #599:
URL: https://github.com/apache/apisix-ingress-controller/issues/599


   


-- 
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] ly123-liu commented on issue #599: apisixroute 不支持多ns隔离

Posted by GitBox <gi...@apache.org>.
ly123-liu commented on issue #599:
URL: https://github.com/apache/apisix-ingress-controller/issues/599#issuecomment-882259076


   we can not use kubernetes.app_namespaces to one ns, as some service sometimes need to be used cross ns..
   
   ingressClass is really usefully, hope to be supported in the future, thanks


-- 
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