Skip to content
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

docs: refresh cmd docs #641

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/cmd/en_US/kusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ kusion [flags]

### SEE ALSO

* [kusion apply](kusion_apply.md) - Apply the operation intents of various resources to multiple runtimes
* [kusion apply](kusion_apply.md) - Apply the operational intent of various resources to multiple runtimes
* [kusion build](kusion_build.md) - Build Kusion modules in a Stack to the Intent
* [kusion compile](kusion_compile.md) - Deprecated: Use 'kusion build' to generate the Intent instead
* [kusion deps](kusion_deps.md) - Show KCL file dependency information
* [kusion destroy](kusion_destroy.md) - Delete the specified resources in runtime
* [kusion destroy](kusion_destroy.md) - Destroy resources within the stack.
* [kusion init](kusion_init.md) - Initialize the scaffolding for a project
* [kusion preview](kusion_preview.md) - Preview a series of resource changes within the stack
* [kusion version](kusion_version.md) - Print the Kusion version information for the current context

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
22 changes: 10 additions & 12 deletions docs/cmd/en_US/kusion_apply.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
## kusion apply

Apply the operation intents of various resources to multiple runtimes
Apply the operational intent of various resources to multiple runtimes

### Synopsis

Apply a series of resource changes within the stack.

Create or update or delete resources according to the KCL files within a stack. By default, Kusion will generate an execution plan and present it for your approval before taking any action.

You can check the plan details and then decide if the actions should be taken or aborted.
Create, update or delete resources according to the operational intent within a stack. By default, Kusion will generate an execution plan and prompt for your approval before performing any actions. You can review the plan details and make a decision to proceed with the actions or abort them.

```
kusion apply [flags]
Expand All @@ -17,17 +15,17 @@ kusion apply [flags]
### Examples

```
# Apply with specifying work directory
# Apply with specified work directory
kusion apply -w /path/to/workdir

# Apply with specifying arguments
# Apply with specified arguments
kusion apply -D name=test -D age=18

# Apply with specifying setting file
kusion apply -Y settings.yaml
# Apply with specified intent file
kusion apply --intent-file intent.yaml

# Apply with specifying spec file
kusion apply --spec-file spec.yaml
# Apply with specifying intent file
kusion apply --intent-file intent.yaml

# Skip interactive approval of plan details before applying
kusion apply --yes
Expand All @@ -47,10 +45,10 @@ kusion apply [flags]
--dry-run Preview the execution effect (always successful) without actually applying the changes
-h, --help help for apply
--ignore-fields strings Ignore differences of target fields
--intent-file string Specify the intent file path as input, and the intent file must be located in the working directory or its subdirectories
--no-style no-style sets to RawOutput mode and disables all of styling
--operator string Specify the operator
-o, --output string Specify the output format
--spec-file string Specify the spec file path as input, and the spec file must be located in the working directory or its subdirectories
--watch After creating/updating/deleting the requested object, watch for changes
-w, --workdir string Specify the work directory
-y, --yes Automatically approve and perform the update after previewing it
Expand All @@ -60,4 +58,4 @@ kusion apply [flags]

* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
2 changes: 1 addition & 1 deletion docs/cmd/en_US/kusion_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ kusion build [flags]

* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
8 changes: 7 additions & 1 deletion docs/cmd/en_US/kusion_compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ Deprecated: Use 'kusion build' to generate the Intent instead
kusion compile [flags]
```

### Examples

```
Deprecated
```

### Options

```
Expand All @@ -16,4 +22,4 @@ kusion compile [flags]

* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
2 changes: 1 addition & 1 deletion docs/cmd/en_US/kusion_deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ kusion deps [WORKDIR] [flags]

* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
12 changes: 5 additions & 7 deletions docs/cmd/en_US/kusion_destroy.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
## kusion destroy

Delete the specified resources in runtime
Destroy resources within the stack.

### Synopsis

Delete resources by resource spec.
Destroy resources within the stack.

Only KCL files are accepted. Only one type of arguments may be specified: filenames, resources and names, or resources and label selector.

Note that the destroy command does NOT do resource version checks, so if someone submits an update to a resource right when you submit a destroy, their update will be lost along with the rest of the resource.
Please note that the destroy command does NOT perform resource version checks. Therefore, if someone submits an update to a resource at the same time you execute a destroy command, their update will be lost along with the rest of the resource.

```
kusion destroy [flags]
Expand All @@ -17,7 +15,7 @@ kusion destroy [flags]
### Examples

```
# Delete the configuration of current stack
# Delete resources of current stack
kusion destroy
```

Expand All @@ -38,4 +36,4 @@ kusion destroy [flags]

* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
2 changes: 1 addition & 1 deletion docs/cmd/en_US/kusion_init.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ kusion init
* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack
* [kusion init templates](kusion_init_templates.md) - List templates used to initialize a project

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
2 changes: 1 addition & 1 deletion docs/cmd/en_US/kusion_init_templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ kusion init templates

* [kusion init](kusion_init.md) - Initialize the scaffolding for a project

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
17 changes: 7 additions & 10 deletions docs/cmd/en_US/kusion_preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Preview a series of resource changes within the stack

Preview a series of resource changes within the stack.

Create or update or delete resources according to the KCL files within a stack. By default, Kusion will generate an execution plan and present it for your approval before taking any action.
Create, update or delete resources according to the intent described in the a stack. By default, Kusion will generate an execution plan and present it for your approval before taking any action.

```
kusion preview [flags]
Expand All @@ -15,17 +15,14 @@ kusion preview [flags]
### Examples

```
# Preview with specifying work directory
# Preview with specified work directory
kusion preview -w /path/to/workdir

# Preview with specifying arguments
# Preview with specified arguments
kusion preview -D name=test -D age=18

# Preview with specifying setting file
kusion preview -Y settings.yaml

# Preview with specifying spec file
kusion preview --spec-file spec.yaml
# Preview with specified intent file
kusion preview --intent-file intent.yaml

# Preview with ignored fields
kusion preview --ignore-fields="metadata.generation,metadata.managedFields
Expand All @@ -47,15 +44,15 @@ kusion preview [flags]
-d, --detail Automatically show plan details with interactive options
-h, --help help for preview
--ignore-fields strings Ignore differences of target fields
--intent-file string Specify the intent file path as input, and the intent file must be located in the working directory or its subdirectories
--no-style no-style sets to RawOutput mode and disables all of styling
--operator string Specify the operator
-o, --output string Specify the output format
--spec-file string Specify the spec file path as input, and the spec file must be located in the working directory or its subdirectories
-w, --workdir string Specify the work directory
```

### SEE ALSO

* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
2 changes: 1 addition & 1 deletion docs/cmd/en_US/kusion_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ kusion version [flags]

* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
4 changes: 2 additions & 2 deletions docs/cmd/zh_CN/kusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ kusion [flags]
* [kusion build](kusion_build.md) - 将 Kusion Module 构建成 Kusion Intent
* [kusion compile](kusion_compile.md) - 已废弃:请使用 kusion build
* [kusion deps](kusion_deps.md) - 显示 KCL 文件依赖信息
* [kusion destroy](kusion_destroy.md) - 删除运行时中指定的资源
* [kusion destroy](kusion_destroy.md) - 删除 Stack 中所有资源
* [kusion init](kusion_init.md) - 初始化一个 Project 的脚手架
* [kusion preview](kusion_preview.md) - 预览 Stack 中的一系列资源更改
* [kusion version](kusion_version.md) - 打印当前 Kusion 的版本信息

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
4 changes: 2 additions & 2 deletions docs/cmd/zh_CN/kusion_apply.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ kusion apply [flags]
--dry-run dry-run 预览执行效果(总是成功)而不实际 apply 更改
-h, --help help for apply
--ignore-fields strings 忽略目标字段的差异
--intent-file string 指定 spec 文件路径作为输入,spce 文件必须位于工作目录或其子目录下
--no-style no-style 设置原始输出模式并禁用所有样式
--operator string 指定操作人
-o, --output string 指定输出文件
--spec-file string 指定 spec 文件路径作为输入,spce 文件必须位于工作目录或其子目录下
--watch 在创建/更新/删除请求的对象后,观测变更
-w, --workdir string 指定工作目录
-y, --yes 预览后自动审批并应用更新
Expand All @@ -57,4 +57,4 @@ kusion apply [flags]

* [kusion](kusion.md) - Kusion 是 KusionStack 的平台工程引擎

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
2 changes: 1 addition & 1 deletion docs/cmd/zh_CN/kusion_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ kusion build [flags]

* [kusion](kusion.md) - Kusion 是 KusionStack 的平台工程引擎

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
8 changes: 7 additions & 1 deletion docs/cmd/zh_CN/kusion_compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
kusion compile [flags]
```

### Examples

```
Deprecated
```

### Options

```
Expand All @@ -16,4 +22,4 @@ kusion compile [flags]

* [kusion](kusion.md) - Kusion 是 KusionStack 的平台工程引擎

###### Auto generated by spf13/cobra on 22-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
2 changes: 1 addition & 1 deletion docs/cmd/zh_CN/kusion_deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ kusion deps [WORKDIR] [flags]

* [kusion](kusion.md) - Kusion 是 KusionStack 的平台工程引擎

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
2 changes: 1 addition & 1 deletion docs/cmd/zh_CN/kusion_destroy.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ kusion destroy [flags]

* [kusion](kusion.md) - Kusion 是 KusionStack 的平台工程引擎

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
2 changes: 1 addition & 1 deletion docs/cmd/zh_CN/kusion_init.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ kusion init
* [kusion](kusion.md) - Kusion 是 KusionStack 的平台工程引擎
* [kusion init templates](kusion_init_templates.md) - 列出用于初始化 Project 的模板

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
2 changes: 1 addition & 1 deletion docs/cmd/zh_CN/kusion_init_templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ kusion init templates

* [kusion init](kusion_init.md) - 初始化一个 Project 的脚手架

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
4 changes: 2 additions & 2 deletions docs/cmd/zh_CN/kusion_preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ kusion preview [flags]
-d, --detail 预览后自动展示 apply 计划细节
-h, --help help for preview
--ignore-fields strings 忽略目标字段的差异
--intent-file string 指定 spec 文件路径作为输入,spce 文件必须位于工作目录或其子目录下
--no-style no-style 设置原始输出模式并禁用所有样式
--operator string 指定操作人
-o, --output string 指定输出文件
--spec-file string 指定 spec 文件路径作为输入,spce 文件必须位于工作目录或其子目录下
-w, --workdir string 指定工作目录
```

### SEE ALSO

* [kusion](kusion.md) - Kusion 是 KusionStack 的平台工程引擎

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
2 changes: 1 addition & 1 deletion docs/cmd/zh_CN/kusion_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ kusion version [flags]

* [kusion](kusion.md) - Kusion 是 KusionStack 的平台工程引擎

###### Auto generated by spf13/cobra on 24-Nov-2023
###### Auto generated by spf13/cobra on 30-Nov-2023
19 changes: 9 additions & 10 deletions pkg/cmd/apply/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,24 @@ import (

func NewCmdApply() *cobra.Command {
var (
applyShort = i18n.T(`Apply the operation intents of various resources to multiple runtimes`)
applyShort = i18n.T(`Apply the operational intent of various resources to multiple runtimes`)

applyLong = i18n.T(`
Apply a series of resource changes within the stack.

Create or update or delete resources according to the KCL files within a stack.
By default, Kusion will generate an execution plan and present it for your approval before taking any action.

You can check the plan details and then decide if the actions should be taken or aborted.`)
Create, update or delete resources according to the operational intent within a stack.
By default, Kusion will generate an execution plan and prompt for your approval before performing any actions.
You can review the plan details and make a decision to proceed with the actions or abort them.`)

applyExample = i18n.T(`
# Apply with specifying work directory
# Apply with specified work directory
kusion apply -w /path/to/workdir

# Apply with specifying arguments
# Apply with specified arguments
kusion apply -D name=test -D age=18
# Apply with specifying setting file
kusion apply -Y settings.yaml

# Apply with specified intent file
kusion apply --intent-file intent.yaml

# Apply with specifying intent file
kusion apply --intent-file intent.yaml
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/compile/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

func NewCmdCompile() *cobra.Command {
compileShort := i18n.T("Deprecated: Use 'kusion build' to generate the Intent instead")
compileExample := i18n.T("")
compileExample := i18n.T("Deprecated")

cmd := &cobra.Command{
Use: "compile",
Expand Down
17 changes: 7 additions & 10 deletions pkg/cmd/destroy/destroy.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,17 @@ import (

func NewCmdDestroy() *cobra.Command {
var (
destroyShort = i18n.T(`Delete the specified resources in runtime`)
destroyShort = i18n.T(`Destroy resources within the stack.`)

destroyLong = i18n.T(`
Delete resources by resource spec.

Only KCL files are accepted. Only one type of arguments may be specified: filenames,
resources and names, or resources and label selector.

Note that the destroy command does NOT do resource version checks, so if someone submits an
update to a resource right when you submit a destroy, their update will be lost along with the
rest of the resource.`)
Destroy resources within the stack.

Please note that the destroy command does NOT perform resource version checks.
Therefore, if someone submits an update to a resource at the same time you execute a destroy command,
their update will be lost along with the rest of the resource.`)

destroyExample = i18n.T(`
# Delete the configuration of current stack
# Delete resources of current stack
kusion destroy`)
)

Expand Down
Loading
Loading