leverage pkg get
for easy function scaffolding
#3606
Draft
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.
Description
This PR adds a command shortcut:
kpt pkg get fn <DIR>
, which is equivalent tokpt pkg get https://github.com/GoogleContainerTools/kpt-functions-sdk.git/go/get-started@master <DIR>
.The get-started package contains (or will contain), main method with some coding guidance, go dependencies, test infra and fn building options(Dockerfile, ko, and maybe some others).
Rationale
Rather than developing a new set of commands for KRM function scaffolding, I'd like to make it easy and use this to give users another example on what they can do with
kpt pkg get
: They can runkpt pkg get fn
to get the necessary infra pieces to start developing their own KRM functions.Feedback
Please feel free to throw your thoughts and what else a fn scaffolding package should contain.