Skip to content

Commit 9591997

Browse files
📖 (docs) fix AutoUpdate and Alpha Update docs (#5054)
(docs) fix AutoUpdate and Alpha Update docs
1 parent 066210f commit 9591997

File tree

2 files changed

+45
-49
lines changed

2 files changed

+45
-49
lines changed

docs/book/src/plugins/available/autoupdate-v1-alpha.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ Kubebuilder release is available — keeping your project **maintained, secure,
77
This automation uses the [`kubebuilder alpha update`][alpha-update-command] command with a **3-way merge strategy** to
88
refresh your project scaffold, and wraps it in a GitHub Actions workflow that opens an **Issue** with a **Pull Request compare link** so you can create the PR and review it.
99

10+
<aside class="warning">
11+
<h1>Protect your branches</h1>
12+
13+
This workflow by default **only** creates and pushes the merged files to a branch
14+
called `kubebuilder-update-from-<from-version>-to-<to-version>`.
15+
16+
To keep your codebase safe, use branch protection rules to ensure that
17+
changes aren't pushed or merged without proper review.
18+
19+
</aside>
20+
1021
## When to Use It
1122

1223
- When you don’t deviate too much from the default scaffold — ensure that you see the note about customization [here](https://book.kubebuilder.io/versions_compatibility_supportability#project-customizations).
@@ -35,13 +46,14 @@ Whenever a new Kubebuilder release is available, the workflow will automatically
3546

3647
<img width="638" height="482" alt="Example Issue" src="https://github.com/user-attachments/assets/589fd16b-7709-4cd5-b169-fd53d69790d4" />
3748

38-
Moreover, AI models are used to help you understand what changes are needed to keep your project up to date,
39-
and to suggest resolutions if conflicts are encountered, as in the following example:
49+
By default, the workflow scaffolded uses `--use-gh-model` the flag to leverage in [AI models][ai-models] to help you understand
50+
what changes are needed. You'll get a concise list of changed files to streamline the review, for example:
51+
52+
<img width="582" height="646" alt="Screenshot 2025-08-26 at 13 40 53" src="https://github.com/user-attachments/assets/d460a5af-5ca4-4dd5-afb8-7330dd6de148" />
4053

41-
<img width="715" height="424" alt="AI Example Comment" src="https://github.com/user-attachments/assets/3f8bc35d-8ba0-4fc5-931b-56b1cb238462" />
54+
If conflicts arise, AI-generated comments call them out and provide next steps, such as:
4255

43-
You will also see a list of files changed, making it easier to review the updates.
44-
And, if conflicts arise, a summary of the conflicts will be provided to help you resolve them.
56+
<img width="600" height="188" alt="Conflicts" src="https://github.com/user-attachments/assets/2142887a-730c-499a-94df-c717f09ab600" />
4557

4658
### Workflow details
4759

@@ -66,15 +78,5 @@ The command called by the workflow is:
6678
--use-gh-models
6779
```
6880

69-
<aside class="warning">
70-
<h1>Protect your branches</h1>
71-
72-
This workflow by default **only** creates and pushes the merged files to a branch
73-
called `kubebuilder-update-from-<from-version>-to-<to-version>`.
74-
75-
To keep your codebase safe, use branch protection rules to ensure that
76-
changes aren't pushed or merged without proper review.
77-
78-
</aside>
79-
80-
[alpha-update-command]: ./../../reference/commands/alpha_update.md
81+
[alpha-update-command]: ./../../reference/commands/alpha_update.md
82+
[ai-models]: https://docs.github.com/en/github-models/about-github-models

docs/book/src/reference/commands/alpha_update.md

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,26 @@ not re-applying your code.
99
By default, the final result is **squashed into a single commit** on a dedicated output branch.
1010
If you prefer to keep the full history (no squash), use `--show-commits`.
1111

12-
> **Tip:** You can reduce the burden of keeping your project up to date by using the
13-
[`autoupdate.kubebuilder.io/v1-alpha`][autoupdate-plugin] plugin which
12+
<aside class="note">
13+
<H1> Automate this process </H1>
14+
15+
You can reduce the burden of keeping your project up to date by using the
16+
[AutoUpdate Plugin][autoupdate-plugin] which
1417
automates the process of running `kubebuilder alpha update` on a schedule
1518
workflow when new Kubebuilder releases are available.
16-
>
17-
> Moreover, you will be able to get help from AI models to understand what changes are needed to keep your project up to date
19+
20+
Moreover, you will be able to get help from [AI models][ai-gh-models] to understand what changes are needed to keep your project up to date
1821
and how to solve conflicts if any are faced.
1922

23+
</aside>
24+
2025
## When to Use It
2126

2227
Use this command when you:
2328

2429
- Want to move to a newer Kubebuilder version or plugin layout
25-
- Prefer automation over manual file editing
2630
- Want to review scaffold changes on a separate branch
2731
- Want to focus on resolving merge conflicts (not re-applying your custom code)
28-
- Want an **AI-generated** overview of changes and guidance for resolving conflicts
2932

3033
## How It Works
3134

@@ -171,15 +174,10 @@ The command opens an Issue that links to the diff so you can create the PR and r
171174

172175
With `--use-gh-models`, an AI comment highlights key changes and suggests how to resolve any conflicts:
173176

174-
<img width="715" height="424" alt="AI Example Comment" src="https://github.com/user-attachments/assets/3f8bc35d-8ba0-4fc5-931b-56b1cb238462" />
177+
<img width="740" height="425" alt="Comment" src="https://github.com/user-attachments/assets/fb5f214e-be0e-43b8-a3fb-b5744ac8f66e" />
175178

176-
You’ll also get a concise list of changed files to streamline the review:
177-
178-
<img width="652" height="694" alt="Files Changed" src="https://github.com/user-attachments/assets/b7b46d44-078c-4e56-8a50-bdfcfac231a7" />
179-
180-
If conflicts arise, AI-generated comments call them out and provide next steps:
181-
182-
<img width="682" height="213" alt="Conflicts" src="https://github.com/user-attachments/assets/ed8cf95d-5272-4477-8d75-4e28546dde4e" />
179+
Moreover, AI models are used to help you understand what changes are needed to keep your project up to date,
180+
and to suggest resolutions if conflicts are encountered, as in the following example:
183181

184182
### Automation
185183

@@ -210,6 +208,19 @@ kubebuilder alpha update \
210208
--git-config rerere.enabled=true
211209
```
212210

211+
<aside class="note warning">
212+
<h1>You might need to upgrade your project first</h1>
213+
214+
This command uses `kubebuilder alpha generate` under the hood.
215+
We support projects created with <strong>v4.5.0+</strong>.
216+
If yours is older, first run `kubebuilder alpha generate` once to modernize the scaffold.
217+
After that, you can use `kubebuilder alpha update` for future upgrades.
218+
219+
Projects created with **Kubebuilder v4.6.0+** include `cliVersion` in the `PROJECT` file.
220+
We use that value to pick the correct CLI for re-scaffolding.
221+
222+
</aside>
223+
213224
## Flags
214225

215226
| Flag | Description |
@@ -227,24 +238,6 @@ kubebuilder alpha update \
227238
| `--use-gh-models` | Post an AI overview as an issue comment using `gh models`. Requires `gh` + `gh-models` extension. Effective only when `--open-gh-issue` is also set. |
228239
| `-h, --help` | Show help for this command. |
229240

230-
<aside class="note warning">
231-
<h1>You might need to upgrade your project first</h1>
232-
233-
This command uses `kubebuilder alpha generate` under the hood.
234-
We support projects created with <strong>v4.5.0+</strong>.
235-
If yours is older, first run `kubebuilder alpha generate` once to modernize the scaffold.
236-
After that, you can use `kubebuilder alpha update` for future upgrades.
237-
238-
</aside>
239-
240-
<aside class="note">
241-
<h1>CLI Version Tracking</h1>
242-
243-
Projects created with **Kubebuilder v4.6.0+** include `cliVersion` in the `PROJECT` file.
244-
We use that value to pick the correct CLI for re-scaffolding.
245-
246-
</aside>
247-
248241
## Demonstration
249242

250243
<iframe width="560" height="315" src="https://www.youtube.com/embed/J8zonID__8k?si=WC-FXOHX0mCjph71" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
@@ -267,3 +260,4 @@ so the current behavior may differ slightly from what is shown in the demo.
267260
[project-config]: ../../reference/project-config.md
268261
[autoupdate-plugin]: ./../../plugins/available/autoupdate-v1-alpha.md
269262
[design-proposal]: ./../../../../../designs/update_action.md
263+
[ai-gh-models]: https://docs.github.com/en/github-models/about-github-models

0 commit comments

Comments
 (0)