AutoUpdate (autoupdate/v1-alpha)
Keeping your Kubebuilder project up to date with the latest improvements shouldn’t be a chore. With a small amount of setup, you can receive automatic Pull Request suggestions whenever a new Kubebuilder release is available — keeping your project maintained, secure, and aligned with ecosystem changes.
This automation uses the kubebuilder alpha update command with a 3-way merge strategy to
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.
When to use it
- When you want to reduce the burden of keeping the project updated and well-maintained.
How to use it
- If you want to add the
autoupdateplugin to your project:
kubebuilder edit --plugins="autoupdate/v1-alpha"
How it works
The plugin scaffolds a GitHub Actions workflow that checks for new Kubebuilder releases every week. When an update is available, it:
- Creates a new branch with the merged changes
- Opens a GitHub Issue with a PR compare link
Example Issue:
Conflict help (when needed):
Customizing the workflow
The generated workflow uses the kubebuilder alpha update command with default flags. You can customize the workflow by editing .github/workflows/auto_update.yml to add additional flags:
Default flags used:
--force- Continue even if conflicts occur (automation-friendly)--push- Automatically push the output branch to remote--restore-path .github/workflows- Preserve CI workflows from base branch--open-gh-issue- Create a GitHub Issue with PR compare link
Additional available flags:
--merge-message- Custom commit message for clean merges--conflict-message- Custom commit message when conflicts occur--from-version- Specify the version to upgrade from--to-version- Specify the version to upgrade to--output-branch- Custom output branch name--show-commits- Keep full history instead of squashing--git-config- Pass per-invocation Git config
For complete documentation on all available flags, see the kubebuilder alpha update reference.
Example: Customize commit messages
Edit .github/workflows/auto_update.yml:
- name: Run kubebuilder alpha update
run: |
kubebuilder alpha update \
--force \
--push \
--restore-path .github/workflows \
--open-gh-issue \
--merge-message "chore: update kubebuilder scaffold" \
--conflict-message "chore: update with conflicts - review needed"