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

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


The following commit(s) were added to refs/heads/main by this push:
     new 12fb90f3c Fix #6806: remove deprecated delete, get and kit kamel 
commands
12fb90f3c is described below

commit 12fb90f3c7b19a6954ca7d3e8300e1496454b37f
Author: rrafifnanda <[email protected]>
AuthorDate: Tue Sep 15 23:09:55 2026 +0700

    Fix #6806: remove deprecated delete, get and kit kamel commands
    
    Removes the deprecated delete, get and kit CLI implementations along
    with their unit tests and deregisters them from the root command.
    
    E2E updates per maintainer feedback: drops the dedicated kamel delete
    suite, replaces kamel delete cleanup calls with kubectl delete it,
    switches the get help case to run help, and updates the running-cli
    docs example to kubectl get integrations.
---
 docs/modules/ROOT/pages/running/running-cli.adoc |   4 +-
 e2e/advanced/debug_test.go                       |   6 +-
 e2e/common/cli/delete_test.go                    |  79 ----------
 e2e/common/cli/help_test.go                      |   6 +-
 e2e/common/traits/master_test.go                 |   2 +-
 e2e/common/traits/route_test.go                  |  12 +-
 e2e/kafka/kafka_autoscale_keda_test.go           |  10 +-
 e2e/kafka/kafka_binding_test.go                  |   4 +-
 e2e/knative/knative_service_test.go              |   2 +-
 e2e/support/test_support.go                      |   2 +-
 pkg/cmd/delete.go                                | 175 --------------------
 pkg/cmd/delete_test.go                           |  65 --------
 pkg/cmd/get.go                                   |  90 -----------
 pkg/cmd/kit.go                                   |  37 -----
 pkg/cmd/kit_create.go                            | 193 -----------------------
 pkg/cmd/kit_create_test.go                       | 131 ---------------
 pkg/cmd/kit_delete.go                            | 147 -----------------
 pkg/cmd/kit_get.go                               |  93 -----------
 pkg/cmd/kit_test.go                              |  31 ----
 pkg/cmd/root.go                                  |   3 -
 pkg/cmd/root_test.go                             |  11 ++
 21 files changed, 35 insertions(+), 1068 deletions(-)

diff --git a/docs/modules/ROOT/pages/running/running-cli.adoc 
b/docs/modules/ROOT/pages/running/running-cli.adoc
index d4d871ebe..1bae00e99 100644
--- a/docs/modules/ROOT/pages/running/running-cli.adoc
+++ b/docs/modules/ROOT/pages/running/running-cli.adoc
@@ -38,7 +38,7 @@ kamel run run-hello.yaml
 Camel K integrations follow a lifecycle composed of several steps before 
getting into the `Running` state. You can check the status of all integrations 
by executing the following command:
 
 ```
-kamel get
+kubectl get integrations
 ```
 
 [[logging-integration]]
@@ -224,4 +224,4 @@ kamel run \
     
https://gist.githubusercontent.com/${user-id}/${gist-id}/raw/${...}/routes.yaml
 ----
 
-NOTE: GitHub applies rate limiting to its APIs and as Authenticated requests 
get a higher rate limit, the `kamel` honour the env var GITHUB_TOKEN and if it 
is found, then it is used for GitHub authentication.
\ No newline at end of file
+NOTE: GitHub applies rate limiting to its APIs and as Authenticated requests 
get a higher rate limit, the `kamel` honour the env var GITHUB_TOKEN and if it 
is found, then it is used for GitHub authentication.
diff --git a/e2e/advanced/debug_test.go b/e2e/advanced/debug_test.go
index b53df3024..7d1debd1a 100644
--- a/e2e/advanced/debug_test.go
+++ b/e2e/advanced/debug_test.go
@@ -51,7 +51,7 @@ func TestKamelCLIDebug(t *testing.T) {
                        go KamelWithContext(t, debugTestContext, "debug", 
"yaml", "-n", ns).ExecuteContext(debugTestContext)
 
                        g.Eventually(portIsInUse("127.0.0.1", "5005"), 
TestTimeoutMedium, 5*time.Second).Should(BeTrue())
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).To(Succeed())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
"--all", "-n", ns))
                        g.Eventually(IntegrationPods(t, ctx, ns, "yaml"), 
TestTimeoutMedium, 5*time.Second).Should(HaveLen(0))
                })
 
@@ -65,7 +65,7 @@ func TestKamelCLIDebug(t *testing.T) {
                        go KamelWithContext(t, debugTestContext, "debug", 
"yaml", "--port", "5006", "-n", ns).ExecuteContext(debugTestContext)
 
                        g.Eventually(portIsInUse("127.0.0.1", "5006"), 
TestTimeoutMedium, 5*time.Second).Should(BeTrue())
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).To(Succeed())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
"--all", "-n", ns))
                        g.Eventually(IntegrationPods(t, ctx, ns, "yaml"), 
TestTimeoutMedium, 5*time.Second).Should(HaveLen(0))
                })
 
@@ -78,7 +78,7 @@ func TestKamelCLIDebug(t *testing.T) {
                        go KamelWithContext(t, debugTestContext, "debug", 
"yaml", "-n", ns).ExecuteContext(debugTestContext)
 
                        g.Eventually(IntegrationLogs(t, ctx, ns, "yaml"), 
TestTimeoutMedium).Should(ContainSubstring("Listening for transport dt_socket 
at address: 5005"))
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).To(Succeed())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
"--all", "-n", ns))
                        g.Eventually(IntegrationPods(t, ctx, ns, "yaml"), 
TestTimeoutMedium, 5*time.Second).Should(HaveLen(0))
                })
 
diff --git a/e2e/common/cli/delete_test.go b/e2e/common/cli/delete_test.go
deleted file mode 100644
index 1b3fc5d54..000000000
--- a/e2e/common/cli/delete_test.go
+++ /dev/null
@@ -1,79 +0,0 @@
-//go:build integration
-// +build integration
-
-// To enable compilation of this file in Goland, go to "Settings -> Go -> 
Vendoring & Build Tags -> Custom Tags" and add "integration"
-
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package common
-
-import (
-       "context"
-       "testing"
-
-       corev1 "k8s.io/api/core/v1"
-
-       . "github.com/onsi/gomega"
-
-       . "github.com/apache/camel-k/v2/e2e/support"
-)
-
-func TestKamelCLIDelete(t *testing.T) {
-       t.Parallel()
-       WithNewTestNamespace(t, func(ctx context.Context, g *WithT, ns string) {
-               t.Run("delete running integration", func(t *testing.T) {
-                       g.Expect(KamelRun(t, ctx, ns, 
"files/yaml.yaml").Execute()).To(Succeed())
-                       g.Eventually(IntegrationPodPhase(t, ctx, ns, "yaml"), 
TestTimeoutLong).Should(Equal(corev1.PodRunning))
-                       g.Expect(Kamel(t, ctx, "delete", "yaml", "-n", 
ns).Execute()).To(Succeed())
-                       g.Eventually(Integration(t, ctx, ns, 
"yaml")).Should(BeNil())
-                       g.Eventually(IntegrationPod(t, ctx, ns, "yaml"), 
TestTimeoutLong).Should(BeNil())
-               })
-
-               t.Run("delete building integration", func(t *testing.T) {
-                       g.Expect(KamelRun(t, ctx, ns, 
"files/yaml.yaml").Execute()).To(Succeed())
-                       g.Expect(Kamel(t, ctx, "delete", "yaml", "-n", 
ns).Execute()).To(Succeed())
-                       g.Eventually(Integration(t, ctx, ns, 
"yaml")).Should(BeNil())
-                       g.Eventually(IntegrationPod(t, ctx, ns, "yaml"), 
TestTimeoutLong).Should(BeNil())
-               })
-
-               t.Run("delete several integrations", func(t *testing.T) {
-                       g.Expect(KamelRun(t, ctx, ns, 
"files/yaml.yaml").Execute()).To(Succeed())
-                       g.Expect(KamelRun(t, ctx, ns, 
"files/Java.java").Execute()).To(Succeed())
-                       g.Eventually(IntegrationPodPhase(t, ctx, ns, "yaml"), 
TestTimeoutLong).Should(Equal(corev1.PodRunning))
-                       g.Eventually(IntegrationPodPhase(t, ctx, ns, "java"), 
TestTimeoutLong).Should(Equal(corev1.PodRunning))
-                       g.Expect(Kamel(t, ctx, "delete", "yaml", "-n", 
ns).Execute()).To(Succeed())
-                       g.Eventually(Integration(t, ctx, ns, 
"yaml")).Should(BeNil())
-                       g.Eventually(IntegrationPod(t, ctx, ns, "yaml"), 
TestTimeoutLong).Should(BeNil())
-                       g.Expect(Kamel(t, ctx, "delete", "java", "-n", 
ns).Execute()).To(Succeed())
-                       g.Eventually(Integration(t, ctx, ns, 
"java")).Should(BeNil())
-                       g.Eventually(IntegrationPod(t, ctx, ns, "java"), 
TestTimeoutLong).Should(BeNil())
-               })
-
-               t.Run("delete all integrations", func(t *testing.T) {
-                       g.Expect(KamelRun(t, ctx, ns, 
"files/yaml.yaml").Execute()).To(Succeed())
-                       g.Expect(KamelRun(t, ctx, ns, 
"files/Java.java").Execute()).To(Succeed())
-                       g.Eventually(IntegrationPodPhase(t, ctx, ns, "yaml"), 
TestTimeoutLong).Should(Equal(corev1.PodRunning))
-                       g.Eventually(IntegrationPodPhase(t, ctx, ns, "java"), 
TestTimeoutLong).Should(Equal(corev1.PodRunning))
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).To(Succeed())
-                       g.Eventually(Integration(t, ctx, ns, 
"yaml")).Should(BeNil())
-                       g.Eventually(IntegrationPod(t, ctx, ns, "yaml"), 
TestTimeoutLong).Should(BeNil())
-                       g.Eventually(Integration(t, ctx, ns, 
"java")).Should(BeNil())
-                       g.Eventually(IntegrationPod(t, ctx, ns, "java"), 
TestTimeoutLong).Should(BeNil())
-               })
-       })
-}
diff --git a/e2e/common/cli/help_test.go b/e2e/common/cli/help_test.go
index 34eecd561..97e006591 100644
--- a/e2e/common/cli/help_test.go
+++ b/e2e/common/cli/help_test.go
@@ -43,9 +43,9 @@ func TestKamelCLIHelp(t *testing.T) {
                g.Expect(helpMsg).To(ContainSubstring("Flags:"))
        })
 
-       t.Run("'get' command help (short flag)", func(t *testing.T) {
-               helpMsg := GetOutputString(Kamel(t, ctx, "get", "-h"))
-               g.Expect(helpMsg).To(ContainSubstring("Get the status of 
integrations deployed on Kubernetes"))
+       t.Run("'run' command help (short flag)", func(t *testing.T) {
+               helpMsg := GetOutputString(Kamel(t, ctx, "run", "-h"))
+               g.Expect(helpMsg).To(ContainSubstring("Build and run the 
Integration on Kubernetes"))
                g.Expect(helpMsg).To(ContainSubstring("Usage:"))
                g.Expect(helpMsg).To(ContainSubstring("Flags:"))
        })
diff --git a/e2e/common/traits/master_test.go b/e2e/common/traits/master_test.go
index 290f2e129..04399bf49 100644
--- a/e2e/common/traits/master_test.go
+++ b/e2e/common/traits/master_test.go
@@ -55,7 +55,7 @@ func TestMasterTrait(t *testing.T) {
                        ).Execute()).To(Succeed())
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, name), 
TestTimeoutLong).Should(Equal(corev1.PodRunning))
                        g.Eventually(IntegrationLogs(t, ctx, ns, name), 
TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).To(Succeed())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
"--all", "-n", ns))
                })
 
                t.Run("only one integration with master runs using properties", 
func(t *testing.T) {
diff --git a/e2e/common/traits/route_test.go b/e2e/common/traits/route_test.go
index 5921bbe71..9027ae637 100644
--- a/e2e/common/traits/route_test.go
+++ b/e2e/common/traits/route_test.go
@@ -102,7 +102,7 @@ func TestRunRoutes(t *testing.T) {
                        route := Route(t, ctx, ns, integrationName)
                        url := fmt.Sprintf("http://%s/hello?name=Simple";, 
route().Spec.Host)
                        g.Eventually(httpRequest(url, false), 
TestTimeoutShort).Should(Equal("Hello Simple"))
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).Should(BeNil())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
"--all", "-n", ns))
                        g.Eventually(Route(t, ctx, ns, integrationName), 
TestTimeoutMedium).Should(BeNil())
                })
 
@@ -119,7 +119,7 @@ func TestRunRoutes(t *testing.T) {
                        route := Route(t, ctx, ns, integrationName)
                        url := fmt.Sprintf("https://%s/hello?name=TLS_Edge";, 
route().Spec.Host)
                        g.Eventually(httpRequest(url, true), 
TestTimeoutShort).Should(Equal("Hello TLS_Edge"))
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).Should(BeNil())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
"--all", "-n", ns))
                        g.Eventually(Route(t, ctx, ns, integrationName), 
TestTimeoutMedium).Should(BeNil())
                })
 
@@ -137,7 +137,7 @@ func TestRunRoutes(t *testing.T) {
                        code := "TLS_EdgeCustomCertificate"
                        url := fmt.Sprintf("https://%s/hello?name=%s";, 
route().Spec.Host, code)
                        g.Eventually(httpRequest(url, true), 
TestTimeoutShort).Should(Equal("Hello " + code))
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).Should(BeNil())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
"--all", "-n", ns))
                        g.Eventually(Route(t, ctx, ns, integrationName), 
TestTimeoutMedium).Should(BeNil())
                })
 
@@ -155,7 +155,7 @@ func TestRunRoutes(t *testing.T) {
                        code := "TLS_Passthrough"
                        url := fmt.Sprintf("https://%s/hello?name=%s";, 
route().Spec.Host, code)
                        g.Eventually(httpRequest(url, true), 
TestTimeoutShort).Should(Equal("Hello " + code))
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).Should(BeNil())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
"--all", "-n", ns))
                        g.Eventually(Route(t, ctx, ns, integrationName), 
TestTimeoutMedium).Should(BeNil())
                })
 
@@ -173,12 +173,12 @@ func TestRunRoutes(t *testing.T) {
                        code := "TLS_Reencrypt"
                        url := fmt.Sprintf("https://%s/hello?name=%s";, 
route().Spec.Host, code)
                        g.Eventually(httpRequest(url, true), 
TestTimeoutShort).Should(Equal("Hello " + code))
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).Should(BeNil())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
"--all", "-n", ns))
                        g.Eventually(Route(t, ctx, ns, integrationName), 
TestTimeoutMedium).Should(BeNil())
                })
 
                t.Run("Route annotations added", func(t *testing.T) {
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).Should(BeNil())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
"--all", "-n", ns))
                        g.Expect(KamelRun(t, ctx, ns, 
"files/PlatformHttpServer.java", "-t", 
"route.annotations.'haproxy.router.openshift.io/balance'=roundrobin").Execute()).To(Succeed())
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
integrationName), TestTimeoutLong).Should(Equal(corev1.PodRunning))
                        g.Eventually(Route(t, ctx, ns, integrationName), 
TestTimeoutMedium).ShouldNot(BeNil())
diff --git a/e2e/kafka/kafka_autoscale_keda_test.go 
b/e2e/kafka/kafka_autoscale_keda_test.go
index 5e1c25474..68c71e151 100644
--- a/e2e/kafka/kafka_autoscale_keda_test.go
+++ b/e2e/kafka/kafka_autoscale_keda_test.go
@@ -64,11 +64,11 @@ func TestKafkaKedaAutoscale(t *testing.T) {
                        // Verify we are consuming some record (the body is 
null as the timer is pushing nothing)
                        g.Eventually(IntegrationLogs(t, ctx, ns, 
consumerName)).Should(ContainSubstring("Body is null"))
                        // Stop the producer
-                       g.Expect(Kamel(t, ctx, "delete", producerName, "-n", 
ns).Execute()).To(Succeed())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
producerName, "-n", ns))
                        // Consumer should scale back to 0 after some time as 
there is no longer traffic
                        g.Eventually(IntegrationStatusReplicas(t, ctx, ns, 
consumerName), TestTimeoutMedium).
                                Should(gstruct.PointTo(BeNumerically("==", 0)))
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).To(Succeed())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
"--all", "-n", ns))
                })
        }, "kafka")
 }
@@ -92,7 +92,7 @@ func TestKafkaKedaAutoDiscovery(t *testing.T) {
                        
g.Expect(scaledObj.Spec.Triggers[0].Metadata["bootstrapServers"]).To(Equal("my-cluster-kafka-bootstrap.kafka.svc:9092"))
                        
g.Expect(scaledObj.Spec.Triggers[0].Metadata["consumerGroup"]).To(Equal("auto-group"))
 
-                       g.Expect(Kamel(t, ctx, "delete", integrationName, "-n", 
ns).Execute()).To(Succeed())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
integrationName, "-n", ns))
                })
        }, "kafka")
 }
@@ -122,7 +122,7 @@ func TestKafkaKedaAutoDiscoveryWithManualTrigger(t 
*testing.T) {
                        g.Expect(kafkaTrigger).NotTo(BeNil(), "kafka trigger 
should be auto-discovered")
                        g.Expect(cronTrigger).NotTo(BeNil(), "cron trigger 
should exist from manual config")
 
-                       g.Expect(Kamel(t, ctx, "delete", integrationName, "-n", 
ns).Execute()).To(Succeed())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
integrationName, "-n", ns))
                })
        }, "kafka")
 }
@@ -149,7 +149,7 @@ func TestKafkaKedaAutoMetadata(t *testing.T) {
                        
g.Expect(scaledObj.Spec.Triggers[0].Metadata["lagThreshold"]).To(Equal("100"))
                        
g.Expect(scaledObj.Spec.Triggers[0].Metadata["activationLagThreshold"]).To(Equal("10"))
 
-                       g.Expect(Kamel(t, ctx, "delete", integrationName, "-n", 
ns).Execute()).To(Succeed())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
integrationName, "-n", ns))
                })
        }, "kafka")
 }
diff --git a/e2e/kafka/kafka_binding_test.go b/e2e/kafka/kafka_binding_test.go
index 75f200ed9..6f194463b 100644
--- a/e2e/kafka/kafka_binding_test.go
+++ b/e2e/kafka/kafka_binding_test.go
@@ -46,7 +46,7 @@ func TestKafka(t *testing.T) {
                        // Verify we are consuming some record (the body is 
null as the timer is pushing nothing)
                        g.Eventually(IntegrationLogs(t, ctx, kafkaNs, 
"kafka-to-log")).Should(ContainSubstring("Body is null"))
 
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
kafkaNs).Execute()).To(Succeed())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
"--all", "-n", kafkaNs))
                })
 
                t.Run("Strimzi KafkaTopic resource", func(t *testing.T) {
@@ -60,7 +60,7 @@ func TestKafka(t *testing.T) {
                        // Verify we are consuming some record (the body is 
null as the timer is pushing nothing)
                        g.Eventually(IntegrationLogs(t, ctx, kafkaNs, 
"kafkatopic-to-log")).Should(ContainSubstring("Body is null"))
 
-                       g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
kafkaNs).Execute()).To(Succeed())
+                       ExpectExecSucceed(t, g, Kubectl("delete", "it", 
"--all", "-n", kafkaNs))
                })
        }, "kafka")
 }
diff --git a/e2e/knative/knative_service_test.go 
b/e2e/knative/knative_service_test.go
index bc62d54ea..219e62f62 100644
--- a/e2e/knative/knative_service_test.go
+++ b/e2e/knative/knative_service_test.go
@@ -55,6 +55,6 @@ func TestKnativeServiceURL(t *testing.T) {
                        url := "http://knativeurl2."; + ns + ".svc.cluster.local"
                        g.Eventually(KnativeService(t, ctx, ns, 
"knativeurl2")().Status.RouteStatusFields.URL.String()).Should(Equal(url))
                })
-               g.Expect(Kamel(t, ctx, "delete", "--all", "-n", 
ns).Execute()).To(Succeed())
+               ExpectExecSucceed(t, g, Kubectl("delete", "it", "--all", "-n", 
ns))
        })
 }
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index 5635da546..d0e9f59ef 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -1186,7 +1186,7 @@ func DeleteIntegrations(t *testing.T, ctx 
context.Context, ns string) func() (in
                        return 0, nil
                }
 
-               if err := Kamel(t, ctx, "delete", "--all", "-n", ns).Execute(); 
err != nil {
+               if err := Kubectl("delete", "it", "--all", "-n", ns).Run(); err 
!= nil {
                        return 0, err
                }
 
diff --git a/pkg/cmd/delete.go b/pkg/cmd/delete.go
deleted file mode 100644
index 459c80ec7..000000000
--- a/pkg/cmd/delete.go
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package cmd
-
-import (
-       "context"
-       "errors"
-       "fmt"
-       "strconv"
-
-       v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
-
-       "github.com/apache/camel-k/v2/pkg/client"
-       "github.com/apache/camel-k/v2/pkg/util/kubernetes"
-       "github.com/spf13/cobra"
-       k8errors "k8s.io/apimachinery/pkg/api/errors"
-       k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
-)
-
-// newCmdDelete --.
-func newCmdDelete(rootCmdOptions *RootCmdOptions) (*cobra.Command, 
*deleteCmdOptions) {
-       options := deleteCmdOptions{
-               RootCmdOptions: rootCmdOptions,
-       }
-       cmd := cobra.Command{
-               Use:        "delete [integration1] [integration2] ...",
-               Short:      "Delete integrations deployed on Kubernetes",
-               Deprecated: "Warning: this command is deprecated and will be 
removed in the future. Use kubectl instead.",
-               PreRunE:    decode(&options, options.Flags),
-               RunE: func(cmd *cobra.Command, args []string) error {
-                       if err := options.validate(args); err != nil {
-                               return err
-                       }
-
-                       return options.run(cmd, args)
-               },
-       }
-
-       cmd.Flags().Bool("all", false, "Delete all integrations")
-
-       return &cmd, &options
-}
-
-type deleteCmdOptions struct {
-       *RootCmdOptions
-
-       DeleteAll bool `mapstructure:"all"`
-}
-
-func (command *deleteCmdOptions) validate(args []string) error {
-       if command.DeleteAll && len(args) > 0 {
-               return errors.New("invalid combination: --all flag is set and 
at least one integration name is provided")
-       }
-       if !command.DeleteAll && len(args) == 0 {
-               return errors.New("invalid combination: provide one or several 
integration names or set --all flag for all integrations")
-       }
-
-       return nil
-}
-
-func (command *deleteCmdOptions) run(cmd *cobra.Command, args []string) error {
-       c, err := command.GetCmdClient()
-       if err != nil {
-               return err
-       }
-       if len(args) != 0 && !command.DeleteAll {
-               for _, arg := range args {
-                       name := kubernetes.SanitizeName(arg)
-                       integration, err := getIntegration(command.Context, c, 
name, command.Namespace)
-                       if err != nil {
-                               if k8errors.IsNotFound(err) {
-                                       fmt.Fprintln(cmd.OutOrStdout(), 
"Integration "+name+" not found. Skipped.")
-                               } else {
-                                       return err
-                               }
-                       } else {
-                               err := deletePipeOrIntegration(command.Context, 
cmd, c, integration)
-                               if err != nil {
-                                       return err
-                               }
-                               fmt.Fprintln(cmd.OutOrStdout(), "Integration 
"+name+" deleted")
-                       }
-               }
-       } else if command.DeleteAll {
-               integrationList := v1.IntegrationList{
-                       APIVersion: v1.SchemeGroupVersion.String(),
-                       Kind:       v1.IntegrationKind,
-               }
-
-               err := c.List(command.Context, &integrationList, 
k8sclient.InNamespace(command.Namespace))
-               if err != nil {
-                       return err
-               }
-               for i := range integrationList.Items {
-                       integration := integrationList.Items[i]
-                       err := deletePipeOrIntegration(command.Context, cmd, c, 
&integration)
-                       if err != nil {
-                               return err
-                       }
-               }
-               if len(integrationList.Items) == 0 {
-                       fmt.Fprintln(cmd.OutOrStdout(), "Nothing to delete")
-               } else {
-                       fmt.Fprintln(cmd.OutOrStdout(), 
strconv.Itoa(len(integrationList.Items))+" integration(s) deleted")
-               }
-       }
-
-       return nil
-}
-
-func deletePipeOrIntegration(ctx context.Context, cmd *cobra.Command, c 
client.Client, integration *v1.Integration) error {
-       deletedPipes, pipe, err := deletePipeIfExists(ctx, c, integration)
-       if err != nil {
-               return err
-       }
-       if deletedPipes {
-               // Deleting Pipe will automatically clean up the integration
-               fmt.Fprintln(cmd.OutOrStdout(), "Pipe "+pipe+" deleted")
-
-               return nil
-       }
-
-       return c.Delete(ctx, integration)
-}
-
-func deletePipeIfExists(ctx context.Context, c client.Client, integration 
*v1.Integration) (bool, string, error) {
-       kind, name := findCreator(integration)
-       if kind != v1.PipeKind || name == "" {
-               return false, "", nil
-       }
-
-       binding := v1.Pipe{
-               Kind:       kind,
-               APIVersion: v1.SchemeGroupVersion.String(),
-               Namespace:  integration.Namespace,
-               Name:       name,
-       }
-       err := c.Delete(ctx, &binding)
-       if k8errors.IsNotFound(err) {
-               // Simply skip if binding doesn't exist (could be deleted 
already)
-               return false, name, nil
-       }
-
-       return err == nil, name, err
-}
-
-func findCreator(integration *v1.Integration) (string, string) {
-       kind := integration.GetLabels()[kubernetes.CamelCreatorLabelKind]
-       name := integration.GetLabels()[kubernetes.CamelCreatorLabelName]
-       if kind == "" && name == "" {
-               // Look up in OwnerReferences in case creator labels are absent
-               for _, owner := range integration.GetOwnerReferences() {
-                       if owner.Kind == v1.PipeKind {
-                               return owner.Kind, owner.Name
-                       }
-               }
-       }
-
-       return kind, name
-}
diff --git a/pkg/cmd/delete_test.go b/pkg/cmd/delete_test.go
deleted file mode 100644
index 0880d5f1f..000000000
--- a/pkg/cmd/delete_test.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package cmd
-
-import (
-       "testing"
-
-       "github.com/spf13/cobra"
-       "github.com/stretchr/testify/assert"
-       "github.com/stretchr/testify/require"
-)
-
-const cmdDelete = "delete"
-
-func initializeDeleteCmdOptions(t *testing.T) (*deleteCmdOptions, 
*cobra.Command, RootCmdOptions) {
-       t.Helper()
-
-       options, rootCmd := kamelTestPreAddCommandInit()
-       deleteCmdOptions := addTestDeleteCmd(*options, rootCmd)
-       kamelTestPostAddCommandInit(t, rootCmd, options)
-
-       return deleteCmdOptions, rootCmd, *options
-}
-
-func addTestDeleteCmd(options RootCmdOptions, rootCmd *cobra.Command) 
*deleteCmdOptions {
-       // add a testing version of delete Command
-       deleteCmd, deleteOptions := newCmdDelete(&options)
-       deleteCmd.RunE = func(c *cobra.Command, args []string) error {
-               return nil
-       }
-       deleteCmd.PostRunE = func(c *cobra.Command, args []string) error {
-               return nil
-       }
-       deleteCmd.Args = ArbitraryArgs
-       rootCmd.AddCommand(deleteCmd)
-       return deleteOptions
-}
-
-func TestDeleteNonExistingFlag(t *testing.T) {
-       _, rootCmd, _ := initializeDeleteCmdOptions(t)
-       _, err := ExecuteCommand(rootCmd, cmdDelete, "--nonExistingFlag")
-       require.Error(t, err)
-}
-
-func TestDeleteAllFlag(t *testing.T) {
-       deleteCmdOptions, rootCmd, _ := initializeDeleteCmdOptions(t)
-       _, err := ExecuteCommand(rootCmd, cmdDelete, "--all")
-       require.NoError(t, err)
-       assert.True(t, deleteCmdOptions.DeleteAll)
-}
diff --git a/pkg/cmd/get.go b/pkg/cmd/get.go
deleted file mode 100644
index 2632cf051..000000000
--- a/pkg/cmd/get.go
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package cmd
-
-import (
-       "fmt"
-       "text/tabwriter"
-
-       k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
-
-       "github.com/spf13/cobra"
-
-       v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
-)
-
-type getCmdOptions struct {
-       *RootCmdOptions
-}
-
-func newCmdGet(rootCmdOptions *RootCmdOptions) (*cobra.Command, 
*getCmdOptions) {
-       options := getCmdOptions{
-               RootCmdOptions: rootCmdOptions,
-       }
-       cmd := cobra.Command{
-               Use:        "get [integration]",
-               Short:      "Get integrations deployed on Kubernetes",
-               Long:       `Get the status of integrations deployed on 
Kubernetes.`,
-               Deprecated: "Warning: this command is deprecated and will be 
removed in the future. Use kubectl instead.",
-               PreRunE:    decode(&options, options.Flags),
-               RunE:       options.run,
-       }
-
-       return &cmd, &options
-}
-
-func (o *getCmdOptions) run(cmd *cobra.Command, args []string) error {
-       c, err := o.GetCmdClient()
-       if err != nil {
-               return err
-       }
-
-       integrationList := v1.IntegrationList{
-               APIVersion: v1.SchemeGroupVersion.String(),
-               Kind:       "Integration",
-       }
-
-       namespace := o.Namespace
-
-       options := []k8sclient.ListOption{
-               k8sclient.InNamespace(namespace),
-       }
-       if len(args) == 1 {
-               options = append(options, k8sclient.MatchingFields{
-                       "metadata.name": args[0],
-               })
-       }
-
-       err = c.List(o.Context, &integrationList, options...)
-       if err != nil {
-               return err
-       }
-
-       w := tabwriter.NewWriter(cmd.OutOrStdout(), 0, 8, 1, '\t', 0)
-       fmt.Fprintln(w, "NAME\tPHASE\tKIT")
-       for _, integration := range integrationList.Items {
-               kit := ""
-               if integration.Status.IntegrationKit != nil {
-                       ns := integration.GetIntegrationKitNamespace("")
-                       kit = fmt.Sprintf("%s/%s", ns, 
integration.Status.IntegrationKit.Name)
-               }
-               fmt.Fprintf(w, "%s\t%s\t%s\n", integration.Name, 
string(integration.Status.Phase), kit)
-       }
-
-       return w.Flush()
-}
diff --git a/pkg/cmd/kit.go b/pkg/cmd/kit.go
deleted file mode 100644
index 597eaa603..000000000
--- a/pkg/cmd/kit.go
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package cmd
-
-import (
-       "github.com/spf13/cobra"
-)
-
-func newCmdKit(rootCmdOptions *RootCmdOptions) *cobra.Command {
-       cmd := cobra.Command{
-               Use:        "kit",
-               Short:      "Configure an Integration Kit",
-               Long:       `Configure an Integration Kit.`,
-               Deprecated: "Warning: this command is deprecated and will be 
removed in the future",
-       }
-
-       cmd.AddCommand(cmdOnly(newKitCreateCmd(rootCmdOptions)))
-       cmd.AddCommand(cmdOnly(newKitDeleteCmd(rootCmdOptions)))
-       cmd.AddCommand(cmdOnly(newKitGetCmd(rootCmdOptions)))
-
-       return &cmd
-}
diff --git a/pkg/cmd/kit_create.go b/pkg/cmd/kit_create.go
deleted file mode 100644
index 6f890cf49..000000000
--- a/pkg/cmd/kit_create.go
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package cmd
-
-import (
-       "errors"
-       "fmt"
-       "strings"
-
-       "github.com/spf13/cobra"
-
-       k8serrors "k8s.io/apimachinery/pkg/api/errors"
-
-       ctrl "sigs.k8s.io/controller-runtime/pkg/client"
-
-       v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
-       "github.com/apache/camel-k/v2/pkg/trait"
-       "github.com/apache/camel-k/v2/pkg/util/kubernetes"
-)
-
-func newKitCreateCmd(rootCmdOptions *RootCmdOptions) (*cobra.Command, 
*kitCreateCommandOptions) {
-       options := kitCreateCommandOptions{
-               RootCmdOptions: rootCmdOptions,
-       }
-
-       cmd := cobra.Command{
-               Use:     "create <name>",
-               Short:   "Create an Integration Kit",
-               Long:    `Create an Integration Kit.`,
-               Args:    options.validateArgs,
-               PreRunE: decode(&options, options.Flags),
-               RunE:    options.run,
-       }
-
-       cmd.Flags().String("image", "", "Image used to create the kit")
-       cmd.Flags().StringArrayP("dependency", "d", nil, "Add a dependency")
-       cmd.Flags().StringArrayP("property", "p", nil, "Add a camel property")
-       cmd.Flags().StringArray("configmap", nil, "Add a ConfigMap")
-       cmd.Flags().StringArray("secret", nil, "Add a Secret")
-       cmd.Flags().StringArray("repository", nil, "Add a maven repository")
-       cmd.Flags().StringP("operator-id", "x", "camel-k", "Operator id 
selected to manage this kit")
-       cmd.Flags().StringArrayP("trait", "t", nil, "Configure a trait. E.g. 
\"-t service.enabled=false\"")
-
-       return &cmd, &options
-}
-
-type kitCreateCommandOptions struct {
-       *RootCmdOptions
-
-       Image        string   `mapstructure:"image"`
-       Dependencies []string `mapstructure:"dependencies"`
-       Properties   []string `mapstructure:"properties"`
-       Configmaps   []string `mapstructure:"configmaps"`
-       Secrets      []string `mapstructure:"secrets"`
-       Repositories []string `mapstructure:"repositories"`
-       OperatorID   string   `mapstructure:"operator-id"`
-       Traits       []string `mapstructure:"traits"`
-}
-
-func (command *kitCreateCommandOptions) validateArgs(_ *cobra.Command, args 
[]string) error {
-       if len(args) != 1 {
-               return errors.New("create expects a single name argument")
-       }
-
-       return nil
-}
-
-func (command *kitCreateCommandOptions) run(cmd *cobra.Command, args []string) 
error {
-       c, err := command.GetCmdClient()
-       if err != nil {
-               return err
-       }
-       catalog := trait.NewCatalog(c)
-       kit := v1.NewIntegrationKit(command.Namespace, args[0])
-       key := ctrl.ObjectKey{
-               Namespace: command.Namespace,
-               Name:      args[0],
-       }
-       if err := c.Get(command.Context, key, kit); err == nil {
-               // the integration kit already exists, let's check that it is
-               // not a platform one which is supposed to be "read only"
-
-               if kit.Labels[v1.IntegrationKitTypeLabel] == 
v1.IntegrationKitTypePlatform {
-                       fmt.Fprintln(cmd.OutOrStdout(), `integration kit 
"`+kit.Name+`" is not editable`)
-
-                       return nil
-               }
-       }
-
-       kit = v1.NewIntegrationKit(command.Namespace, 
kubernetes.SanitizeName(args[0]))
-
-       if command.OperatorID != "" {
-               // --operator-id={id} is a syntax sugar for '--annotation 
camel.apache.org/operator.id={id}'
-               kit.SetOperatorID(strings.TrimSpace(command.OperatorID))
-       }
-
-       kit.Labels = map[string]string{
-               v1.IntegrationKitTypeLabel: v1.IntegrationKitTypeUser,
-       }
-       kit.Spec = v1.IntegrationKitSpec{
-               Dependencies:  make([]string, 0, len(command.Dependencies)),
-               Configuration: make([]v1.ConfigurationSpec, 0),
-               Repositories:  command.Repositories,
-       }
-
-       if command.Image != "" {
-               // if the Image is set, the kit do not require any build but
-               // is be marked as external as the information about the 
classpath
-               // is missing so it cannot be used as base for other Kits
-               kit.Labels[v1.IntegrationKitTypeLabel] = 
v1.IntegrationKitTypeExternal
-
-               // Set the Image to be used by the kit
-               kit.Spec.Image = command.Image
-       }
-       for _, item := range command.Dependencies {
-               switch {
-               case strings.HasPrefix(item, "camel-quarkus-"):
-                       kit.Spec.Dependencies = append(kit.Spec.Dependencies, 
"camel:"+strings.TrimPrefix(item, "camel-quarkus-"))
-               case strings.HasPrefix(item, "camel-k-"):
-                       kit.Spec.Dependencies = append(kit.Spec.Dependencies, 
"camel-k:"+strings.TrimPrefix(item, "camel-k-"))
-               case strings.HasPrefix(item, "camel-"):
-                       kit.Spec.Dependencies = append(kit.Spec.Dependencies, 
"camel:"+strings.TrimPrefix(item, "camel-"))
-               default:
-                       kit.Spec.Dependencies = append(kit.Spec.Dependencies, 
item)
-               }
-       }
-
-       if err := command.parseAndConvertToTrait(command.Properties, 
"camel.properties"); err != nil {
-               return err
-       }
-
-       if err := command.parseAndConvertToTrait(command.Configmaps, 
"mount.config"); err != nil {
-               return err
-       }
-
-       if err := command.parseAndConvertToTrait(command.Secrets, 
"mount.config"); err != nil {
-               return err
-       }
-       if err := trait.ConfigureTraits(command.Traits, &kit.Spec.Traits, 
catalog); err != nil {
-               return err
-       }
-       existed := false
-       err = c.Create(command.Context, kit)
-       if err != nil && k8serrors.IsAlreadyExists(err) {
-               existed = true
-               existing := v1.NewIntegrationKit(kit.Namespace, kit.Name)
-               err = c.Get(command.Context, key, existing)
-               if err != nil {
-                       fmt.Fprint(cmd.ErrOrStderr(), err.Error())
-
-                       return nil
-               }
-               kit.ResourceVersion = existing.ResourceVersion
-               err = c.Update(command.Context, kit)
-       }
-
-       if err != nil {
-               fmt.Fprint(cmd.ErrOrStderr(), err.Error())
-
-               return nil
-       }
-
-       if !existed {
-               fmt.Fprintln(cmd.OutOrStdout(), `integration kit "`+kit.Name+`" 
created`)
-       } else {
-               fmt.Fprintln(cmd.OutOrStdout(), `integration kit "`+kit.Name+`" 
updated`)
-       }
-
-       return nil
-}
-
-func (command *kitCreateCommandOptions) parseAndConvertToTrait(params 
[]string, traitParam string) error {
-       for _, param := range params {
-               command.Traits = append(command.Traits, convertToTrait(param, 
traitParam))
-       }
-
-       return nil
-}
diff --git a/pkg/cmd/kit_create_test.go b/pkg/cmd/kit_create_test.go
deleted file mode 100644
index a9921ffae..000000000
--- a/pkg/cmd/kit_create_test.go
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package cmd
-
-import (
-       "testing"
-
-       "github.com/spf13/cobra"
-       "github.com/stretchr/testify/assert"
-       "github.com/stretchr/testify/require"
-)
-
-const subCmdKit = "create"
-
-func initializeKitCreateCmdOptions(t *testing.T) (*kitCreateCommandOptions, 
*cobra.Command, RootCmdOptions) {
-       t.Helper()
-
-       options, rootCmd := kamelTestPreAddCommandInit()
-       kitCreateCmdOptions := addTestKitCreateCmd(*options, rootCmd)
-       kamelTestPostAddCommandInit(t, rootCmd, options)
-
-       return kitCreateCmdOptions, rootCmd, *options
-}
-
-func addTestKitCreateCmd(options RootCmdOptions, rootCmd *cobra.Command) 
*kitCreateCommandOptions {
-       // add a testing version of kit create Command
-       kitCreateCmd, kitCreateOptions := newKitCreateCmd(&options)
-       kitCreateCmd.RunE = func(c *cobra.Command, args []string) error {
-               return nil
-       }
-       kitCreateCmd.PostRunE = func(c *cobra.Command, args []string) error {
-               return nil
-       }
-       kitCreateCmd.Args = ArbitraryArgs
-       rootCmd.AddCommand(kitCreateCmd)
-       return kitCreateOptions
-}
-
-func TestKitCreateNonExistingFlag(t *testing.T) {
-       _, rootCmd, _ := initializeKitCreateCmdOptions(t)
-       _, err := ExecuteCommand(rootCmd, subCmdKit, "--nonExistingFlag")
-       require.Error(t, err)
-}
-
-func TestKitCreateConfigMapFlag(t *testing.T) {
-       kitCreateCmdOptions, rootCmd, _ := initializeKitCreateCmdOptions(t)
-       _, err := ExecuteCommand(rootCmd, subCmdKit,
-               "--configmap", "someString1",
-               "--configmap", "someString2")
-       require.NoError(t, err)
-       assert.Len(t, kitCreateCmdOptions.Configmaps, 2)
-       assert.Equal(t, "someString1", kitCreateCmdOptions.Configmaps[0])
-       assert.Equal(t, "someString2", kitCreateCmdOptions.Configmaps[1])
-}
-
-func TestKitCreateDependencyFlag(t *testing.T) {
-       kitCreateCmdOptions, rootCmd, _ := initializeKitCreateCmdOptions(t)
-       _, err := ExecuteCommand(rootCmd, subCmdKit,
-               "--dependency", "someString1",
-               "--dependency", "someString2")
-       require.NoError(t, err)
-       assert.Len(t, kitCreateCmdOptions.Dependencies, 2)
-       assert.Equal(t, "someString1", kitCreateCmdOptions.Dependencies[0])
-       assert.Equal(t, "someString2", kitCreateCmdOptions.Dependencies[1])
-}
-
-func TestKitCreateImageFlag(t *testing.T) {
-       kitCreateCmdOptions, rootCmd, _ := initializeKitCreateCmdOptions(t)
-       _, err := ExecuteCommand(rootCmd, subCmdKit, "--image", "someString")
-       require.NoError(t, err)
-       assert.Equal(t, "someString", kitCreateCmdOptions.Image)
-}
-
-func TestKitCreatePropertyFlag(t *testing.T) {
-       kitCreateCmdOptions, rootCmd, _ := initializeKitCreateCmdOptions(t)
-       _, err := ExecuteCommand(rootCmd, subCmdKit,
-               "--property", "someString1",
-               "--property", "someString2")
-       require.NoError(t, err)
-       assert.Len(t, kitCreateCmdOptions.Properties, 2)
-       assert.Equal(t, "someString1", kitCreateCmdOptions.Properties[0])
-       assert.Equal(t, "someString2", kitCreateCmdOptions.Properties[1])
-}
-
-func TestKitCreateRepositoryFlag(t *testing.T) {
-       kitCreateCmdOptions, rootCmd, _ := initializeKitCreateCmdOptions(t)
-       _, err := ExecuteCommand(rootCmd, subCmdKit,
-               "--repository", "someString1",
-               "--repository", "someString2")
-       require.NoError(t, err)
-       assert.Len(t, kitCreateCmdOptions.Repositories, 2)
-       assert.Equal(t, "someString1", kitCreateCmdOptions.Repositories[0])
-       assert.Equal(t, "someString2", kitCreateCmdOptions.Repositories[1])
-}
-
-func TestKitCreateSecretFlag(t *testing.T) {
-       kitCreateCmdOptions, rootCmd, _ := initializeKitCreateCmdOptions(t)
-       _, err := ExecuteCommand(rootCmd, subCmdKit,
-               "--secret", "someString1",
-               "--secret", "someString2")
-       require.NoError(t, err)
-       assert.Len(t, kitCreateCmdOptions.Secrets, 2)
-       assert.Equal(t, "someString1", kitCreateCmdOptions.Secrets[0])
-       assert.Equal(t, "someString2", kitCreateCmdOptions.Secrets[1])
-}
-
-func TestKitCreateTraitFlag(t *testing.T) {
-       kitCreateCmdOptions, rootCmd, _ := initializeKitCreateCmdOptions(t)
-       _, err := ExecuteCommand(rootCmd, subCmdKit,
-               "--trait", "someString1",
-               "--trait", "someString2")
-       require.NoError(t, err)
-       assert.Len(t, kitCreateCmdOptions.Traits, 2)
-       assert.Equal(t, "someString1", kitCreateCmdOptions.Traits[0])
-       assert.Equal(t, "someString2", kitCreateCmdOptions.Traits[1])
-}
diff --git a/pkg/cmd/kit_delete.go b/pkg/cmd/kit_delete.go
deleted file mode 100644
index cc6e46da2..000000000
--- a/pkg/cmd/kit_delete.go
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package cmd
-
-import (
-       "errors"
-       "fmt"
-
-       "github.com/spf13/cobra"
-
-       k8errors "k8s.io/apimachinery/pkg/api/errors"
-
-       ctrl "sigs.k8s.io/controller-runtime/pkg/client"
-
-       v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
-)
-
-func newKitDeleteCmd(rootCmdOptions *RootCmdOptions) (*cobra.Command, 
*kitDeleteCommandOptions) {
-       options := kitDeleteCommandOptions{
-               RootCmdOptions: rootCmdOptions,
-       }
-
-       cmd := cobra.Command{
-               Use:     "delete [integration kit1] [integration kit2] ...",
-               Short:   "Delete integration kits deployed on Kubernetes",
-               PreRunE: decode(&options, options.Flags),
-               RunE: func(cmd *cobra.Command, args []string) error {
-                       if err := options.validate(args); err != nil {
-                               return err
-                       }
-
-                       return options.run(cmd, args)
-               },
-       }
-
-       cmd.Flags().Bool("all", false, "Delete all integration Kits")
-
-       return &cmd, &options
-}
-
-type kitDeleteCommandOptions struct {
-       *RootCmdOptions
-
-       All bool `mapstructure:"all"`
-}
-
-func (command *kitDeleteCommandOptions) validate(args []string) error {
-       if command.All && len(args) > 0 {
-               return errors.New("invalid combination: --all flag is set and 
at least one integration kit name is provided")
-       }
-       if !command.All && len(args) == 0 {
-               return errors.New("invalid combination: provide one or several 
integration kit names or set --all flag for all integration kits")
-       }
-
-       return nil
-}
-
-func (command *kitDeleteCommandOptions) run(cmd *cobra.Command, args []string) 
error {
-       names := args
-
-       c, err := command.GetCmdClient()
-       if err != nil {
-               return err
-       }
-
-       if command.All {
-               kitList := v1.NewIntegrationKitList()
-               if err := c.List(command.Context, &kitList, 
ctrl.InNamespace(command.Namespace)); err != nil {
-                       return err
-               }
-
-               names = make([]string, 0, len(kitList.Items))
-               for _, item := range kitList.Items {
-                       // only include non platform Kits
-                       if item.Labels[v1.IntegrationKitTypeLabel] != 
v1.IntegrationKitTypePlatform {
-                               names = append(names, item.Name)
-                       }
-               }
-       }
-
-       for _, name := range names {
-               if err := command.delete(cmd, name); err != nil {
-                       return err
-               }
-       }
-
-       return nil
-}
-
-func (command *kitDeleteCommandOptions) delete(cmd *cobra.Command, name 
string) error {
-       kit := v1.NewIntegrationKit(command.Namespace, name)
-       c, err := command.GetCmdClient()
-       if err != nil {
-               return err
-       }
-
-       err = c.Get(command.Context, ctrl.ObjectKeyFromObject(kit), kit)
-
-       // pass through if the kit is not found
-       if err != nil && k8errors.IsNotFound(err) {
-               return fmt.Errorf("no integration kit found with name \"%s\"", 
kit.Name)
-       }
-
-       // fail otherwise
-       if err != nil {
-               return err
-       }
-
-       // check that it is not a platform one which is supposed to be "read 
only"
-       // thus not managed by the end user
-       if kit.Labels[v1.IntegrationKitTypeLabel] == 
v1.IntegrationKitTypePlatform {
-               // skip platform Kits while deleting all Kits
-               if command.All {
-                       return nil
-               }
-
-               return fmt.Errorf("integration kit \"%s\" is not editable", 
kit.Name)
-       }
-
-       err = c.Delete(command.Context, kit)
-
-       if err != nil && !k8errors.IsNotFound(err) {
-               return fmt.Errorf("error deleting integration kit \"%s\": %w", 
kit.Name, err)
-       }
-       if err != nil && k8errors.IsNotFound(err) {
-               return fmt.Errorf("no integration kit found with name \"%s\"", 
kit.Name)
-       }
-
-       fmt.Fprintln(cmd.OutOrStdout(), `integration kit "`+kit.Name+`" has 
been deleted`)
-
-       return err
-}
diff --git a/pkg/cmd/kit_get.go b/pkg/cmd/kit_get.go
deleted file mode 100644
index 7cdc50cd8..000000000
--- a/pkg/cmd/kit_get.go
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package cmd
-
-import (
-       "fmt"
-       "text/tabwriter"
-
-       "github.com/spf13/cobra"
-
-       k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
-
-       v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
-)
-
-func newKitGetCmd(rootCmdOptions *RootCmdOptions) (*cobra.Command, 
*kitGetCommandOptions) {
-       options := kitGetCommandOptions{
-               RootCmdOptions: rootCmdOptions,
-       }
-
-       cmd := cobra.Command{
-               Use:     "get",
-               Short:   "Get defined Integration Kit",
-               Long:    `Get defined Integration Kit.`,
-               PreRunE: decode(&options, options.Flags),
-               RunE: func(cmd *cobra.Command, args []string) error {
-                       if err := options.validate(cmd, args); err != nil {
-                               return err
-                       }
-
-                       return options.run(cmd)
-               },
-       }
-
-       cmd.Flags().Bool(v1.IntegrationKitTypeUser, true, "Includes user Kits")
-       cmd.Flags().Bool(v1.IntegrationKitTypeExternal, true, "Includes 
external Kits")
-       cmd.Flags().Bool(v1.IntegrationKitTypePlatform, true, "Includes 
platform Kits")
-
-       return &cmd, &options
-}
-
-type kitGetCommandOptions struct {
-       *RootCmdOptions
-
-       User     bool `mapstructure:"user"`
-       External bool `mapstructure:"external"`
-       Platform bool `mapstructure:"platform"`
-}
-
-func (command *kitGetCommandOptions) validate(cmd *cobra.Command, args 
[]string) error {
-       return nil
-}
-
-func (command *kitGetCommandOptions) run(cmd *cobra.Command) error {
-       kitList := v1.NewIntegrationKitList()
-       c, err := command.GetCmdClient()
-       if err != nil {
-               return err
-       }
-       if err := c.List(command.Context, &kitList, 
k8sclient.InNamespace(command.Namespace)); err != nil {
-               return err
-       }
-
-       w := tabwriter.NewWriter(cmd.OutOrStdout(), 0, 8, 1, '\t', 0)
-       fmt.Fprintln(w, "NAME\tPHASE\tTYPE\tIMAGE")
-       for _, ctx := range kitList.Items {
-               t := ctx.Labels[v1.IntegrationKitTypeLabel]
-               u := command.User && t == v1.IntegrationKitTypeUser
-               e := command.External && t == v1.IntegrationKitTypeExternal
-               p := command.Platform && t == v1.IntegrationKitTypePlatform
-
-               if u || e || p {
-                       fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", ctx.Name, 
string(ctx.Status.Phase), t, ctx.Status.Image)
-               }
-       }
-
-       return w.Flush()
-}
diff --git a/pkg/cmd/kit_test.go b/pkg/cmd/kit_test.go
deleted file mode 100644
index 0f61fb0b0..000000000
--- a/pkg/cmd/kit_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package cmd
-
-import (
-       "github.com/spf13/cobra"
-)
-
-//nolint:deadcode,unused
-func newTestCmdKit(options *RootCmdOptions) *cobra.Command {
-       // add a testing version of kit Command
-       kitCmd := newCmdKit(options)
-       kitCmd.ResetCommands()
-
-       return kitCmd
-}
diff --git a/pkg/cmd/root.go b/pkg/cmd/root.go
index 6151f5404..24cffb176 100644
--- a/pkg/cmd/root.go
+++ b/pkg/cmd/root.go
@@ -133,10 +133,7 @@ func addKamelSubcommands(cmd *cobra.Command, options 
*RootCmdOptions) {
        cmd.AddCommand(cmdOnly(newCmdVersion(options)))
        cmd.AddCommand(cmdOnly(newCmdRun(options)))
        cmd.AddCommand(cmdOnly(newCmdDeploy(options)))
-       cmd.AddCommand(cmdOnly(newCmdGet(options)))
-       cmd.AddCommand(cmdOnly(newCmdDelete(options)))
        cmd.AddCommand(cmdOnly(newCmdLog(options)))
-       cmd.AddCommand(newCmdKit(options))
        cmd.AddCommand(cmdOnly(newCmdReset(options)))
        cmd.AddCommand(cmdOnly(newCmdRebuild(options)))
        cmd.AddCommand(cmdOnly(newCmdOperator(options)))
diff --git a/pkg/cmd/root_test.go b/pkg/cmd/root_test.go
index 574d39b05..8e8305a55 100644
--- a/pkg/cmd/root_test.go
+++ b/pkg/cmd/root_test.go
@@ -52,6 +52,17 @@ func kamelTestPreAddCommandInit() (*RootCmdOptions, 
*cobra.Command) {
        return kamelTestPreAddCommandInitWithClient(fakeClient)
 }
 
+func TestDeprecatedCommandsAreNotRegistered(t *testing.T) {
+       command, err := NewKamelCommand(context.Background())
+       require.NoError(t, err)
+
+       for _, name := range []string{"delete", "get", "kit"} {
+               found, _, err := command.Find([]string{name})
+               require.Error(t, err)
+               require.Same(t, command, found)
+       }
+}
+
 func TestLoadFromEnvVar(t *testing.T) {
        // shows how to include a "," character inside an env value see VAR1 
value
        require.NoError(t, os.Setenv("KAMEL_RUN_ENVS", 
"\"VAR1=value,\"\"othervalue\"\"\",VAR2=value2"))

Reply via email to