Chapter 5 update#4625
Open
OisinJohnston2005 wants to merge 3 commits into
Open
Conversation
Signed-off-by: Oisin Johnston <oisin.johnston@ericsson.com>
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Chapter 5 of the kpt book to align the “developing functions” walkthrough with current upstream repositories/branches and the latest get-started scaffolding.
Changes:
- Switches the
kpt pkg getexample from@masterto@main. - Updates the embedded Go
main.goexample to includefn.WithDocs(...)andgo:embedassets. - Adjusts testdata/example paths and a shell pipeline command used in the walkthrough.
Comments suppressed due to low confidence (1)
documentation/content/en/book/05-developing-functions/_index.md:248
- The testdata instructions are inconsistent: the comment points to
testdata/noop-passthrough/resources.yaml, but the edit command usestestdata/test1/resources.yaml, and the subsequentkpt fn sourcesources the wholetestdatadirectory. This makes it unclear which resources are being tested.
# Edit the `testdata/noop-passthrough/resources.yaml` with your KRM resources.
# resources.yaml already has a `Deployment` and `Service` as test data.
vim testdata/test1/resources.yaml
# Convert the KRM resources and FunctionConfig resource to `ResourceList`, and
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Get the "get-started" package. | ||
| kpt pkg get https://github.com/kptdev/krm-functions-sdk.git/go/get-started@master ${FUNCTION_NAME} | ||
| kpt pkg get https://github.com/kptdev/krm-functions-sdk.git/go/get-started@main ${FUNCTION_NAME} |
| To verify the image using the same `./testdata` resources | ||
| ```shell | ||
| kpt fn eval ./testdata/test1/resources.yaml --image ${FN_CONTAINER_REGISTRY}/${FUNCTION_NAME}:${TAG} | ||
| kpt fn eval ./testdata/noop-passthrough/resources.yaml --image ${FN_CONTAINER_REGISTRY}/${FUNCTION_NAME}:${TAG} |
| To verify the image using the same `./testdata` resources | ||
| ```shell | ||
| kpt fn eval ./testdata/test1/resources.yaml --image ${FN_CONTAINER_REGISTRY}/${FUNCTION_NAME}:${TAG} | ||
| kpt fn eval ./testdata/noop-passthrough/resources.yaml --image ${FN_CONTAINER_REGISTRY}/${FUNCTION_NAME}:${TAG} |
Comment on lines
+175
to
+179
| "context" | ||
| _ "embed" | ||
| "os" | ||
|
|
||
| "github.com/kptdev/krm-functions-sdk/go/fn" | ||
| "github.com/kptdev/krm-functions-sdk/go/fn" |
Contributor
|
Once the copilot comments are resolved we can go for a human review. |
Contributor
|
rebase required |
mozesl-nokia
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes issues with chapter 5 of the kpt book, some urls were outdated (stuff like moving from master branch to main) and the get-started repo's code is outdated in the current version