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

feat: preview auto shows diff details #802

Merged
merged 1 commit into from
Feb 20, 2024
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
10 changes: 5 additions & 5 deletions docs/cmd/en_US/kusion_apply.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Apply the operational intent of various resources to multiple runtimes

Apply a series of resource changes within the stack.

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.
Create, update or delete resources according to the operational intent within a stack. By default, Kusion will generate an execution preview and prompt for your approval before performing any actions. You can review the preview details and make a decision to proceed with the actions or abort them.

```
kusion apply [flags]
Expand All @@ -27,7 +27,7 @@ kusion apply [flags]
# Apply with specifying intent file
kusion apply --intent-file intent.yaml
# Skip interactive approval of plan details before applying
# Skip interactive approval of preview details before applying
kusion apply --yes
# Apply without output style and color
Expand All @@ -37,11 +37,11 @@ kusion apply [flags]
### Options

```
-a, --all --detail Automatically show all plan details, combined use with flag --detail
-a, --all --detail Automatically show all preview details, combined use with flag --detail
-D, --argument stringToString Specify the top-level argument (default [])
-C, --backend-config strings backend-config config state storage backend
--backend-type string backend-type specify state storage backend
-d, --detail Automatically show plan details with interactive options
-d, --detail Automatically show preview details with interactive options (default true)
--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
Expand All @@ -66,4 +66,4 @@ kusion apply [flags]

* [kusion](kusion.md) - Kusion is the Platform Orchestrator of Internal Developer Platform

###### Auto generated by spf13/cobra on 4-Jan-2024
###### Auto generated by spf13/cobra on 6-Feb-2024
4 changes: 2 additions & 2 deletions docs/cmd/en_US/kusion_destroy.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ kusion destroy [flags]
-D, --argument stringToString Specify the top-level argument (default [])
-C, --backend-config strings backend-config config state storage backend
--backend-type string backend-type specify state storage backend
-d, --detail Automatically show plan details after previewing it
-d, --detail Automatically show preview details after previewing it
-h, --help help for destroy
--operator string Specify the operator
-Y, --setting strings Specify the command line setting files
Expand All @@ -44,4 +44,4 @@ kusion destroy [flags]

* [kusion](kusion.md) - Kusion is the Platform Orchestrator of Internal Developer Platform

###### Auto generated by spf13/cobra on 4-Jan-2024
###### Auto generated by spf13/cobra on 6-Feb-2024
8 changes: 4 additions & 4 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, 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.
Create, update or delete resources according to the intent described in the stack. By default, Kusion will generate an execution preview and present it for your approval before taking any action.

```
kusion preview [flags]
Expand Down Expand Up @@ -37,11 +37,11 @@ kusion preview [flags]
### Options

```
-a, --all --detail Automatically show all plan details, combined use with flag --detail
-a, --all --detail Automatically show all preview details, combined use with flag --detail
-D, --argument stringToString Specify the top-level argument (default [])
-C, --backend-config strings backend-config config state storage backend
--backend-type string backend-type specify state storage backend
-d, --detail Automatically show plan details with interactive options
-d, --detail Automatically show preview details with interactive options (default true)
-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
Expand All @@ -63,4 +63,4 @@ kusion preview [flags]

* [kusion](kusion.md) - Kusion is the Platform Orchestrator of Internal Developer Platform

###### Auto generated by spf13/cobra on 4-Jan-2024
###### Auto generated by spf13/cobra on 6-Feb-2024
6 changes: 3 additions & 3 deletions pkg/cmd/apply/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ func NewCmdApply() *cobra.Command {
Apply a series of resource changes within the stack.
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.`)
By default, Kusion will generate an execution preview and prompt for your approval before performing any actions.
You can review the preview details and make a decision to proceed with the actions or abort them.`)

applyExample = i18n.T(`
# Apply with specified work directory
Expand All @@ -32,7 +32,7 @@ func NewCmdApply() *cobra.Command {
# Apply with specifying intent file
kusion apply --intent-file intent.yaml
# Skip interactive approval of plan details before applying
# Skip interactive approval of preview details before applying
kusion apply --yes
# Apply without output style and color
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/destroy/destroy.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func NewCmdDestroy() *cobra.Command {
cmd.Flags().BoolVarP(&o.Yes, "yes", "y", false,
i18n.T("Automatically approve and perform the update after previewing it"))
cmd.Flags().BoolVarP(&o.Detail, "detail", "d", false,
i18n.T("Automatically show plan details after previewing it"))
i18n.T("Automatically show preview details after previewing it"))
o.AddBackendFlags(cmd)

return cmd
Expand Down
10 changes: 5 additions & 5 deletions pkg/cmd/preview/preview.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ func NewCmdPreview() *cobra.Command {
previewLong = i18n.T(`
Preview a series of resource changes within the stack.

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.`)
Create, update or delete resources according to the intent described in the stack. By default,
Kusion will generate an execution preview and present it for your approval before taking any action.`)

previewExample = i18n.T(`
# Preview with specified work directory
Expand Down Expand Up @@ -63,10 +63,10 @@ func NewCmdPreview() *cobra.Command {
func (o *Options) AddPreviewFlags(cmd *cobra.Command) {
cmd.Flags().StringVarP(&o.Operator, "operator", "", "",
i18n.T("Specify the operator"))
cmd.Flags().BoolVarP(&o.Detail, "detail", "d", false,
i18n.T("Automatically show plan details with interactive options"))
cmd.Flags().BoolVarP(&o.Detail, "detail", "d", true,
i18n.T("Automatically show preview details with interactive options"))
cmd.Flags().BoolVarP(&o.All, "all", "a", false,
i18n.T("Automatically show all plan details, combined use with flag `--detail`"))
i18n.T("Automatically show all preview details, combined use with flag `--detail`"))
cmd.Flags().BoolVarP(&o.NoStyle, "no-style", "", false,
i18n.T("no-style sets to RawOutput mode and disables all of styling"))
cmd.Flags().StringSliceVarP(&o.IgnoreFields, "ignore-fields", "", nil,
Expand Down
Loading