Skip to content

Chapter 5 update#4625

Open
OisinJohnston2005 wants to merge 3 commits into
kptdev:mainfrom
Nordix:chapter-5-update
Open

Chapter 5 update#4625
OisinJohnston2005 wants to merge 3 commits into
kptdev:mainfrom
Nordix:chapter-5-update

Conversation

@OisinJohnston2005

Copy link
Copy Markdown
Contributor

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

Copilot AI review requested due to automatic review settings July 8, 2026 09:13
@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for kptdocs ready!

Name Link
🔨 Latest commit 6446dde
🔍 Latest deploy log https://app.netlify.com/projects/kptdocs/deploys/6a4e14b7aa78090008ed99b8
😎 Deploy Preview https://deploy-preview-4625--kptdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. documentation Improvements or additions to documentation labels Jul 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 get example from @master to @main.
  • Updates the embedded Go main.go example to include fn.WithDocs(...) and go:embed assets.
  • 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 uses testdata/test1/resources.yaml, and the subsequent kpt fn source sources the whole testdata directory. 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"
@liamfallon

Copy link
Copy Markdown
Contributor

Once the copilot comments are resolved we can go for a human review.

@efiacor

efiacor commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

rebase required

@dosubot dosubot Bot added the lgtm label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation lgtm size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants