Allow using kubectl built-in kustomize if separate kustomize binary is missing #143
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.
This PR implements automatic fallback to kubectl's built-in kustomize functionality when a standalone kustomize binary is not available, addressing the need for better accessibility when only kubectl is installed.
Changes Made
Core Functionality
kubectl kustomize
for build operationskustomize edit
commands with direct YAML file generation using Go structs, eliminating the need for edit operations that aren't supported by kubectl kustomizekustomizeBuildCommand()
method that chooses the appropriate command based on binary availabilityTechnical Improvements
resources
field instead of deprecatedbases
field, eliminating deprecation warningsExample Usage
Before this change, users needed both helm and kustomize binaries:
# This would fail if kustomize wasn't installed chartify myapp ./kustomization-dir
After this change, kubectl's built-in kustomize automatically serves as fallback:
The implementation maintains full feature compatibility including:
Testing
Added comprehensive tests to verify:
The solution provides seamless user experience - users don't need to install separate kustomize binary if they already have kubectl with built-in kustomize support.
Fixes #63.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.