Skip to content

Commit

Permalink
doc: when and how
Browse files Browse the repository at this point in the history
  • Loading branch information
yyy1000 committed Aug 28, 2023
1 parent bddb6f5 commit bca82df
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/book/src/reference/rescaffold.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit bca82df

Please sign in to comment.