You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "acuteaura (via GitHub)" <gi...@apache.org> on 2023/08/25 13:34:43 UTC
[GitHub] [apisix-ingress-controller] acuteaura opened a new issue, #1935: bug: controller doesn't remove routes for deleted ingresses
acuteaura opened a new issue, #1935:
URL: https://github.com/apache/apisix-ingress-controller/issues/1935
### Current Behavior
Old routes are still visible in the apisix API.
### Expected Behavior
Routes are deleted as soon as the ingress is removed.
Note that delivery of deletion events is not guaranteed in Kubernetes, and a finalizer would be needed to guarantee backing objects are removed. The controller could also periodically check if all routes marked as managed by the controller are still referenced.
### Error Logs
N/A
### Steps to Reproduce
1. Stop the controller (to simulate missing the event; this can happen for various reasons, like intermittent network errors)
2. Delete an ingress
3. Check http://apisix-admin:9180/apisix/admin/routes/
### Environment
- APISIX Ingress controller version (run `apisix-ingress-controller version --long`) v1.6.0
- Kubernetes cluster version (run `kubectl version`) v1.26.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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: controller doesn't remove routes for deleted ingresses [apisix-ingress-controller]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1935:
URL: https://github.com/apache/apisix-ingress-controller/issues/1935#issuecomment-1826991207
This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.
--
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 #1935: bug: controller doesn't remove routes for deleted ingresses
Posted by "tao12345666333 (via GitHub)" <gi...@apache.org>.
tao12345666333 commented on issue #1935:
URL: https://github.com/apache/apisix-ingress-controller/issues/1935#issuecomment-1694997661
For controllers, they usually process events based on what they receive. However, we also have a compensation mechanism that allows for full data synchronization according to the information configured in Kubernetes within a specific period of time.
FYI: https://github.com/apache/apisix-ingress-controller/blob/c3174d46fb2dfabd1472326688df873509d72ce2/conf/config-default.yaml#L58-L60
--
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] acuteaura commented on issue #1935: bug: controller doesn't remove routes for deleted ingresses
Posted by "acuteaura (via GitHub)" <gi...@apache.org>.
acuteaura commented on issue #1935:
URL: https://github.com/apache/apisix-ingress-controller/issues/1935#issuecomment-1696050378
This seems sensible, though I'd like to note again that events from informers are not reliable, and finalizers exist for resources where missing a deletion event can cause severe errors in state. Usually the flow goes like this:
* The controller sets a unique key in metadata.finalizers (namespaces have "kubernetes" there, for instance)
* When at least one finalizer is present and apiserver receives a delete for an object, it is not deleted, by metadata.deletionTimestamp is set. In Kubectl output the resource now shows as "deleting".
* The controller runs the logic required to clean up resources in the background, and only then removed the finalizer with its unique key.
* As soon as all finalizers are removed, apiserver deletes the resource.
Bad things can happen if you force-delete resources (which ignores the finalizers) - we once had a case of your cloud provider having several tens of dead loadbalancers because developers force-deleted their associated service objects and the controller couldn't clean up.
For an ingress that is unambiguously created to be consumed by apisix (e.g. matching ingressClassName), a finalizer might be a good alternative, but you also need to consider that imo, those fields aren't locked like Service type, so an ingress may fall out of scope for different reasons and then not get removed.
--
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
Re: [I] bug: controller doesn't remove routes for deleted ingresses [apisix-ingress-controller]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #1935: bug: controller doesn't remove routes for deleted ingresses
URL: https://github.com/apache/apisix-ingress-controller/issues/1935
--
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
Re: [I] bug: controller doesn't remove routes for deleted ingresses [apisix-ingress-controller]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1935:
URL: https://github.com/apache/apisix-ingress-controller/issues/1935#issuecomment-1870733634
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.
--
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