Kpt Deployer Deploy() Implementation/Tests #4723
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.
Related: #3904
Description
This is the implementation and unit tests for the Deploy() method of the kpt deployer. This method uses the renderManifests() method to hydrate resources using kustomize and kpt, and then outputs these manifests to the applyDir, where
kpt live apply
will be called. If unspecified by the user, applyDir is defaulted to .kpt-hydrated. If a template resource is not found in .kpt-hydrated,kpt live init
will be called to create one.There is also a slight change to the Cleanup() method to improve its output message when deleting.
skaffold delete
will now includekpt live destroy
's output message. This is similar to the Deploy() method.Eventually, we may deviate from consuming kpt as a CLI so this can change in the future.
Follow-up Work
Future work will include extending the existing features of the kpt deployer. This includes allowing users to specify source and sink directories, and various kpt command flags.