-
Notifications
You must be signed in to change notification settings - Fork 78
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
Change default behavior to always wait for reconciliation & deletion confirmation #438
Comments
Proposed fixes:
|
/assign @karlkfi |
@ash2k @haiyanmeng @mortent |
@karlkfi I agree with the list of issues and I agree with the plan to address them 👍 In my case, I don't mind if cli-utils breaks API compatibility (if that would be necessary) to address any issues as long as:
|
Related effort to make cancellation better/faster: #440 |
I agree with the issues and the proposed solution. I think it would also be useful to be able to specify |
Yeah, it sounds like @haiyanmeng wants this for Config Sync, but it also sounds like a short-term fix, not a long term solution.
This is actually a lot more work. It would involve replacing or augmenting the asynchronous poller with a synchronous mechanism. I think it makes the most sense to do as part of the future async apply effort (which I've talked about but not spec'd out yet). Basically, when moving to a fully asynchronous apply, each apply/prune task needs to check that its dependencies are met before executing. That would mean each task needs to know it's dependencies (which they currently don't) instead of flattening the graph into phases. If we already had that, then making it only check once and skip if not ready would be easy. But that's not a short term solution. |
The Applier and Destroyer each have WaitTasks used to wait until objects are Current (after apply) or NotFound (after prune/delete), but this behavior is a confusing "wait for some but not others" that is hard to describe and not relative to configuration, but rather the types of resources being applied together.
Then in addition to that inconsistency, WaitTasks use
DeletePropagationBackground
by default, which doesn't wait until child objects are deleted before deleting the parent object. So things like ReplicaSets and Pods may still exist after a Deployment is confirmed to be NotFound.As a user of cli-utils, I would rather that the applier/destroyer either waited for every resource to be reconciled/deleted or not wait at all.
In the context of kpt and Config Sync, I think the default behavior should be to wait forever until cancelled by the caller (they can implement their own global timeout using
context.WithTimeout
or other cancellation usingcontext.WithCancel
), now that both the applier and Destroyer accept context as input:I also think the default should be changed to
DeletePropagationForeground
so that the applier/destroyer don't exit until deletes are fully propagated.The text was updated successfully, but these errors were encountered: