From bca82df33f1571f78b25cc916c5a3e6ec4eea29a Mon Sep 17 00:00:00 2001 From: yyy1000 <992364620@qq.com> Date: Mon, 28 Aug 2023 12:48:58 -0500 Subject: [PATCH] doc: when and how --- docs/book/src/reference/rescaffold.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/book/src/reference/rescaffold.md diff --git a/docs/book/src/reference/rescaffold.md b/docs/book/src/reference/rescaffold.md new file mode 100644 index 00000000000..6a9a7ab4418 --- /dev/null +++ b/docs/book/src/reference/rescaffold.md @@ -0,0 +1,21 @@ +# Rescaffold Command + +## Overview + +The Kubebuilder CLI provides a new experimental helper `alpha generate` command to re-scaffold an existing project from the scratch using the current version of KubeBuilder binary available based on PROJECT config file. + +## When to use it ? + +This command is useful when you want to upgrade an existing project to the latest version of the Kubebuilder project layout. It makes it easier for the users to migrate their operator projects to the new scaffolding. + +## How to use it ? + +Currently, it supports two optional params, `input-dir` and `output-dir`. + +`input-dir` is the path to the existing project that you want to re-scaffold. Default is the current working directory. + +`output-dir` is the path to the directory where you want to generate the new project. Default is a subdirectory in the current working directory. + +```sh +kubebuilder alpha generate --input-dir=/path/to/existing/project --output-dir=/path/to/new/project +``` \ No newline at end of file