Skip to content
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

kpt fn render should support resource pruning #1524

Closed
droot opened this issue Mar 4, 2021 · 2 comments
Closed

kpt fn render should support resource pruning #1524

droot opened this issue Mar 4, 2021 · 2 comments
Assignees
Labels
area/hydrate enhancement New feature or request size/M 2 day triaged Issue has been triaged by adding an `area/` label
Milestone

Comments

@droot
Copy link
Contributor

droot commented Mar 4, 2021

Expected Behavior:
Pkg App has two resources a.yaml and b.yaml and it has a pipeline has one of the mutators that drops the resource b.yaml. So if user runs pipeline run App, b.yaml should be deleted from the local filesystem.

@droot droot added this to the v1.0 alpha 2 milestone Mar 4, 2021
@droot droot self-assigned this Mar 4, 2021
@droot droot added this to To do in kpt kanban board via automation Mar 4, 2021
@mikebz mikebz added triaged Issue has been triaged by adding an `area/` label enhancement New feature or request labels Mar 10, 2021
@droot
Copy link
Contributor Author

droot commented Mar 17, 2021

Initially I thought using kio.LocalPkgReaderWriter would be enough to solve this problem, but realized it is not because it tracks resources using .Read() but in our case, resources are read as we DFS through the hydration DAG at each pkg level so wont work that way. One possible way to do it will be to track inputResources (filtering out meta resources) in hydrationContext as we DFS, and when we finally write the resource at the top level pkg, write the hydrated resources and then delete the diff(inputResources - hydratedResources).

/cc @frankfarzan @Shell32-Natsu

@droot droot moved this from To do to In progress in kpt kanban board Mar 18, 2021
@droot droot changed the title kpt pipeline run in-place sink mode should delete resources not present in the output kpt fn render should support resource pruning Mar 18, 2021
@droot droot moved this from In progress to Done in kpt kanban board Mar 25, 2021
@droot
Copy link
Contributor Author

droot commented Mar 29, 2021

This is addressed with the PR #1589 so closing this.

@droot droot closed this as completed Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hydrate enhancement New feature or request size/M 2 day triaged Issue has been triaged by adding an `area/` label
Projects
Development

No branches or pull requests

2 participants