diff --git a/cmd/kyma/alpha/enable/enable.go b/cmd/kyma/alpha/add/add.go similarity index 63% rename from cmd/kyma/alpha/enable/enable.go rename to cmd/kyma/alpha/add/add.go index f70ecf153..e54633221 100644 --- a/cmd/kyma/alpha/enable/enable.go +++ b/cmd/kyma/alpha/add/add.go @@ -1,15 +1,16 @@ -package enable +package add import ( - "github.com/kyma-project/cli/cmd/kyma/alpha/enable/module" + "github.com/kyma-project/cli/cmd/kyma/alpha/add/module" "github.com/kyma-project/cli/internal/cli" "github.com/spf13/cobra" ) func NewCmd(o *cli.Options) *cobra.Command { cmd := &cobra.Command{ - Use: "enable", - Short: "Enables a resource in the Kyma cluster.", + Use: "add", + Aliases: []string{"enable"}, + Short: "Enables a resource in the Kyma cluster.", Long: `Use this command to enable a resource in the Kyma cluster. `, } diff --git a/cmd/kyma/alpha/enable/module/mock/mock_interactor.go b/cmd/kyma/alpha/add/module/mock/mock_interactor.go similarity index 100% rename from cmd/kyma/alpha/enable/module/mock/mock_interactor.go rename to cmd/kyma/alpha/add/module/mock/mock_interactor.go diff --git a/cmd/kyma/alpha/enable/module/module.go b/cmd/kyma/alpha/add/module/module.go similarity index 95% rename from cmd/kyma/alpha/enable/module/module.go rename to cmd/kyma/alpha/add/module/module.go index 398e52321..ac5ba9ab6 100644 --- a/cmd/kyma/alpha/enable/module/module.go +++ b/cmd/kyma/alpha/add/module/module.go @@ -31,8 +31,8 @@ func NewCmd(o *Options) *cobra.Command { cmd := &cobra.Command{ Use: "module [name] [flags]", - Short: "Enables a module in the cluster or in the given Kyma resource.", - Long: `Use this command to enable Kyma modules available in the cluster. + Short: "Activates a module in the cluster or in the given Kyma resource.", + Long: `Use this command to activate Kyma modules available in the cluster. ### Detailed description @@ -43,8 +43,8 @@ A module is available when it is released with a ModuleTemplate. The ModuleTempl `, Example: ` -Enable "my-module" from "alpha" channel in "default-kyma" in "kyma-system" Namespace - kyma alpha enable module my-module -c alpha -n kyma-system -k default-kyma +Add "my-module" from "alpha" channel to "default-kyma" in "kyma-system" Namespace + kyma alpha add module my-module -c alpha -n kyma-system -k default-kyma `, RunE: func(cmd *cobra.Command, args []string) error { return c.Run(cmd.Context(), args) }, Aliases: []string{"mod", "mods", "modules"}, diff --git a/cmd/kyma/alpha/enable/module/module_test.go b/cmd/kyma/alpha/add/module/module_test.go similarity index 97% rename from cmd/kyma/alpha/enable/module/module_test.go rename to cmd/kyma/alpha/add/module/module_test.go index ff6d9ff50..102730563 100644 --- a/cmd/kyma/alpha/enable/module/module_test.go +++ b/cmd/kyma/alpha/add/module/module_test.go @@ -7,7 +7,7 @@ import ( "github.com/kyma-project/lifecycle-manager/api/v1beta2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/kyma-project/cli/cmd/kyma/alpha/enable/module/mock" + "github.com/kyma-project/cli/cmd/kyma/alpha/add/module/mock" "github.com/kyma-project/cli/internal/cli/alpha/module" ) diff --git a/cmd/kyma/alpha/enable/module/opts.go b/cmd/kyma/alpha/add/module/opts.go similarity index 100% rename from cmd/kyma/alpha/enable/module/opts.go rename to cmd/kyma/alpha/add/module/opts.go diff --git a/cmd/kyma/alpha/enable/module/opts_test.go b/cmd/kyma/alpha/add/module/opts_test.go similarity index 100% rename from cmd/kyma/alpha/enable/module/opts_test.go rename to cmd/kyma/alpha/add/module/opts_test.go diff --git a/cmd/kyma/alpha/alpha.go b/cmd/kyma/alpha/alpha.go index dcb8e7a12..ebf326d92 100755 --- a/cmd/kyma/alpha/alpha.go +++ b/cmd/kyma/alpha/alpha.go @@ -1,10 +1,10 @@ package alpha import ( + "github.com/kyma-project/cli/cmd/kyma/alpha/add" "github.com/kyma-project/cli/cmd/kyma/alpha/create" + "github.com/kyma-project/cli/cmd/kyma/alpha/delete" "github.com/kyma-project/cli/cmd/kyma/alpha/deploy" - "github.com/kyma-project/cli/cmd/kyma/alpha/disable" - "github.com/kyma-project/cli/cmd/kyma/alpha/enable" "github.com/kyma-project/cli/cmd/kyma/alpha/list" "github.com/kyma-project/cli/cmd/kyma/alpha/sign" "github.com/kyma-project/cli/cmd/kyma/alpha/verify" @@ -23,8 +23,8 @@ func NewCmd(o *cli.Options) *cobra.Command { cmd.AddCommand(create.NewCmd(o)) cmd.AddCommand(list.NewCmd(o)) - cmd.AddCommand(enable.NewCmd(o)) - cmd.AddCommand(disable.NewCmd(o)) + cmd.AddCommand(add.NewCmd(o)) + cmd.AddCommand(delete.NewCmd(o)) cmd.AddCommand(deploy.NewCmd(deploy.NewOptions(o))) cmd.AddCommand(sign.NewCmd(o)) cmd.AddCommand(verify.NewCmd(o)) diff --git a/cmd/kyma/alpha/disable/disable.go b/cmd/kyma/alpha/delete/delete.go similarity index 61% rename from cmd/kyma/alpha/disable/disable.go rename to cmd/kyma/alpha/delete/delete.go index b5f2700a4..144829648 100644 --- a/cmd/kyma/alpha/disable/disable.go +++ b/cmd/kyma/alpha/delete/delete.go @@ -1,15 +1,16 @@ -package disable +package delete import ( - "github.com/kyma-project/cli/cmd/kyma/alpha/disable/module" + "github.com/kyma-project/cli/cmd/kyma/alpha/delete/module" "github.com/kyma-project/cli/internal/cli" "github.com/spf13/cobra" ) func NewCmd(o *cli.Options) *cobra.Command { cmd := &cobra.Command{ - Use: "disable", - Short: "Disables a resource in the Kyma cluster.", + Use: "delete", + Aliases: []string{"disable"}, + Short: "Disables a resource in the Kyma cluster.", Long: `Use this command to disable a resource in the Kyma cluster. `, } diff --git a/cmd/kyma/alpha/disable/module/module.go b/cmd/kyma/alpha/delete/module/module.go similarity index 92% rename from cmd/kyma/alpha/disable/module/module.go rename to cmd/kyma/alpha/delete/module/module.go index 33a2448bd..85d057ff2 100644 --- a/cmd/kyma/alpha/disable/module/module.go +++ b/cmd/kyma/alpha/delete/module/module.go @@ -29,8 +29,8 @@ func NewCmd(o *Options) *cobra.Command { cmd := &cobra.Command{ Use: "module [name] [flags]", - Short: "Disables a module in the cluster or in the given Kyma resource.", - Long: `Use this command to disable active Kyma modules in the cluster. + Short: "Deactivates a module in the cluster or in the given Kyma resource.", + Long: `Use this command to deactivate Kyma modules in the cluster. ### Detailed description @@ -40,8 +40,8 @@ This command disables an active module in the cluster. `, Example: ` -Disable "my-module" from the "alpha" channel in "default-kyma" in "kyma-system" Namespace - kyma alpha disable module my-module -c alpha -n kyma-system -k default-kyma +Delete "my-module" from the "alpha" channel from "default-kyma" in "kyma-system" Namespace + kyma alpha delete module my-module -c alpha -n kyma-system -k default-kyma `, RunE: func(cmd *cobra.Command, args []string) error { return c.Run(cmd.Context(), args) }, Aliases: []string{"mod", "mods", "modules"}, diff --git a/cmd/kyma/alpha/disable/module/module_test.go b/cmd/kyma/alpha/delete/module/module_test.go similarity index 100% rename from cmd/kyma/alpha/disable/module/module_test.go rename to cmd/kyma/alpha/delete/module/module_test.go diff --git a/cmd/kyma/alpha/disable/module/opts.go b/cmd/kyma/alpha/delete/module/opts.go similarity index 100% rename from cmd/kyma/alpha/disable/module/opts.go rename to cmd/kyma/alpha/delete/module/opts.go diff --git a/docs/gen-docs/kyma_alpha.md b/docs/gen-docs/kyma_alpha.md index 221adcfdd..49eb0a728 100644 --- a/docs/gen-docs/kyma_alpha.md +++ b/docs/gen-docs/kyma_alpha.md @@ -22,10 +22,10 @@ Alpha commands are experimental, unreleased features that should only be used by ## See also * [kyma](kyma.md) - Controls a Kyma cluster. +* [kyma alpha add](kyma_alpha_add.md) - Enables a resource in the Kyma cluster. * [kyma alpha create](kyma_alpha_create.md) - Creates resources on the Kyma cluster. +* [kyma alpha delete](kyma_alpha_delete.md) - Disables a resource in the Kyma cluster. * [kyma alpha deploy](kyma_alpha_deploy.md) - Deploys Kyma on a running Kubernetes cluster. -* [kyma alpha disable](kyma_alpha_disable.md) - Disables a resource in the Kyma cluster. -* [kyma alpha enable](kyma_alpha_enable.md) - Enables a resource in the Kyma cluster. * [kyma alpha list](kyma_alpha_list.md) - Lists resources on the Kyma cluster. * [kyma alpha sign](kyma_alpha_sign.md) - Signs all module resources from an unsigned module component descriptor that's hosted in a remote OCI registry * [kyma alpha verify](kyma_alpha_verify.md) - Verifies all module resources from a signed module component descriptor that's hosted in a remote OCI registry diff --git a/docs/gen-docs/kyma_alpha_enable.md b/docs/gen-docs/kyma_alpha_add.md similarity index 85% rename from docs/gen-docs/kyma_alpha_enable.md rename to docs/gen-docs/kyma_alpha_add.md index b9ad667f1..4470dc5af 100644 --- a/docs/gen-docs/kyma_alpha_enable.md +++ b/docs/gen-docs/kyma_alpha_add.md @@ -1,5 +1,5 @@ --- -title: kyma alpha enable +title: kyma alpha add --- Enables a resource in the Kyma cluster. @@ -22,5 +22,5 @@ Use this command to enable a resource in the Kyma cluster. ## See also * [kyma alpha](kyma_alpha.md) - Experimental commands -* [kyma alpha enable module](kyma_alpha_enable_module.md) - Enables a module in the cluster or in the given Kyma resource. +* [kyma alpha add module](kyma_alpha_add_module.md) - Enables a module in the cluster or in the given Kyma resource. diff --git a/docs/gen-docs/kyma_alpha_enable_module.md b/docs/gen-docs/kyma_alpha_add_module.md similarity index 86% rename from docs/gen-docs/kyma_alpha_enable_module.md rename to docs/gen-docs/kyma_alpha_add_module.md index 2e0bcb06b..0d596566b 100644 --- a/docs/gen-docs/kyma_alpha_enable_module.md +++ b/docs/gen-docs/kyma_alpha_add_module.md @@ -1,5 +1,5 @@ --- -title: kyma alpha enable module +title: kyma alpha add module --- Enables a module in the cluster or in the given Kyma resource. @@ -17,16 +17,13 @@ A module is available when it is released with a ModuleTemplate. The ModuleTempl ```bash -kyma alpha enable module [name] [flags] +kyma alpha add module [name] [flags] ``` ## Examples - +* Enable "my-module" from "alpha" channel in "default-kyma" in "kyma-system" Namespace ```bash - -Enable "my-module" from "alpha" channel in "default-kyma" in "kyma-system" Namespace - kyma alpha enable module my-module -c alpha -n kyma-system -k default-kyma - +kyma alpha add module my-module -c alpha -n kyma-system -k default-kyma ``` ## Flags @@ -53,5 +50,5 @@ Enable "my-module" from "alpha" channel in "default-kyma" in "kyma-system" Names ## See also -* [kyma alpha enable](kyma_alpha_enable.md) - Enables a resource in the Kyma cluster. +* [kyma alpha add](kyma_alpha_add.md) - Enables a resource in the Kyma cluster. diff --git a/docs/gen-docs/kyma_alpha_disable.md b/docs/gen-docs/kyma_alpha_delete.md similarity index 85% rename from docs/gen-docs/kyma_alpha_disable.md rename to docs/gen-docs/kyma_alpha_delete.md index aaa6416c9..8b1dd00f9 100644 --- a/docs/gen-docs/kyma_alpha_disable.md +++ b/docs/gen-docs/kyma_alpha_delete.md @@ -1,5 +1,5 @@ --- -title: kyma alpha disable +title: kyma alpha delete --- Disables a resource in the Kyma cluster. @@ -22,5 +22,5 @@ Use this command to disable a resource in the Kyma cluster. ## See also * [kyma alpha](kyma_alpha.md) - Experimental commands -* [kyma alpha disable module](kyma_alpha_disable_module.md) - Disables a module in the cluster or in the given Kyma resource. +* [kyma alpha delete module](kyma_alpha_delete_module.md) - Disables a module in the cluster or in the given Kyma resource. diff --git a/docs/gen-docs/kyma_alpha_disable_module.md b/docs/gen-docs/kyma_alpha_delete_module.md similarity index 83% rename from docs/gen-docs/kyma_alpha_disable_module.md rename to docs/gen-docs/kyma_alpha_delete_module.md index 21f1c3602..1e317e88e 100644 --- a/docs/gen-docs/kyma_alpha_disable_module.md +++ b/docs/gen-docs/kyma_alpha_delete_module.md @@ -1,5 +1,5 @@ --- -title: kyma alpha disable module +title: kyma alpha delete module --- Disables a module in the cluster or in the given Kyma resource. @@ -16,16 +16,13 @@ This command disables an active module in the cluster. ```bash -kyma alpha disable module [name] [flags] +kyma alpha delete module [name] [flags] ``` ## Examples - +* Delete "my-module" from the "alpha" channel in "default-kyma" in "kyma-system" Namespace ```bash - -Disable "my-module" from the "alpha" channel in "default-kyma" in "kyma-system" Namespace - kyma alpha disable module my-module -c alpha -n kyma-system -k default-kyma - +kyma alpha delete module my-module -c alpha -n kyma-system -k default-kyma ``` ## Flags @@ -51,5 +48,5 @@ Disable "my-module" from the "alpha" channel in "default-kyma" in "kyma-system" ## See also -* [kyma alpha disable](kyma_alpha_disable.md) - Disables a resource in the Kyma cluster. +* [kyma alpha delete](kyma_alpha_delete.md) - Disables a resource in the Kyma cluster.