reconciler.Apply: perform deletions late #174
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So far,
reconciler.Apply()(which is what happens if a component is reconciled, not deleted) first deleted all redundant objects, that is objects which appear in the component's inventory, but are no longer part of the current manifest list. Only after all redundant objects were gone, the reconciliation of the current dependents was started. This potentially caused some deadlock situations, e.g. in component-operator. To overcome, the deletion part was shifted to the end ofreconciler.Apply(), after the application of the manifest list. This should not be a noticeable change. However, the completion handling still happens early (before the reconciliation of the dependents), and was slightly changed.