This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit c29c2845aa0e558ce6dd11124fc6b21eac0f3088
Author: Pasquale Congiusti <pasquale.congiu...@gmail.com>
AuthorDate: Mon Aug 19 10:35:24 2024 +0200

    chore(cmd): deprecate CLIs subcommands
---
 docs/modules/ROOT/pages/cli/cli.adoc |  4 ----
 pkg/cmd/describe.go                  |  7 ++++---
 pkg/cmd/describe_integration.go      | 11 ++++++-----
 pkg/cmd/describe_kamelet.go          | 11 ++++++-----
 pkg/cmd/describe_kit.go              | 11 ++++++-----
 pkg/cmd/describe_platform.go         | 11 ++++++-----
 pkg/cmd/kamelet.go                   |  7 ++++---
 pkg/cmd/kamelet_add_repo.go          |  9 +++++----
 pkg/cmd/kamelet_delete.go            |  7 ++++---
 pkg/cmd/kamelet_get.go               |  9 +++++----
 pkg/cmd/kamelet_remove_repo.go       |  9 +++++----
 11 files changed, 51 insertions(+), 45 deletions(-)

diff --git a/docs/modules/ROOT/pages/cli/cli.adoc 
b/docs/modules/ROOT/pages/cli/cli.adoc
index 0e305161c..d6eeba139 100644
--- a/docs/modules/ROOT/pages/cli/cli.adoc
+++ b/docs/modules/ROOT/pages/cli/cli.adoc
@@ -43,10 +43,6 @@ Some of the most used commands are:
 |Get integrations deployed on Kubernetes
 |kamel get
 
-|describe
-|Get detailed information on a resource
-|kamel describe integration routes
-
 |log
 |Print the logs of a running integration
 |kamel log routes
diff --git a/pkg/cmd/describe.go b/pkg/cmd/describe.go
index a22f9a041..54a6d355f 100644
--- a/pkg/cmd/describe.go
+++ b/pkg/cmd/describe.go
@@ -75,9 +75,10 @@ func describeTraits(w *indentedwriter.Writer, traits 
interface{}) error {
 
 func newCmdDescribe(rootCmdOptions *RootCmdOptions) *cobra.Command {
        cmd := cobra.Command{
-               Use:   "describe",
-               Short: "Describe a resource",
-               Long:  `Describe a Camel K resource.`,
+               Use:        "describe",
+               Deprecated: "consider using kubectl (or oc) custom resource 
describe command instead.",
+               Short:      "Describe a resource",
+               Long:       `Describe a Camel K resource.`,
        }
 
        cmd.AddCommand(cmdOnly(newDescribeKitCmd(rootCmdOptions)))
diff --git a/pkg/cmd/describe_integration.go b/pkg/cmd/describe_integration.go
index 5917173b9..0da07b947 100644
--- a/pkg/cmd/describe_integration.go
+++ b/pkg/cmd/describe_integration.go
@@ -37,11 +37,12 @@ func newDescribeIntegrationCmd(rootCmdOptions 
*RootCmdOptions) (*cobra.Command,
        }
 
        cmd := cobra.Command{
-               Use:     "integration",
-               Aliases: []string{"it"},
-               Short:   "Describe an Integration",
-               Long:    `Describe an Integration.`,
-               PreRunE: decode(&options, options.Flags),
+               Use:        "integration",
+               Aliases:    []string{"it"},
+               Short:      "Describe an Integration",
+               Long:       `Describe an Integration.`,
+               Deprecated: "consider using kubectl (or oc) custom resource 
describe command instead.",
+               PreRunE:    decode(&options, options.Flags),
                RunE: func(cmd *cobra.Command, args []string) error {
                        if err := options.validate(cmd, args); err != nil {
                                return err
diff --git a/pkg/cmd/describe_kamelet.go b/pkg/cmd/describe_kamelet.go
index a0464c8e1..691719b57 100644
--- a/pkg/cmd/describe_kamelet.go
+++ b/pkg/cmd/describe_kamelet.go
@@ -38,11 +38,12 @@ func newDescribeKameletCmd(rootCmdOptions *RootCmdOptions) 
(*cobra.Command, *des
        }
 
        cmd := cobra.Command{
-               Use:     "kamelet",
-               Aliases: []string{"kl"},
-               Short:   "Describe a Kamelet",
-               Long:    `Describe a Kamelet.`,
-               PreRunE: decode(&options, options.Flags),
+               Use:        "kamelet",
+               Aliases:    []string{"kl"},
+               Short:      "Describe a Kamelet",
+               Long:       `Describe a Kamelet.`,
+               Deprecated: "consider using kubectl (or oc) custom resource 
describe command instead.",
+               PreRunE:    decode(&options, options.Flags),
                RunE: func(cmd *cobra.Command, args []string) error {
                        if err := options.validate(cmd, args); err != nil {
                                return err
diff --git a/pkg/cmd/describe_kit.go b/pkg/cmd/describe_kit.go
index ea5346e82..d5abffced 100644
--- a/pkg/cmd/describe_kit.go
+++ b/pkg/cmd/describe_kit.go
@@ -36,11 +36,12 @@ func newDescribeKitCmd(rootCmdOptions *RootCmdOptions) 
(*cobra.Command, *describ
        }
 
        cmd := cobra.Command{
-               Use:     "kit",
-               Aliases: []string{"ik"},
-               Short:   "Describe an Integration Kit",
-               Long:    `Describe an Integration Kit.`,
-               PreRunE: decode(&options, options.Flags),
+               Use:        "kit",
+               Aliases:    []string{"ik"},
+               Short:      "Describe an Integration Kit",
+               Long:       `Describe an Integration Kit.`,
+               Deprecated: "consider using kubectl (or oc) custom resource 
describe command instead.",
+               PreRunE:    decode(&options, options.Flags),
                RunE: func(cmd *cobra.Command, args []string) error {
                        if err := options.validate(cmd, args); err != nil {
                                return err
diff --git a/pkg/cmd/describe_platform.go b/pkg/cmd/describe_platform.go
index 72692e3b1..2979dee74 100644
--- a/pkg/cmd/describe_platform.go
+++ b/pkg/cmd/describe_platform.go
@@ -36,11 +36,12 @@ func newDescribePlatformCmd(rootCmdOptions *RootCmdOptions) 
(*cobra.Command, *de
        }
 
        cmd := cobra.Command{
-               Use:     "platform",
-               Aliases: []string{"ip"},
-               Short:   "Describe an Integration Platform",
-               Long:    `Describe an Integration Platform.`,
-               PreRunE: decode(&options, options.Flags),
+               Use:        "platform",
+               Aliases:    []string{"ip"},
+               Short:      "Describe an Integration Platform",
+               Long:       `Describe an Integration Platform.`,
+               Deprecated: "consider using kubectl (or oc) custom resource 
describe command instead.",
+               PreRunE:    decode(&options, options.Flags),
                RunE: func(cmd *cobra.Command, args []string) error {
                        if err := options.validate(cmd, args); err != nil {
                                return err
diff --git a/pkg/cmd/kamelet.go b/pkg/cmd/kamelet.go
index 8b1f48b96..fbe14f20b 100644
--- a/pkg/cmd/kamelet.go
+++ b/pkg/cmd/kamelet.go
@@ -23,9 +23,10 @@ import (
 
 func newCmdKamelet(rootCmdOptions *RootCmdOptions) *cobra.Command {
        cmd := cobra.Command{
-               Use:   "kamelet",
-               Short: "Configure a Kamelet",
-               Long:  `Configure a Kamelet.`,
+               Use:        "kamelet",
+               Short:      "Configure a Kamelet",
+               Long:       `Configure a Kamelet.`,
+               Deprecated: "consider using kubectl (or oc) command instead.",
        }
 
        cmd.AddCommand(cmdOnly(newKameletGetCmd(rootCmdOptions)))
diff --git a/pkg/cmd/kamelet_add_repo.go b/pkg/cmd/kamelet_add_repo.go
index f217b01a8..3ccf7e062 100644
--- a/pkg/cmd/kamelet_add_repo.go
+++ b/pkg/cmd/kamelet_add_repo.go
@@ -40,10 +40,11 @@ func newKameletAddRepoCmd(rootCmdOptions *RootCmdOptions) 
(*cobra.Command, *kame
        }
 
        cmd := cobra.Command{
-               Use:     "add-repo 
github:owner/repo[/path_to_kamelets_folder][@version] ...",
-               Short:   "Add a Kamelet repository",
-               Long:    `Add a Kamelet repository.`,
-               PreRunE: decode(&options, options.Flags),
+               Use:        "add-repo 
github:owner/repo[/path_to_kamelets_folder][@version] ...",
+               Short:      "Add a Kamelet repository",
+               Long:       `Add a Kamelet repository.`,
+               Deprecated: "consider using kubectl (or oc) command instead.",
+               PreRunE:    decode(&options, options.Flags),
                RunE: func(cmd *cobra.Command, args []string) error {
                        if err := options.validate(args); err != nil {
                                return err
diff --git a/pkg/cmd/kamelet_delete.go b/pkg/cmd/kamelet_delete.go
index 408ca3fdb..ee83f558a 100644
--- a/pkg/cmd/kamelet_delete.go
+++ b/pkg/cmd/kamelet_delete.go
@@ -35,9 +35,10 @@ func newKameletDeleteCmd(rootCmdOptions *RootCmdOptions) 
(*cobra.Command, *kamel
        }
 
        cmd := cobra.Command{
-               Use:     "delete [Kamelet1] [Kamelet2] ...",
-               Short:   "Delete Kamelets deployed on Kubernetes",
-               PreRunE: decode(&options, options.Flags),
+               Use:        "delete [Kamelet1] [Kamelet2] ...",
+               Short:      "Delete Kamelets deployed on Kubernetes",
+               Deprecated: "consider using kubectl (or oc) command instead.",
+               PreRunE:    decode(&options, options.Flags),
                RunE: func(cmd *cobra.Command, args []string) error {
                        if err := options.validate(args); err != nil {
                                return err
diff --git a/pkg/cmd/kamelet_get.go b/pkg/cmd/kamelet_get.go
index 0f2e83351..ce5a31bf4 100644
--- a/pkg/cmd/kamelet_get.go
+++ b/pkg/cmd/kamelet_get.go
@@ -36,10 +36,11 @@ func newKameletGetCmd(rootCmdOptions *RootCmdOptions) 
(*cobra.Command, *kameletG
        }
 
        cmd := cobra.Command{
-               Use:     "get",
-               Short:   "Get defined Kamelet",
-               Long:    `Get defined Kamelet.`,
-               PreRunE: decode(&options, options.Flags),
+               Use:        "get",
+               Short:      "Get defined Kamelet",
+               Long:       `Get defined Kamelet.`,
+               Deprecated: "consider using kubectl (or oc) command instead.",
+               PreRunE:    decode(&options, options.Flags),
                RunE: func(cmd *cobra.Command, args []string) error {
                        if err := options.validate(); err != nil {
                                return err
diff --git a/pkg/cmd/kamelet_remove_repo.go b/pkg/cmd/kamelet_remove_repo.go
index f521d27e3..869c21414 100644
--- a/pkg/cmd/kamelet_remove_repo.go
+++ b/pkg/cmd/kamelet_remove_repo.go
@@ -33,10 +33,11 @@ func newKameletRemoveRepoCmd(rootCmdOptions 
*RootCmdOptions) (*cobra.Command, *k
        }
 
        cmd := cobra.Command{
-               Use:     "remove-repo 
github:owner/repo[/path_to_kamelets_folder][@version] ...",
-               Short:   "Remove a Kamelet repository",
-               Long:    `Remove a Kamelet repository.`,
-               PreRunE: decode(&options, options.Flags),
+               Use:        "remove-repo 
github:owner/repo[/path_to_kamelets_folder][@version] ...",
+               Short:      "Remove a Kamelet repository",
+               Long:       `Remove a Kamelet repository.`,
+               Deprecated: "consider using kubectl (or oc) command instead.",
+               PreRunE:    decode(&options, options.Flags),
                RunE: func(cmd *cobra.Command, args []string) error {
                        if err := options.validate(args); err != nil {
                                return err

Reply via email to