-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controller should check for orphan shadow services #563
Comments
In the past there was a poor mans "audit" that ran on a timer to verify all services were matched up, and that if there was a missing shadow service, trigger it as a new create event. Did we want to go this route? |
I think doing this check at startup is enough. Maybe that's not necessary if the shadow service manager is idempotent (#562). This will ensure that orphan services will not disrupt the system. One problem with the orphan shadow services is that they hold entry points for nothing. |
Just a thought, maybe we could use ownerReferences to make sure that shadow service are properly deleted. wdyt? |
oooo That is a neat idea. Letting kubernetes handle it automatically? I like it. |
Yep, that's the idea. If a shadow service has a user service as Btw, I think that we should try to handle orphan shadow services gracefully to avoid port leaks which will disrupt the system. |
@kevinpollet I did a test with the
The first solution is the easiest to implement and the less disruptive. The second adds one more moving piece in the system and will introduce some delay. The third solution simplify the port mapping management but has a cost. We would have to build this table before each build of the topology. I tend to prefer the 3rd option or eventually the 1st. |
@jspdown I think that if we use references, we lose a bit of control over the deletion events. We have to just "trust" that things will be handled properly by k8s. We would have to run an "audit" loop to verify that k8s has in fact, removed the objects it was supposed to. However, isn't the goal to remove the persistent state table entirely, and use the shadow services as the source of truth? |
Using
https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ |
Feature Request
Proposal
To make sure that shadow services exist for
services
created before Maesh installation or when thecontroller
is down, at startup, thecontroller
list the existing services and create the missing shadow services.A nice addition could be to check that all shadow services have a corresponding service to check that there are no orphans. e.g. when a service is deleted during
controller
downtime.The text was updated successfully, but these errors were encountered: