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

Add support for kustomization resources (#2416) #2420

Merged

Conversation

jmcclell
Copy link
Contributor

@jmcclell jmcclell commented Jul 5, 2019

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.

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.
@jmcclell
Copy link
Contributor Author

jmcclell commented Jul 5, 2019

@dgageot As promised.

@codecov
Copy link

codecov bot commented Jul 5, 2019

Codecov Report

Merging #2420 into master will increase coverage by 0.01%.
The diff coverage is 87.5%.

Impacted Files Coverage Δ
pkg/skaffold/deploy/kustomize.go 74.52% <87.5%> (+0.99%) ⬆️

@dgageot dgageot added the kokoro:run runs the kokoro jobs on a PR label Jul 8, 2019
@dgageot dgageot self-assigned this Jul 8, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Jul 8, 2019
@dgageot dgageot merged commit 71f5809 into GoogleContainerTools:master Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants