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

use kubectl's built-in kustomize when possible #4183

Merged
merged 1 commit into from May 15, 2020

Conversation

nkubala
Copy link
Contributor

@nkubala nkubala commented May 14, 2020

Fixes #1781 

this adds logic to check if a user's kubectl version is greater than 1.14, and if so uses the built-in kustomize command. this removes the hard dependency on an external kustomize binary for all but the oldest kubectl versions.

@codecov
Copy link

codecov bot commented May 14, 2020

Codecov Report

Merging #4183 into master will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
pkg/skaffold/deploy/kubectl/cli.go 91.30% <100.00%> (+0.39%) ⬆️
pkg/skaffold/deploy/kustomize.go 76.21% <100.00%> (+1.50%) ⬆️
pkg/skaffold/runner/logger.go 100.00% <0.00%> (ø)
pkg/skaffold/runner/dev.go 65.38% <0.00%> (+0.26%) ⬆️
pkg/skaffold/runner/build_deploy.go 57.29% <0.00%> (+1.16%) ⬆️
pkg/skaffold/util/cmd.go 52.38% <0.00%> (+4.76%) ⬆️

Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, awesome!

@briandealwis
Copy link
Member

Would it make sense to use a kustomize binary if found, and otherwise try kubectl kustomize?

@pickfire
Copy link

Would it make sense to use a kustomize binary if found, and otherwise try kubectl kustomize?

No, it doesn't make sense. It should be using kubectl kustomize even though kustomize binary is found, kustomize binary is useless since it does not work with existing kubectl kustomize, there is a breaking change.

@nkubala nkubala deleted the kustomize-dep branch June 17, 2021 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove kustomize requirement if kubectl version > 1.14
5 participants