Revision 14f576449f0d8396b13e800c82d1f1cd07560555 authored by Arthur Outhenin-Chalandre on 08 June 2024, 00:03:57 UTC, committed by André Martins on 17 June 2024, 10:48:51 UTC
This commit fixes the case when a remote service gets deleted while the local service remains. Previously the Reconcile on the controller wasn't called because we weren't returning the deleted Service in the service informer List method which may leave some EndpointSlice in the cluster that should be deleted. In an usual Kubernetes environment this is not an issue since the OwnerReference should be deleting the EndpointSlices as well. In our case the actual Service still exist because we have this mechanism of creating "virtual" service by adding the cluster name in suffix to trigger a reconcile on each remote cluster. To fix that we are now returning the combination of all the local Services and the remote clusters instead of returning all the remote services. This allows to trigger a reconcile on all the possible services including some of them that don't exist which would make the Get method of the Service informer to return a not found error which will then trigger a deletion via our cleanup hook. Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
1 parent 6f9b8fd
File | Mode | Size |
---|---|---|
.gitignore | -rw-r--r-- | 13 bytes |
Makefile | -rw-r--r-- | 478 bytes |
main.go | -rw-r--r-- | 570 bytes |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...