Skip to content

Commit

Permalink
update kusion cmd docs and related codes and scripts (#393)
Browse files Browse the repository at this point in the history
* delete the short hand letter for no-style flag
  • Loading branch information
liu-hm19 authored Jul 15, 2023
1 parent 948ed70 commit 3c2fb72
Show file tree
Hide file tree
Showing 36 changed files with 1,400 additions and 1,490 deletions.
17 changes: 8 additions & 9 deletions docs/cmd/en_US/kusion.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## kusion

Kusion manages the Kubernetes cluster by code
Kusion is the platform engineering engine of KusionStack

### Synopsis

Kusion is a cloud-native programmable technology stack, which manages the Kubernetes cluster by code.
Kusion is the platform engineering engine of KusionStack. It delivers intentions to Kubernetes, Clouds, and On-Premise resources.

```
kusion [flags]
Expand All @@ -18,15 +18,14 @@ kusion [flags]

### SEE ALSO

* [kusion apply](kusion_apply.md) - Apply a configuration stack to resource(s) by work directory
* [kusion check](kusion_check.md) - Check if KCL configurations in current directory ok to compile
* [kusion apply](kusion_apply.md) - Apply the operation intents of various resources to multiple runtimes
* [kusion compile](kusion_compile.md) - Compile KCL into YAML
* [kusion deps](kusion_deps.md) - Show KCL file dependency information
* [kusion destroy](kusion_destroy.md) - Destroy a configuration stack to resource(s) by work directory
* [kusion destroy](kusion_destroy.md) - Delete the specified resources in runtime
* [kusion env](kusion_env.md) - Print Kusion environment information
* [kusion init](kusion_init.md) - Initialize the scaffolding for a project
* [kusion ls](kusion_ls.md) - List all project and stack information
* [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.
* [kusion ls](kusion_ls.md) - List all Projects and Stacks
* [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 13-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
13 changes: 8 additions & 5 deletions docs/cmd/en_US/kusion_apply.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## kusion apply

Apply a configuration stack to resource(s) by work directory
Apply the operation intents 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.
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.
You can check the plan details and then decide if the actions should be taken or aborted.

```
kusion apply [flags]
Expand All @@ -28,6 +28,9 @@ kusion apply [flags]
# Skip interactive approval of plan details before applying
kusion apply --yes
# Apply without output style and color
kusion apply --no-style=true
```

### Options
Expand All @@ -53,6 +56,6 @@ kusion apply [flags]

### SEE ALSO

* [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code
* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 11-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
4 changes: 2 additions & 2 deletions docs/cmd/en_US/kusion_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ kusion check [flags]

### SEE ALSO

* [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code
* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 11-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
10 changes: 7 additions & 3 deletions docs/cmd/en_US/kusion_compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Compile KCL into YAML

Compile one or more KCL files.

The KCL filename must be specified. You can specify a list of arguments to replace the placeholders defined in KCL, and output the compiled results to a file when using --output flag.
The KCL filename must be specified. You can specify a list of arguments to replace the placeholders defined in KCL, and output the compiled results to a file when using --output flag.

```
kusion compile [flags]
Expand All @@ -32,6 +32,9 @@ kusion compile [flags]
# Compile main.k and write result into output.yaml
kusion compile main.k -o output.yaml
# Complie without output style and color
kusion compile --no-style=true
```

### Options
Expand All @@ -40,6 +43,7 @@ kusion compile [flags]
-D, --argument stringArray Specify the top-level argument
-n, --disable-none Disable dumping None values
-h, --help help for compile
--no-style Disable the output style and color
-o, --output string Specify the output file
-a, --override-AST Specify the override option
-O, --overrides strings Specify the configuration override path and value
Expand All @@ -49,6 +53,6 @@ kusion compile [flags]

### SEE ALSO

* [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code
* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 11-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
4 changes: 2 additions & 2 deletions docs/cmd/en_US/kusion_deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ kusion deps [WORKDIR] [flags]

### SEE ALSO

* [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code
* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 11-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
10 changes: 5 additions & 5 deletions docs/cmd/en_US/kusion_destroy.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## kusion destroy

Destroy a configuration stack to resource(s) by work directory
Delete the specified resources in runtime

### Synopsis

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.
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.
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.

```
kusion destroy [flags]
Expand Down Expand Up @@ -38,6 +38,6 @@ kusion destroy [flags]

### SEE ALSO

* [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code
* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 11-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
4 changes: 2 additions & 2 deletions docs/cmd/en_US/kusion_env.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ kusion env [flags]

### SEE ALSO

* [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code
* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 11-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
6 changes: 3 additions & 3 deletions docs/cmd/en_US/kusion_init.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Initialize the scaffolding for a project

This command initializes the scaffolding for a project, generating a project from an appointed template with correct structure.

The scaffold templates can be retrieved from local or online. The built-in templates are used by default, self-defined templates are also supported by assigning the template repository path.
The scaffold templates can be retrieved from local or online. The built-in templates are used by default, self-defined templates are also supported by assigning the template repository path.

```
kusion init
Expand Down Expand Up @@ -42,7 +42,7 @@ kusion init

### SEE ALSO

* [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code
* [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 11-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-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 11-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
6 changes: 3 additions & 3 deletions docs/cmd/en_US/kusion_ls.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## kusion ls

List all project and stack information
List all Projects and Stacks

### Synopsis

Expand Down Expand Up @@ -45,6 +45,6 @@ kusion ls [WORKDIR] [flags]

### SEE ALSO

* [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code
* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 11-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
12 changes: 9 additions & 3 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 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.

```
kusion preview [flags]
Expand All @@ -26,6 +26,12 @@ kusion preview [flags]
# Preview with ignored fields
kusion preview --ignore-fields="metadata.generation,metadata.managedFields
# Preview with json format result
kusion preview -o json
# Preview without output style and color
kusion preview --no-style=true
```

### Options
Expand All @@ -48,6 +54,6 @@ kusion preview [flags]

### SEE ALSO

* [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code
* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 11-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
10 changes: 5 additions & 5 deletions docs/cmd/en_US/kusion_version.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## kusion version

Print the kusion version information for the current context.
Print the Kusion version information for the current context

### Synopsis

Print the kusion version information for the current context.
Print the Kusion version information for the current context

```
kusion version [flags]
Expand All @@ -13,7 +13,7 @@ kusion version [flags]
### Examples

```
# Print the kusion version
# Print the Kusion version
kusion version
```

Expand All @@ -26,6 +26,6 @@ kusion version [flags]

### SEE ALSO

* [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code
* [kusion](kusion.md) - Kusion is the platform engineering engine of KusionStack

###### Auto generated by spf13/cobra on 13-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
19 changes: 9 additions & 10 deletions docs/cmd/zh_CN/kusion.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## kusion

Kusion manages the Kubernetes cluster by code
Kusion 是 KusionStack 的平台工程引擎

### Synopsis

Kusion is a cloud-native programmable technology stack, which manages the Kubernetes cluster by code.
Kusion 是 KusionStack 的平台工程引擎。 它将运维意图交付至 Kubernetes、云服务和本地部署的资源中。

```
kusion [flags]
Expand All @@ -18,15 +18,14 @@ kusion [flags]

### SEE ALSO

* [kusion apply](kusion_apply.md) - Apply a configuration stack to resource(s) by work directory
* [kusion check](kusion_check.md) - Check if KCL configurations in current directory ok to compile
* [kusion compile](kusion_compile.md) - Compile KCL into YAML
* [kusion apply](kusion_apply.md) - 将各类资源的运维意图 apply 至多种运行时里 (Kubernetes、AWS/阿里云以及自建系统等)
* [kusion compile](kusion_compile.md) - 将 KCL 编译成 YAML
* [kusion deps](kusion_deps.md) - Show KCL file dependency information
* [kusion destroy](kusion_destroy.md) - Destroy a configuration stack to resource(s) by work directory
* [kusion destroy](kusion_destroy.md) - 删除运行时中指定的资源
* [kusion env](kusion_env.md) - Print Kusion environment information
* [kusion init](kusion_init.md) - 初始化一个 Project 的脚手架
* [kusion ls](kusion_ls.md) - List all project and stack information
* [kusion preview](kusion_preview.md) - Preview a series of resource changes within the stack
* [kusion version](kusion_version.md) - 打印当前 Kusion 的版本信息
* [kusion ls](kusion_ls.md) - List all Projects and Stacks
* [kusion preview](kusion_preview.md) - 预览 Stack 中的一系列资源更改
* [kusion version](kusion_version.md) - 打印当前 Kusion 的版本信息

###### Auto generated by spf13/cobra on 13-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
37 changes: 20 additions & 17 deletions docs/cmd/zh_CN/kusion_apply.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## kusion apply

Apply a configuration stack to resource(s) by work directory
将各类资源的运维意图 apply 至多种运行时里 (Kubernetes、AWS/阿里云以及自建系统等)

### Synopsis

Apply a series of resource changes within the stack.
将一系列资源变更 apply 到当前栈中。

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.
在当前 Stack 中根据 KCL 文件创建、更新、删除资源。 默认情况下,在采取任何行动之前,Kusion 会生成一个执行计划,并提交给你批准。

You can check the plan details and then decide if the actions should be taken or aborted.
你可以检查计划详细信息,然后决定是否应采取或中止这些操作。

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

```
# Apply with specifying work directory
# 指定工作目录 apply
kusion apply -w /path/to/workdir
# Apply with specifying arguments
# 指定参数 apply
kusion apply -D name=test -D age=18
# Apply with specifying setting file
# 指定配置文件 apply
kusion apply -Y settings.yaml
# Skip interactive approval of plan details before applying
kusion apply --yes
# apply 前跳过计划的交互式审批
kusion apply —yes
# apply 输出结果不带样式和颜色
kusion apply —no-style=true
```

### Options

```
-a, --all 预览后自动展示 apply 计划细节
-a, --all 预览后自动展示执行计划细节
-D, --argument stringArray 指定顶级参数
-C, --backend-config strings backend-config config state storage backend
--backend-type string backend-type specify state storage backend
-C, --backend-config strings backend-config 配置状态存储后端信息
--backend-type string backend-type 指定状态存储后端类型,支持 local、db、oss 和 s3
-d, --detail 预览后自动展示 apply 计划细节
--dry-run dry-run 预览执行效果(总是成功)而不实际应用更改
--dry-run dry-run 预览执行效果(总是成功)而不实际 apply 更改
-h, --help help for apply
--ignore-fields strings Ignore differences of target fields
--ignore-fields strings 忽略目标字段的差异
--no-style no-style 设置原始输出模式并禁用所有样式
--operator string 指定操作人
-o, --output string 指定输出文件
-O, --overrides strings 指定配置覆盖路径和值
-Y, --setting strings 指定命令行配置文件
--watch After creating/updating/deleting the requested object, watch for changes
--watch 在创建/更新/删除请求的对象后,观测变更
-w, --workdir string 指定工作目录
-y, --yes 预览后自动审批并应用更新
```

### SEE ALSO

* [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code
* [kusion](kusion.md) - Kusion 是 KusionStack 的平台工程引擎

###### Auto generated by spf13/cobra on 11-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
4 changes: 2 additions & 2 deletions docs/cmd/zh_CN/kusion_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ kusion check [flags]

### SEE ALSO

* [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code
* [kusion](kusion.md) - Kusion 是 KusionStack 的平台工程引擎

###### Auto generated by spf13/cobra on 11-Jul-2023
###### Auto generated by spf13/cobra on 15-Jul-2023
Loading

0 comments on commit 3c2fb72

Please sign in to comment.