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/03/18 09:00:07 UTC

[GitHub] [apisix-ingress-controller] tao12345666333 opened a new issue #926: bug: we should create APISIX routes even if Service is created later

tao12345666333 opened a new issue #926:
URL: https://github.com/apache/apisix-ingress-controller/issues/926


   > https://github.com/apache/apisix-ingress-controller/blob/c9e0c965cd2226e2c44aa4e692a8bf57d1586aa3/pkg/ingress/apisix_route.go#L261-L271
   > 
   > We will delete this event from workqueue if we have an `ApisixRoute` resources without any valid backends. It is reasonable?
   
   @cmssczy  This change is to fix the #810 and was introduced in #893 
   
   **This does cause some problems.**
   
   For example, create an ApisixRoute first, which references a service that does not exist.
   But when a Service is created, the APISIX Ingress controller can't actually create a route.
   
   _Originally posted by @tao12345666333 in https://github.com/apache/apisix-ingress-controller/issues/925#issuecomment-1072128249_


-- 
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] lingsamuel commented on issue #926: bug: we should create APISIX routes even if Service is created later

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


   Perhaps we need a cache to store the reference relationships.
   This cache should always store the relationships, regardless of whether sync raises an error or not.


-- 
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] cmssczy commented on issue #926: bug: we should create APISIX routes even if Service is created later

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


   I think we should discuss a plan first.
   
   IMO, first we should return `nil` if we got an `ApisixRoute` with no backends existed.
   https://github.com/apache/apisix-ingress-controller/blob/2178857fbe2608cec1dc8ce5b1e0ec232568b375/pkg/kube/translation/util.go#L37-L41
   
   Then we need a `service` controller to list/watch `update/create/delete` event which will be used to apply to apisix admin API.(maybe need more details)
   
   Or could we stop supporting `resolveGranularity`?


-- 
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] lingsamuel commented on issue #926: bug: we should create APISIX routes even if Service is created later

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


   Sorry for the late reply.
   Instead of creating a placeholder, I think it would be better to resync the routes that references the newly created service.


-- 
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 #926: bug: we should create APISIX routes even if Service is created later

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


   Maybe we can discuss it at the community meeting on Wednesday


-- 
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] cmssczy commented on issue #926: bug: we should create APISIX routes even if Service is created later

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


   we should create an apisix `upstream` with an empty `nodes` when user creates a `ApisixRoute` with a non-existent `service`.
   I write a demo for this solution. PTAL, https://github.com/cmssczy/apisix-ingress-controller/commit/3a729d9927d10481403ea0f5169c9a12b450fd8d


-- 
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 #926: bug: we should create APISIX routes even if Service is created later

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


   Creating an empty Upstream sounds good.
   In this way, when the Service is actually created, we can update it again.
   WDYT @lingsamuel @gxthrj 


-- 
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 #926: bug: we should create APISIX routes even if Service is created later

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


   @cmssczy Are you interested in fixing this problem?


-- 
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 #926: bug: we should create APISIX routes even if Service is created later

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


   Currently, we have a cache https://github.com/apache/apisix-ingress-controller/blob/master/pkg/apisix/cache/memdb.go
   we can extend it. WDYT?  @lingsamuel @gxthrj @tokers 


-- 
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 #926: bug: we should create APISIX routes even if Service is created later

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


   > Or could we stop supporting `resolveGranularity`?
   
   This feature is useful and we will not stop supporting 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



[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #926: bug: we should create APISIX routes even if Service is created later

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


   @lingsamuel  But currently we have discarded the event, how to resync it?
   
   We discussed the compensation mechanism for adding timing before https://github.com/apache/apisix-ingress-controller/issues/234   but this method is not real-time enough 


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