Add support for kustomization resources (#2416) #2420
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.
As of version 2.1, Kustomize has deprecated bases in favor of combining
the functionality with resources by enforcing merge order based on
resource array order. This means resources now may act as bases do today
instead of being simply files - they may point to kustomiziations
(directories with a kustomization config in the root) or even to remote
locations. The code to generate the list of dependencies for file
watching has been updated accordingly.
This will close Issue #2416. Please review it carefully as it's a non-trivial change to the behavior of dependency gathering. I've added the basic test cases, but if you can think of any edge cases to add let me know.
Note: tests now must create all files referenced within both the "resources" and "bases" section of any kustomization configs encountered during the walk, otherwise those files will not be added to the dependency array and the test will fail. This is to allow support for remote files, as first introduced in PR #2269.