-
Notifications
You must be signed in to change notification settings - Fork 245
Fix #3756-added CI user guide in docs #4369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Jaisheesh-2006 <[email protected]>
…dex of book Signed-off-by: Jaisheesh-2006 <[email protected]>
Signed-off-by: Jaisheesh-2006 <[email protected]>
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
CsatariGergely
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this massive documentation pr, looks very good for me.
I would like to get a review from someone who has a better understanding of kpt architecture and philosophy than myself.
| weight: 90 | ||
| --- | ||
|
|
||
| <!-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not need a manual ToC. I would recommend to delete this even if this is only a comment. It will be dated and non maintained with time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @CsatariGergely , i have just made the required changes and commited them
| 4. Observe results and fail fast if any checks fail. | ||
| 5. Optionally apply the rendered resources when explicit deployment gates are satisfied. | ||
|
|
||
|  |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you share the source of this figure? Add the editable version to the same /images/ folder using the same name, but proper extension, like ci-kpt-workflow.svg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just made the required changes and commited them
|
|
||
| ### Prerequisites | ||
|
|
||
| Since kpt functions run as containers, your CI environment must have access to a container runtime (for example, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather promote a container runtime which does not need elevation, like Podman.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a short note on why Podman is preferred as well
Signed-off-by: Jaisheesh-2006 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should not take up almost 6 MB and I can't find a reference to it, is this unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mozesl-nokia , in the latest commit, i deleted that image and pushed its svg version, so at the end it will be squashed and merged right. The png version is unused
| ```shell | ||
| $ export API_TOKEN=$(vault read -field=token secret/my-api) | ||
| ``` | ||
|
|
||
| ```shell | ||
| $ kpt fn render | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe these two can be in the same code block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will update them and push the new commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mozesl-nokia I was just reviewing the kpt docs style guide, and I noticed it mentions that shell commands should ideally be in shell code blocks with a single command prefixed by $
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a common convention? I'm not a fan tbh as it means you can't just copy and past the cmd to a terminal without stripping the $
Or am I wrong??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @efiacor , whether the convention says it or not, I prefer the $ character not to be there because then if you copy/paste a command into the terminal (especially if its a long one), you end up having to tab back to the beginning of the command to delete the $
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @efiacor, you are absolutely right from a usability perspective. As far as I know, the $ is a standard convention for Unix documentation, which is why I stuck to the current style guide for this PR. I am happy to change it if we decide to go that route, though we would likely need to update the style guide as well to maintain consistency
| ```shell | ||
| $ echo "$KUBECONFIG_CONTENT" > /tmp/kubeconfig | ||
| ``` | ||
|
|
||
| ```shell | ||
| $ KUBECONFIG=/tmp/kubeconfig kpt live apply | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe these two can be in the same code block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will update them and push the new commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mozesl-nokia I was just reviewing the kpt docs style guide, and I noticed it mentions that shell commands should ideally be in shell code blocks with a single command prefixed by $
| ```shell | ||
| $ export API_TOKEN=$(vault read -field=token secret/my-api) | ||
| ``` | ||
|
|
||
| ```shell | ||
| $ kpt fn render | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
This PR adds a new guide to the kpt book detailing how to use
kptin CI/CD workflows. The guide covers:render+validateworkflow.live applysteps.Motivation
kptis frequently used in CI environments, but there was no dedicated documentation explaining the recommended patterns. This guide aims to clarify best practices, specifically regarding the "Configuration as Data" philosophy, and to help users avoid common mistakes like mutating packages during CI runs.Fixes
Fixes #3756