You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/05/10 10:19:07 UTC

[camel-k] branch main updated (2de2c7a42 -> 67f867144)

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

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


    from 2de2c7a42 chore: ignore resources.go
     new e60235836 feat: remove deprecated code
     new 45d8bbd7b chore: remove file references
     new 992d77142 chore: update documentation
     new e04fbbb2e chore: fix test after deprecation
     new 67f867144 chore: bind with operator id

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 config/crd/bases/camel.apache.org_pipes.yaml       | 512 -------------------
 docs/modules/ROOT/pages/cli/cli.adoc               |   4 -
 .../ROOT/pages/configuration/runtime-config.adoc   |  28 --
 .../pages/configuration/runtime-resources.adoc     |  27 +-
 docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc |   8 +-
 docs/modules/ROOT/partials/apis/camel-k-crds.adoc  |  55 --
 e2e/common/cli/dev_mode_test.go                    |  53 --
 e2e/common/config/config_test.go                   |  68 ---
 e2e/common/languages/groovy_test.go                |   4 -
 e2e/common/languages/init_test_support.go          |  57 ---
 e2e/common/languages/java_test.go                  |  11 -
 e2e/common/languages/js_test.go                    |   4 -
 e2e/common/languages/kotlin_test.go                |   4 -
 e2e/common/languages/xml_test.go                   |   4 -
 e2e/common/languages/yaml_test.go                  |   4 -
 e2e/common/misc/kamelet_test.go                    |  77 ++-
 .../misc/{kamelet_binding_test.go => pipe_test.go} |  75 +--
 ..._with_image_test.go => pipe_with_image_test.go} |  60 +--
 e2e/common/traits/health_test.go                   |  50 +-
 e2e/common/traits/openapi_test.go                  |  24 -
 e2e/knative/kamelet_test.go                        |  47 +-
 e2e/knative/openapi_test.go                        |  10 +-
 e2e/native/native_binding_test.go                  |  21 +-
 e2e/support/test_support.go                        |  62 ---
 helm/camel-k/crds/crd-pipe.yaml                    | 512 -------------------
 pkg/apis/camel/v1/common_types.go                  |  23 -
 pkg/apis/camel/v1/integration_types_support.go     |  10 -
 pkg/apis/camel/v1/pipe_types.go                    |   3 -
 pkg/apis/camel/v1/zz_generated.deepcopy.go         |  23 -
 .../camel/applyconfiguration/camel/v1/endpoint.go  |  15 -
 pkg/cmd/init.go                                    | 124 -----
 pkg/cmd/install.go                                 |  31 +-
 pkg/cmd/install_test.go                            |   8 -
 pkg/cmd/local.go                                   |  96 ----
 pkg/cmd/local/container.go                         | 347 -------------
 pkg/cmd/local/local.go                             | 556 ---------------------
 pkg/cmd/local/local_test.go                        |  67 ---
 pkg/cmd/local/workdir.go                           | 244 ---------
 pkg/cmd/local_build.go                             | 269 ----------
 pkg/cmd/local_build_test.go                        |  73 ---
 pkg/cmd/local_inspect.go                           | 109 ----
 pkg/cmd/local_inspect_test.go                      |  73 ---
 pkg/cmd/local_run.go                               | 283 -----------
 pkg/cmd/local_run_test.go                          | 109 ----
 pkg/cmd/modeline_test.go                           | 105 ----
 pkg/cmd/promote_test.go                            |  14 +-
 pkg/cmd/root.go                                    |   2 -
 pkg/cmd/run.go                                     |  18 +-
 pkg/cmd/run_support.go                             | 123 +++--
 pkg/cmd/run_support_test.go                        |  46 --
 pkg/cmd/run_test.go                                |   6 +-
 pkg/resources/resources.go                         |  25 +-
 pkg/trait/openapi.go                               |   2 +-
 pkg/trait/service_test.go                          |   5 +-
 pkg/trait/trait_configure_test.go                  |   4 +-
 pkg/util/kubernetes/resolver.go                    |  13 -
 pkg/util/log/log.go                                |   2 +-
 pkg/util/resource/config.go                        |  21 +-
 pkg/util/resource/config_test.go                   |  35 --
 59 files changed, 308 insertions(+), 4357 deletions(-)
 delete mode 100644 e2e/common/languages/init_test_support.go
 rename e2e/common/misc/{kamelet_binding_test.go => pipe_test.go} (71%)
 rename e2e/common/misc/{kamelet_binding_with_image_test.go => pipe_with_image_test.go} (65%)
 delete mode 100644 pkg/cmd/init.go
 delete mode 100644 pkg/cmd/local.go
 delete mode 100644 pkg/cmd/local/container.go
 delete mode 100644 pkg/cmd/local/local.go
 delete mode 100644 pkg/cmd/local/local_test.go
 delete mode 100644 pkg/cmd/local/workdir.go
 delete mode 100644 pkg/cmd/local_build.go
 delete mode 100644 pkg/cmd/local_build_test.go
 delete mode 100644 pkg/cmd/local_inspect.go
 delete mode 100644 pkg/cmd/local_inspect_test.go
 delete mode 100644 pkg/cmd/local_run.go
 delete mode 100644 pkg/cmd/local_run_test.go


[camel-k] 02/05: chore: remove file references

Posted by pc...@apache.org.
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 45d8bbd7b85a310eb97bbc6a991a788f16585f43
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu May 4 10:47:04 2023 +0200

    chore: remove file references
---
 e2e/common/cli/dev_mode_test.go                    | 53 ---------------
 e2e/common/config/config_test.go                   | 68 -------------------
 e2e/common/languages/groovy_test.go                |  4 --
 e2e/common/languages/init_test_support.go          | 57 ----------------
 e2e/common/languages/java_test.go                  | 11 ----
 e2e/common/languages/js_test.go                    |  4 --
 e2e/common/languages/kotlin_test.go                |  4 --
 e2e/common/languages/xml_test.go                   |  4 --
 e2e/common/languages/yaml_test.go                  |  4 --
 e2e/common/misc/kamelet_test.go                    | 77 +++++++++++++++++++++-
 .../misc/{kamelet_binding_test.go => pipe_test.go} |  0
 ..._with_image_test.go => pipe_with_image_test.go} |  0
 e2e/common/traits/health_test.go                   | 12 ++--
 e2e/common/traits/openapi_test.go                  | 24 -------
 e2e/knative/openapi_test.go                        | 10 ++-
 pkg/cmd/install.go                                 |  5 +-
 pkg/cmd/modeline_test.go                           | 62 -----------------
 pkg/cmd/run.go                                     | 12 ++--
 pkg/cmd/run_support.go                             |  2 +-
 pkg/cmd/run_test.go                                |  6 +-
 20 files changed, 100 insertions(+), 319 deletions(-)

diff --git a/e2e/common/cli/dev_mode_test.go b/e2e/common/cli/dev_mode_test.go
index 05596e16e..cc6518769 100644
--- a/e2e/common/cli/dev_mode_test.go
+++ b/e2e/common/cli/dev_mode_test.go
@@ -24,16 +24,12 @@ package cli
 
 import (
 	"context"
-	"fmt"
 	"io"
-	"io/ioutil"
 	"os"
-	"path/filepath"
 	"testing"
 	"time"
 
 	. "github.com/onsi/gomega"
-	"github.com/stretchr/testify/assert"
 	corev1 "k8s.io/api/core/v1"
 
 	. "github.com/apache/camel-k/v2/e2e/support"
@@ -117,55 +113,6 @@ func TestRunDevMode(t *testing.T) {
 		Eventually(logScanner.IsFound("Magicstring!"), TestTimeoutMedium).Should(BeTrue())
 	})
 
-	t.Run("Dev mode resource file generated configmap", func(t *testing.T) {
-		var tmpFile *os.File
-		var err error
-		if tmpFile, err = ioutil.TempFile("", "camel-k-"); err != nil {
-			t.Error(err)
-		}
-		assert.Nil(t, tmpFile.Close())
-		assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte("Hello from test!"), 0o644))
-
-		RegisterTestingT(t)
-		ctx, cancel := context.WithCancel(TestContext)
-		defer cancel()
-		piper, pipew := io.Pipe()
-		defer pipew.Close()
-		defer piper.Close()
-
-		file := util.MakeTempCopy(t, "files/resource-file-location-route.groovy")
-
-		kamelRun := KamelRunWithContext(ctx, operatorID, ns, file, "--dev", "--resource", fmt.Sprintf("file:%s@/tmp/file.txt", filepath.ToSlash(tmpFile.Name())))
-		kamelRun.SetOut(pipew)
-
-		logScanner := util.NewLogScanner(ctx, piper, `integration "resource-file-location-route" in phase Running`,
-			"Hello from test!", "Goodbye from test!")
-
-		args := os.Args
-		defer func() { os.Args = args }()
-
-		globalTest := os.Getenv("CAMEL_K_FORCE_GLOBAL_TEST") == "true"
-		if globalTest {
-			os.Args = []string{"kamel", "run", "-n", ns, file, "--dev", "--resource", fmt.Sprintf("file:%s@/tmp/file.txt", tmpFile.Name())}
-		} else {
-			os.Args = []string{"kamel", "run", "-n", ns, "--operator-id", operatorID, file, "--dev", "--resource", fmt.Sprintf("file:%s@/tmp/file.txt", filepath.ToSlash(tmpFile.Name()))}
-		}
-
-		go kamelRun.Execute()
-
-		Eventually(logScanner.IsFound(`integration "resource-file-location-route" in phase Running`), TestTimeoutMedium).Should(BeTrue())
-		Eventually(logScanner.IsFound("Hello from test!"), TestTimeoutMedium).Should(BeTrue())
-		Expect(logScanner.IsFound("Goodbye from test!")()).To(BeFalse())
-
-		// cool, now let's change the file to confirm the sync take place
-		assert.Nil(t, ioutil.WriteFile(tmpFile.Name(), []byte("Goodbye from test!"), 0o644))
-		Eventually(logScanner.IsFound("Goodbye from test!"), TestTimeoutMedium).Should(BeTrue())
-
-		Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
-		// When the integration is deleted, then, also the autogenerated configmaps must be cleaned
-		Eventually(AutogeneratedConfigmapsCount(ns), TestTimeoutShort).Should(Equal(0))
-	})
-
 	// This test makes sure that `kamel run --dev` runs in seconds after initial build is
 	// already done for the same integration.
 	t.Run("dev mode rebuild in seconds", func(t *testing.T) {
diff --git a/e2e/common/config/config_test.go b/e2e/common/config/config_test.go
index f3362b343..73ccd0006 100644
--- a/e2e/common/config/config_test.go
+++ b/e2e/common/config/config_test.go
@@ -23,17 +23,14 @@ limitations under the License.
 package config
 
 import (
-	"io/ioutil"
 	"testing"
 
 	. "github.com/onsi/gomega"
-	"github.com/stretchr/testify/assert"
 
 	corev1 "k8s.io/api/core/v1"
 
 	. "github.com/apache/camel-k/v2/e2e/support"
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
-	"github.com/apache/camel-k/v2/pkg/util/gzip"
 )
 
 func TestRunConfigExamples(t *testing.T) {
@@ -192,17 +189,6 @@ func TestRunConfigExamples(t *testing.T) {
 		Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
 	})
 
-	// Config File
-
-	t.Run("Plain text configuration file", func(t *testing.T) {
-		Expect(KamelRunWithID(operatorID, ns, "./files/config-file-route.groovy", "--config", "file:./files/resources-data.txt").Execute()).To(Succeed())
-		Eventually(IntegrationPodPhase(ns, "config-file-route"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
-		Eventually(IntegrationConditionStatus(ns, "config-file-route", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-		Eventually(IntegrationLogs(ns, "config-file-route"), TestTimeoutShort).Should(ContainSubstring("the file body"))
-		Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
-		Eventually(AutogeneratedConfigmapsCount(ns), TestTimeoutShort).Should(Equal(0))
-	})
-
 	t.Run("Secret with filtered key", func(t *testing.T) {
 		Expect(KamelRunWithID(operatorID, ns, "./files/config-secret-key-route.groovy", "--config", "secret:my-sec-multi/my-secret-key-2").Execute()).To(Succeed())
 		Eventually(IntegrationPodPhase(ns, "config-secret-key-route"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
@@ -212,60 +198,6 @@ func TestRunConfigExamples(t *testing.T) {
 		Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
 	})
 
-	// Resource File
-
-	t.Run("Plain text resource file", func(t *testing.T) {
-		Expect(KamelRunWithID(operatorID, ns, "./files/resource-file-route.groovy", "--resource", "file:./files/resources-data.txt").Execute()).To(Succeed())
-		Eventually(IntegrationPodPhase(ns, "resource-file-route"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
-		Eventually(IntegrationConditionStatus(ns, "resource-file-route", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-		Eventually(IntegrationLogs(ns, "resource-file-route"), TestTimeoutShort).Should(ContainSubstring("the file body"))
-		Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
-		Eventually(AutogeneratedConfigmapsCount(ns), TestTimeoutShort).Should(Equal(0))
-	})
-
-	t.Run("Plain text resource file with destination path", func(t *testing.T) {
-		Expect(KamelRunWithID(operatorID, ns, "./files/resource-file-location-route.groovy", "--resource", "file:./files/resources-data.txt@/tmp/file.txt").Execute()).To(Succeed())
-		Eventually(IntegrationPodPhase(ns, "resource-file-location-route"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
-		Eventually(IntegrationConditionStatus(ns, "resource-file-location-route", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-		Eventually(IntegrationLogs(ns, "resource-file-location-route"), TestTimeoutShort).Should(ContainSubstring("the file body"))
-		Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
-		Eventually(AutogeneratedConfigmapsCount(ns), TestTimeoutShort).Should(Equal(0))
-	})
-
-	t.Run("Binary (zip) resource file", func(t *testing.T) {
-		Expect(KamelRunWithID(operatorID, ns, "./files/resource-file-binary-route.groovy", "--resource", "file:./files/resources-data.zip", "-d", "camel:zipfile").Execute()).To(Succeed())
-		Eventually(IntegrationPodPhase(ns, "resource-file-binary-route"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
-		Eventually(IntegrationConditionStatus(ns, "resource-file-binary-route", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-		Eventually(IntegrationLogs(ns, "resource-file-binary-route"), TestTimeoutShort).Should(ContainSubstring("the file body"))
-		Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
-		Eventually(AutogeneratedConfigmapsCount(ns), TestTimeoutShort).Should(Equal(0))
-	})
-
-	t.Run("Base64 compressed binary resource file", func(t *testing.T) {
-		// We calculate the expected content
-		source, err := ioutil.ReadFile("./files/resources-data.txt")
-		assert.Nil(t, err)
-		expectedBytes, err := gzip.CompressBase64([]byte(source))
-		assert.Nil(t, err)
-
-		Expect(KamelRunWithID(operatorID, ns, "./files/resource-file-base64-encoded-route.groovy", "--resource", "file:./files/resources-data.txt", "--compression=true").Execute()).To(Succeed())
-		Eventually(IntegrationPodPhase(ns, "resource-file-base64-encoded-route"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
-		Eventually(IntegrationConditionStatus(ns, "resource-file-base64-encoded-route", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-		Eventually(IntegrationLogs(ns, "resource-file-base64-encoded-route"), TestTimeoutShort).Should(ContainSubstring(string(expectedBytes)))
-		Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
-		Eventually(AutogeneratedConfigmapsCount(ns), TestTimeoutShort).Should(Equal(0))
-	})
-
-	t.Run("Plain text resource file with same content", func(t *testing.T) {
-		Expect(KamelRunWithID(operatorID, ns, "./files/resource-file-route.groovy", "--resource", "file:./files/resources-data.txt",
-			"--resource", "file:./files/resources-data-same.txt").Execute()).To(Succeed())
-		Eventually(IntegrationPodPhase(ns, "resource-file-route"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
-		Eventually(IntegrationConditionStatus(ns, "resource-file-route", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-		Eventually(IntegrationLogs(ns, "resource-file-route"), TestTimeoutShort).Should(ContainSubstring("the file body"))
-		Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
-		Eventually(AutogeneratedConfigmapsCount(ns), TestTimeoutShort).Should(Equal(0))
-	})
-
 	// Build-Properties
 	t.Run("Build time property", func(t *testing.T) {
 		Expect(KamelRunWithID(operatorID, ns, "./files/build-property-route.groovy", "--build-property", "quarkus.application.name=my-super-application").Execute()).To(Succeed())
diff --git a/e2e/common/languages/groovy_test.go b/e2e/common/languages/groovy_test.go
index 8e76130ec..253081bef 100644
--- a/e2e/common/languages/groovy_test.go
+++ b/e2e/common/languages/groovy_test.go
@@ -43,9 +43,5 @@ func TestRunSimpleGroovyExamples(t *testing.T) {
 		Eventually(IntegrationLogs(ns, "groovy"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
 	})
 
-	t.Run("init run groovy", func(t *testing.T) {
-		RunInitGeneratedExample(t, operatorID, ns, camelv1.LanguageGroovy)
-	})
-
 	Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
 }
diff --git a/e2e/common/languages/init_test_support.go b/e2e/common/languages/init_test_support.go
deleted file mode 100644
index c33042bcf..000000000
--- a/e2e/common/languages/init_test_support.go
+++ /dev/null
@@ -1,57 +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 languages
-
-import (
-	"fmt"
-	"path"
-	"testing"
-
-	. "github.com/onsi/gomega"
-
-	v1 "k8s.io/api/core/v1"
-
-	. "github.com/apache/camel-k/v2/e2e/support"
-	"github.com/apache/camel-k/v2/e2e/support/util"
-	camelv1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
-)
-
-func RunInitGeneratedExample(t *testing.T, operatorId, ns string, lang camelv1.Language) {
-	dir := util.MakeTempDir(t)
-	itName := fmt.Sprintf("init%s", string(lang))          // e.g. initjava
-	fileName := fmt.Sprintf("%s.%s", itName, string(lang)) // e.g. initjava.java
-	file := path.Join(dir, fileName)
-	Expect(Kamel("init", file).Execute()).To(Succeed())
-	Expect(KamelRunWithID(operatorId, ns, file).Execute()).To(Succeed())
-	Eventually(IntegrationPodPhase(ns, itName), TestTimeoutLong).Should(Equal(v1.PodRunning))
-	Eventually(IntegrationLogs(ns, itName), TestTimeoutShort).Should(ContainSubstring(languageInitExpectedString(lang)))
-	Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
-}
-
-func languageInitExpectedString(lang camelv1.Language) string {
-	langDesc := string(lang)
-	if lang == camelv1.LanguageKotlin {
-		langDesc = "kotlin"
-	}
-	return fmt.Sprintf(" Hello Camel K from %s", langDesc)
-}
diff --git a/e2e/common/languages/java_test.go b/e2e/common/languages/java_test.go
index 7de69a98f..903fd083b 100644
--- a/e2e/common/languages/java_test.go
+++ b/e2e/common/languages/java_test.go
@@ -43,16 +43,5 @@ func TestRunSimpleJavaExamples(t *testing.T) {
 		Eventually(IntegrationLogs(ns, "java"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
 	})
 
-	t.Run("run java with properties", func(t *testing.T) {
-		Expect(KamelRunWithID(operatorID, ns, "files/Prop.java", "--property", "file:files/prop.properties").Execute()).To(Succeed())
-		Eventually(IntegrationPodPhase(ns, "prop"), TestTimeoutLong).Should(Equal(v1.PodRunning))
-		Eventually(IntegrationConditionStatus(ns, "prop", camelv1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(v1.ConditionTrue))
-		Eventually(IntegrationLogs(ns, "prop"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
-	})
-
-	t.Run("init run java", func(t *testing.T) {
-		RunInitGeneratedExample(t, operatorID, ns, camelv1.LanguageJavaSource)
-	})
-
 	Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
 }
diff --git a/e2e/common/languages/js_test.go b/e2e/common/languages/js_test.go
index da5f814bc..8bf0c4295 100644
--- a/e2e/common/languages/js_test.go
+++ b/e2e/common/languages/js_test.go
@@ -43,9 +43,5 @@ func TestRunSimpleJavaScriptExamples(t *testing.T) {
 		Eventually(IntegrationLogs(ns, "js"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
 	})
 
-	t.Run("init run JavaScript", func(t *testing.T) {
-		RunInitGeneratedExample(t, operatorID, ns, camelv1.LanguageJavaScript)
-	})
-
 	Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
 }
diff --git a/e2e/common/languages/kotlin_test.go b/e2e/common/languages/kotlin_test.go
index 770183860..da210afc2 100644
--- a/e2e/common/languages/kotlin_test.go
+++ b/e2e/common/languages/kotlin_test.go
@@ -43,9 +43,5 @@ func TestRunSimpleKotlinExamples(t *testing.T) {
 		Eventually(IntegrationLogs(ns, "kotlin"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
 	})
 
-	t.Run("init run Kotlin", func(t *testing.T) {
-		RunInitGeneratedExample(t, operatorID, ns, camelv1.LanguageKotlin)
-	})
-
 	Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
 }
diff --git a/e2e/common/languages/xml_test.go b/e2e/common/languages/xml_test.go
index 5b5181ce8..1ea6f8dd5 100644
--- a/e2e/common/languages/xml_test.go
+++ b/e2e/common/languages/xml_test.go
@@ -43,9 +43,5 @@ func TestRunSimpleXmlExamples(t *testing.T) {
 		Eventually(IntegrationLogs(ns, "xml"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
 	})
 
-	t.Run("init run xml", func(t *testing.T) {
-		RunInitGeneratedExample(t, operatorID, ns, camelv1.LanguageXML)
-	})
-
 	Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
 }
diff --git a/e2e/common/languages/yaml_test.go b/e2e/common/languages/yaml_test.go
index 8aafc1cac..7e3dba1a4 100644
--- a/e2e/common/languages/yaml_test.go
+++ b/e2e/common/languages/yaml_test.go
@@ -43,9 +43,5 @@ func TestRunSimpleYamlExamples(t *testing.T) {
 		Eventually(IntegrationLogs(ns, "yaml"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
 	})
 
-	t.Run("init run yaml", func(t *testing.T) {
-		RunInitGeneratedExample(t, operatorID, ns, camelv1.LanguageYaml)
-	})
-
 	Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
 }
diff --git a/e2e/common/misc/kamelet_test.go b/e2e/common/misc/kamelet_test.go
index 23a5ac716..e54efd19c 100644
--- a/e2e/common/misc/kamelet_test.go
+++ b/e2e/common/misc/kamelet_test.go
@@ -34,10 +34,85 @@ import (
 func TestKameletClasspathLoading(t *testing.T) {
 	RegisterTestingT(t)
 
+	// Store a configmap on the cluster
+	var cmData = make(map[string]string)
+	cmData["my-kamelet"] = `
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1
+kind: Kamelet
+metadata:
+  name: my-timer-source
+  annotations:
+    camel.apache.org/kamelet.support.level: "Preview"
+    camel.apache.org/catalog.version: "0.3.0"
+    camel.apache.org/kamelet.icon: data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gU3ZnIFZlY3RvciBJY29ucyA6IGh0dHA6Ly93d3cub25saW5ld2ViZm9udHMuY29tL2ljb24gLS0+DQo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm9 [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Timer"
+  labels:
+    camel.apache.org/kamelet.type: source
+    camel.apache.org/kamelet.verified: "true"
+spec:
+  definition:
+    title: Timer Source
+    description: Produces periodic events with a custom payload.
+    required:
+      - message
+    type: object
+    properties:
+      period:
+        title: Period
+        description: The interval between two events in milliseconds
+        type: integer
+        default: 1000
+      message:
+        title: Message
+        description: The message to generate
+        type: string
+        example: hello world
+      contentType:
+        title: Content Type
+        description: The content type of the message being generated
+        type: string
+        default: text/plain
+  dependencies:
+    - "camel:core"
+    - "camel:timer"
+    - "camel:kamelet"
+  template:
+    from:
+      uri: timer:tick
+      parameters:
+        period: "{{period}}"
+      steps:
+        - set-body:
+            constant: "{{message}}"
+        - set-header:
+            name: "Content-Type"
+            constant: "{{contentType}}"
+        - to: kamelet:sink
+	`
+	CreatePlainTextConfigmap(ns, "my-kamelet-cm", cmData)
+
 	// Basic
 	t.Run("test basic case", func(t *testing.T) {
 		Expect(KamelRunWithID(operatorID, ns, "files/TimerKameletIntegration.java", "-t", "kamelets.enabled=false",
-			"--resource", "file:files/my-timer-source.kamelet.yaml@/kamelets/my-timer-source.kamelet.yaml",
+			"--resource", "configmap:my-kamelet-cm@/kamelets/my-timer-source.kamelet.yaml",
 			"-p camel.component.kamelet.location=file:/kamelets",
 			"-d", "camel:yaml-dsl",
 			// kamelet dependencies
diff --git a/e2e/common/misc/kamelet_binding_test.go b/e2e/common/misc/pipe_test.go
similarity index 100%
rename from e2e/common/misc/kamelet_binding_test.go
rename to e2e/common/misc/pipe_test.go
diff --git a/e2e/common/misc/kamelet_binding_with_image_test.go b/e2e/common/misc/pipe_with_image_test.go
similarity index 100%
rename from e2e/common/misc/kamelet_binding_with_image_test.go
rename to e2e/common/misc/pipe_with_image_test.go
diff --git a/e2e/common/traits/health_test.go b/e2e/common/traits/health_test.go
index fb73eab88..2da0d25cf 100644
--- a/e2e/common/traits/health_test.go
+++ b/e2e/common/traits/health_test.go
@@ -138,22 +138,18 @@ func TestHealthTrait(t *testing.T) {
 	t.Run("Readiness condition with stopped binding", func(t *testing.T) {
 		name := "stopped-binding"
 
-		// Clean up any previous kamelet with same name
-		Expect(TestClient().Delete(TestContext, Kamelet("my-own-timer-source", ns)())).To(Succeed())
-		Expect(TestClient().Delete(TestContext, Kamelet("my-own-log-sink", ns)())).To(Succeed())
-
-		Expect(CreateTimerKamelet(ns, "my-own-timer-source")()).To(Succeed())
-		Expect(CreateLogKamelet(ns, "my-own-log-sink")()).To(Succeed())
+		Expect(CreateTimerKamelet(ns, "my-own-timer-source")).To(Succeed())
+		Expect(CreateLogKamelet(ns, "my-own-log-sink")).To(Succeed())
 
 		from := corev1.ObjectReference{
 			Kind:       "Kamelet",
-			Name:       "my-own-timer-source",
+			Name:       "my-stopped-binding-timer-source",
 			APIVersion: camelv1.SchemeGroupVersion.String(),
 		}
 
 		to := corev1.ObjectReference{
 			Kind:       "Kamelet",
-			Name:       "my-own-log-sink",
+			Name:       "my-stopped-binding-log-sink",
 			APIVersion: camelv1.SchemeGroupVersion.String(),
 		}
 
diff --git a/e2e/common/traits/openapi_test.go b/e2e/common/traits/openapi_test.go
index 849f4b845..6a371a40b 100644
--- a/e2e/common/traits/openapi_test.go
+++ b/e2e/common/traits/openapi_test.go
@@ -37,30 +37,6 @@ import (
 func TestOpenAPI(t *testing.T) {
 	RegisterTestingT(t)
 
-	Expect(KamelRunWithID(operatorID, ns,
-		"--name", "petstore",
-		"--open-api", "file:files/openapi/petstore-api.yaml",
-		"files/openapi/petstore.groovy",
-	).Execute()).To(Succeed())
-
-	Eventually(IntegrationPodPhase(ns, "petstore"), TestTimeoutLong).
-		Should(Equal(corev1.PodRunning))
-	Eventually(Deployment(ns, "petstore"), TestTimeoutLong).
-		Should(Not(BeNil()))
-
-	Eventually(IntegrationLogs(ns, "petstore"), TestTimeoutMedium).
-		Should(ContainSubstring("Started listPets (rest://get:/v1:/pets)"))
-	Eventually(IntegrationLogs(ns, "petstore"), TestTimeoutMedium).
-		Should(ContainSubstring("Started createPets (rest://post:/v1:/pets)"))
-	Eventually(IntegrationLogs(ns, "petstore"), TestTimeoutMedium).
-		Should(ContainSubstring("Started showPetById (rest://get:/v1:/pets/%7BpetId%7D)"))
-
-	Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
-}
-
-func TestOpenAPIConfigmap(t *testing.T) {
-	RegisterTestingT(t)
-
 	openapiContent, err := ioutil.ReadFile("./files/openapi/petstore-api.yaml")
 	assert.Nil(t, err)
 	var cmDataProps = make(map[string]string)
diff --git a/e2e/knative/openapi_test.go b/e2e/knative/openapi_test.go
index f9ddb0de8..d26bba889 100644
--- a/e2e/knative/openapi_test.go
+++ b/e2e/knative/openapi_test.go
@@ -27,14 +27,22 @@ import (
 
 	. "github.com/apache/camel-k/v2/e2e/support"
 	. "github.com/onsi/gomega"
+	"github.com/stretchr/testify/assert"
+	"io/ioutil"
 )
 
 func TestOpenAPIService(t *testing.T) {
 	RegisterTestingT(t)
 
+	openapiContent, err := ioutil.ReadFile("./files/petstore-api.yaml")
+	assert.Nil(t, err)
+	var cmDataProps = make(map[string]string)
+	cmDataProps["petstore-api.yaml"] = string(openapiContent)
+	CreatePlainTextConfigmap(ns, "my-openapi-knative", cmDataProps)
+
 	Expect(KamelRunWithID(operatorID, ns,
 		"--name", "petstore",
-		"--open-api", "file:files/petstore-api.yaml",
+		"--open-api", "configmap:my-openapi-knative",
 		"files/petstore.groovy",
 	).Execute()).To(Succeed())
 
diff --git a/pkg/cmd/install.go b/pkg/cmd/install.go
index 26fbcffa3..ba9d76b02 100644
--- a/pkg/cmd/install.go
+++ b/pkg/cmd/install.go
@@ -355,7 +355,7 @@ func (o *installCmdOptions) installOperator(cmd *cobra.Command, output *kubernet
 	}
 
 	// Set up IntegrationPlatform
-	platform, err := o.setupIntegrationPlatform(cmd, c, namespace, platformName, registrySecretName, output)
+	platform, err := o.setupIntegrationPlatform(c, namespace, platformName, registrySecretName, output)
 	if err != nil {
 		return err
 	}
@@ -464,8 +464,7 @@ func (o *installCmdOptions) setupRegistrySecret(c client.Client, namespace strin
 	return "", nil
 }
 
-func (o *installCmdOptions) setupIntegrationPlatform(
-	cmd *cobra.Command, c client.Client, namespace string, platformName string, registrySecretName string,
+func (o *installCmdOptions) setupIntegrationPlatform(c client.Client, namespace string, platformName string, registrySecretName string,
 	output *kubernetes.Collection,
 ) (*v1.IntegrationPlatform, error) {
 	platform, err := install.NewPlatform(o.Context, c, o.ClusterType, o.SkipRegistrySetup, o.registry, platformName)
diff --git a/pkg/cmd/modeline_test.go b/pkg/cmd/modeline_test.go
index 3b5e6855c..fa3bd91dd 100644
--- a/pkg/cmd/modeline_test.go
+++ b/pkg/cmd/modeline_test.go
@@ -354,37 +354,6 @@ func TestModelineRunConfigSecret(t *testing.T) {
 	assert.NoError(t, err)
 }
 
-func TestModelineRunConfigFile(t *testing.T) {
-	err := util.WithTempDir("camel-k-test-", func(dir string) error {
-		subDir := filepath.Join(dir, "sub")
-		err := os.Mkdir(subDir, 0o700)
-		assert.NoError(t, err)
-
-		file := `
-		// camel-k: config=file:application.properties
-	`
-		fileName := filepath.Join(subDir, "simple.groovy")
-		err = os.WriteFile(fileName, []byte(file), 0o400)
-		assert.NoError(t, err)
-
-		propFile := `
-		a=b
-	`
-		propFileName := filepath.Join(subDir, "application.properties")
-		err = os.WriteFile(propFileName, []byte(propFile), 0o400)
-		assert.NoError(t, err)
-
-		cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
-		assert.NoError(t, err)
-		assert.NotNil(t, cmd)
-		assert.Equal(t, []string{"run", fileName, fmt.Sprintf("--config=file:%s", propFileName)}, flags)
-
-		return nil
-	})
-
-	assert.NoError(t, err)
-}
-
 func TestModelineRunResourceConfigmap(t *testing.T) {
 	err := util.WithTempDir("camel-k-test-", func(dir string) error {
 		subDir := filepath.Join(dir, "sub")
@@ -433,37 +402,6 @@ func TestModelineRunResourceSecret(t *testing.T) {
 	assert.NoError(t, err)
 }
 
-func TestModelineRunResourceFile(t *testing.T) {
-	err := util.WithTempDir("camel-k-test-", func(dir string) error {
-		subDir := filepath.Join(dir, "sub")
-		err := os.Mkdir(subDir, 0o700)
-		assert.NoError(t, err)
-
-		file := `
-		// camel-k: resource=file:application.properties
-	`
-		fileName := filepath.Join(subDir, "simple.groovy")
-		err = os.WriteFile(fileName, []byte(file), 0o400)
-		assert.NoError(t, err)
-
-		propFile := `
-		a=b
-	`
-		propFileName := filepath.Join(subDir, "application.properties")
-		err = os.WriteFile(propFileName, []byte(propFile), 0o400)
-		assert.NoError(t, err)
-
-		cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "run", fileName})
-		assert.NoError(t, err)
-		assert.NotNil(t, cmd)
-		assert.Equal(t, []string{"run", fileName, fmt.Sprintf("--resource=file:%s", propFileName)}, flags)
-
-		return nil
-	})
-
-	assert.NoError(t, err)
-}
-
 func TestModelineQuotedPodTemplate(t *testing.T) {
 	err := util.WithTempDir("camel-k-test-", func(dir string) error {
 
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index 740682488..87f7edc9c 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -102,8 +102,8 @@ func newCmdRun(rootCmdOptions *RootCmdOptions) (*cobra.Command, *runCmdOptions)
 	cmd.Flags().StringP("kit", "k", "", "The kit used to run the integration")
 	cmd.Flags().StringArrayP("property", "p", nil, "Add a runtime property or properties file from a path, a config map or a secret (syntax: [my-key=my-value|file:/path/to/my-conf.properties|[configmap|secret]:name])")
 	cmd.Flags().StringArray("build-property", nil, "Add a build time property or properties file from a path, a config map or a secret (syntax: [my-key=my-value|file:/path/to/my-conf.properties|[configmap|secret]:name]])")
-	cmd.Flags().StringArray("config", nil, "Add a runtime configuration from a Configmap, a Secret or a file (syntax: [configmap|secret|file]:name[/key], where name represents the local file path or the configmap/secret name and key optionally represents the configmap/secret key to be filtered)")
-	cmd.Flags().StringArray("resource", nil, "Add a runtime resource from a Configmap, a Secret or a file (syntax: [configmap|secret|file]:name[/key][@path], where name represents the local file path or the configmap/secret name, key optionally represents the configmap/secret key to be filtered and path represents the destination path)")
+	cmd.Flags().StringArray("config", nil, "Add a runtime configuration from a Configmap or a Secret (syntax: [configmap|secret]:name[/key], where name represents the configmap/secret name and key optionally represents the configmap/secret key to be filtered)")
+	cmd.Flags().StringArray("resource", nil, "Add a runtime resource from a Configmap or a Secret (syntax: [configmap|secret]:name[/key][@path], where name represents the configmap/secret name, key optionally represents the configmap/secret key to be filtered and path represents the destination path)")
 	cmd.Flags().StringArray("maven-repository", nil, "Add a maven repository")
 	cmd.Flags().Bool("logs", false, "Print integration logs")
 	cmd.Flags().Bool("sync", false, "Synchronize the local source file with the cluster, republishing at each change")
@@ -286,9 +286,9 @@ func (o *runCmdOptions) validate() error {
 	}
 
 	for _, openapi := range o.OpenAPIs {
-		// We support only local file and cluster configmaps
-		if !(strings.HasPrefix(openapi, "file:") || strings.HasPrefix(openapi, "configmap:")) {
-			return fmt.Errorf(`invalid openapi specification "%s". It supports only file or configmap`, openapi)
+		// We support only cluster configmaps
+		if !(strings.HasPrefix(openapi, "configmap:")) {
+			return fmt.Errorf(`invalid openapi specification "%s". It supports only configmaps`, openapi)
 		}
 	}
 
@@ -743,7 +743,7 @@ func (o *runCmdOptions) parseAndConvertToTrait(cmd *cobra.Command,
 			return err
 		}
 		// We try to autogenerate a configmap
-		if _, err := parseConfigAndGenCm(o.Context, cmd, c, config, integration, o.Compression); err != nil {
+		if _, err := parseConfigAndGenCm(o.Context, cmd, c, config, integration); err != nil {
 			return err
 		}
 		o.Traits = append(o.Traits, convertToTrait(convert(config), traitParam))
diff --git a/pkg/cmd/run_support.go b/pkg/cmd/run_support.go
index ee7ffb163..b3fde6146 100644
--- a/pkg/cmd/run_support.go
+++ b/pkg/cmd/run_support.go
@@ -48,7 +48,7 @@ func addDependency(cmd *cobra.Command, it *v1.Integration, dependency string, ca
 	it.Spec.AddDependency(normalized)
 }
 
-func parseConfigAndGenCm(ctx context.Context, cmd *cobra.Command, c client.Client, config *resource.Config, integration *v1.Integration, enableCompression bool) (*corev1.ConfigMap, error) {
+func parseConfigAndGenCm(ctx context.Context, cmd *cobra.Command, c client.Client, config *resource.Config, integration *v1.Integration) (*corev1.ConfigMap, error) {
 	switch config.StorageType() {
 	case resource.StorageTypeConfigmap:
 		cm := kubernetes.LookupConfigmap(ctx, c, integration.Namespace, config.Name())
diff --git a/pkg/cmd/run_test.go b/pkg/cmd/run_test.go
index 219b2f7a2..1efbfd112 100644
--- a/pkg/cmd/run_test.go
+++ b/pkg/cmd/run_test.go
@@ -229,13 +229,11 @@ func TestRunNameFlag(t *testing.T) {
 func TestRunOpenApiFlag(t *testing.T) {
 	runCmdOptions, rootCmd, _ := initializeRunCmdOptions(t)
 	_, err := test.ExecuteCommand(rootCmd, cmdRun,
-		"--open-api", "file:oapi1",
 		"--open-api", "configmap:oapi2",
 		integrationSource)
 	assert.Nil(t, err)
-	assert.Len(t, runCmdOptions.OpenAPIs, 2)
-	assert.Equal(t, "file:oapi1", runCmdOptions.OpenAPIs[0])
-	assert.Equal(t, "configmap:oapi2", runCmdOptions.OpenAPIs[1])
+	assert.Len(t, runCmdOptions.OpenAPIs, 1)
+	assert.Equal(t, "configmap:oapi2", runCmdOptions.OpenAPIs[0])
 }
 
 func TestRunOpenApiInvalidFlag(t *testing.T) {


[camel-k] 01/05: feat: remove deprecated code

Posted by pc...@apache.org.
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 e60235836abb3b3d1975287a0b4a22a89d8ef561
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Wed May 3 16:45:20 2023 +0200

    feat: remove deprecated code
    
    Close #4026
---
 config/crd/bases/camel.apache.org_pipes.yaml       | 512 -------------------
 docs/modules/ROOT/partials/apis/camel-k-crds.adoc  |  55 --
 e2e/common/misc/kamelet_binding_test.go            |  52 +-
 e2e/common/misc/kamelet_binding_with_image_test.go |  47 +-
 e2e/common/traits/health_test.go                   |  28 +-
 e2e/knative/kamelet_test.go                        |  32 +-
 e2e/native/native_binding_test.go                  |  11 +-
 e2e/support/test_support.go                        |  62 ---
 helm/camel-k/crds/crd-pipe.yaml                    | 512 -------------------
 pkg/apis/camel/v1/common_types.go                  |  23 -
 pkg/apis/camel/v1/integration_types_support.go     |  10 -
 pkg/apis/camel/v1/pipe_types.go                    |   3 -
 pkg/apis/camel/v1/zz_generated.deepcopy.go         |  23 -
 .../camel/applyconfiguration/camel/v1/endpoint.go  |  15 -
 pkg/cmd/init.go                                    | 124 -----
 pkg/cmd/install.go                                 |  26 +-
 pkg/cmd/install_test.go                            |   8 -
 pkg/cmd/local.go                                   |  96 ----
 pkg/cmd/local/container.go                         | 347 -------------
 pkg/cmd/local/local.go                             | 556 ---------------------
 pkg/cmd/local/local_test.go                        |  67 ---
 pkg/cmd/local/workdir.go                           | 244 ---------
 pkg/cmd/local_build.go                             | 269 ----------
 pkg/cmd/local_build_test.go                        |  73 ---
 pkg/cmd/local_inspect.go                           | 109 ----
 pkg/cmd/local_inspect_test.go                      |  73 ---
 pkg/cmd/local_run.go                               | 283 -----------
 pkg/cmd/local_run_test.go                          | 109 ----
 pkg/cmd/modeline_test.go                           |  43 --
 pkg/cmd/promote_test.go                            |  14 +-
 pkg/cmd/root.go                                    |   2 -
 pkg/cmd/run.go                                     |   5 +-
 pkg/cmd/run_support.go                             | 114 +++--
 pkg/cmd/run_support_test.go                        |  46 --
 pkg/resources/resources.go                         |  25 +-
 pkg/trait/openapi.go                               |   2 +-
 pkg/trait/service_test.go                          |   5 +-
 pkg/trait/trait_configure_test.go                  |   4 +-
 pkg/util/kubernetes/resolver.go                    |  13 -
 pkg/util/log/log.go                                |   2 +-
 pkg/util/resource/config.go                        |  21 +-
 pkg/util/resource/config_test.go                   |  35 --
 42 files changed, 199 insertions(+), 3901 deletions(-)

diff --git a/config/crd/bases/camel.apache.org_pipes.yaml b/config/crd/bases/camel.apache.org_pipes.yaml
index d1640f18e..103ac83fc 100644
--- a/config/crd/bases/camel.apache.org_pipes.yaml
+++ b/config/crd/bases/camel.apache.org_pipes.yaml
@@ -7788,176 +7788,6 @@ spec:
                         description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
                         type: string
                     type: object
-                  types:
-                    additionalProperties:
-                      description: 'EventTypeSpec represents a specification for an
-                        event type Deprecated: In favor of using DataTypeSpec'
-                      properties:
-                        mediaType:
-                          description: media type as expected for HTTP media types
-                            (ie, application/json)
-                          type: string
-                        schema:
-                          description: the expected schema for the event
-                          properties:
-                            $schema:
-                              description: JSONSchemaURL represents a schema url.
-                              type: string
-                            description:
-                              type: string
-                            example:
-                              description: 'JSON represents any valid JSON value.
-                                These types are supported: bool, int64, float64, string,
-                                []interface{}, map[string]interface{} and nil.'
-                              x-kubernetes-preserve-unknown-fields: true
-                            externalDocs:
-                              description: ExternalDocumentation allows referencing
-                                an external resource for extended documentation.
-                              properties:
-                                description:
-                                  type: string
-                                url:
-                                  type: string
-                              type: object
-                            id:
-                              type: string
-                            properties:
-                              additionalProperties:
-                                properties:
-                                  default:
-                                    description: default is a default value for undefined
-                                      object fields.
-                                    x-kubernetes-preserve-unknown-fields: true
-                                  deprecated:
-                                    type: boolean
-                                  description:
-                                    type: string
-                                  enum:
-                                    items:
-                                      description: 'JSON represents any valid JSON
-                                        value. These types are supported: bool, int64,
-                                        float64, string, []interface{}, map[string]interface{}
-                                        and nil.'
-                                      x-kubernetes-preserve-unknown-fields: true
-                                    type: array
-                                  example:
-                                    description: 'JSON represents any valid JSON value.
-                                      These types are supported: bool, int64, float64,
-                                      string, []interface{}, map[string]interface{}
-                                      and nil.'
-                                    x-kubernetes-preserve-unknown-fields: true
-                                  exclusiveMaximum:
-                                    type: boolean
-                                  exclusiveMinimum:
-                                    type: boolean
-                                  format:
-                                    description: "format is an OpenAPI v3 format string.
-                                      Unknown formats are ignored. The following formats
-                                      are validated: \n - bsonobjectid: a bson object
-                                      ID, i.e. a 24 characters hex string - uri: an
-                                      URI as parsed by Golang net/url.ParseRequestURI
-                                      - email: an email address as parsed by Golang
-                                      net/mail.ParseAddress - hostname: a valid representation
-                                      for an Internet host name, as defined by RFC
-                                      1034, section 3.1 [RFC1034]. - ipv4: an IPv4
-                                      IP as parsed by Golang net.ParseIP - ipv6: an
-                                      IPv6 IP as parsed by Golang net.ParseIP - cidr:
-                                      a CIDR as parsed by Golang net.ParseCIDR - mac:
-                                      a MAC address as parsed by Golang net.ParseMAC
-                                      - uuid: an UUID that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$
-                                      - uuid3: an UUID3 that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$
-                                      - uuid4: an UUID4 that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
-                                      - uuid5: an UUID5 that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
-                                      - isbn: an ISBN10 or ISBN13 number string like
-                                      \"0321751043\" or \"978-0321751041\" - isbn10:
-                                      an ISBN10 number string like \"0321751043\"
-                                      - isbn13: an ISBN13 number string like \"978-0321751041\"
-                                      - creditcard: a credit card number defined by
-                                      the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\\\d{3})\\\\d{11})$
-                                      with any non digit characters mixed in - ssn:
-                                      a U.S. social security number following the
-                                      regex ^\\\\d{3}[- ]?\\\\d{2}[- ]?\\\\d{4}$ -
-                                      hexcolor: an hexadecimal color code like \"#FFFFFF\"
-                                      following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
-                                      - rgbcolor: an RGB color code like rgb like
-                                      \"rgb(255,255,255)\" - byte: base64 encoded
-                                      binary data - password: any kind of string -
-                                      date: a date string like \"2006-01-02\" as defined
-                                      by full-date in RFC3339 - duration: a duration
-                                      string like \"22 ns\" as parsed by Golang time.ParseDuration
-                                      or compatible with Scala duration format - datetime:
-                                      a date time string like \"2014-12-15T19:30:20.000Z\"
-                                      as defined by date-time in RFC3339."
-                                    type: string
-                                  id:
-                                    type: string
-                                  maxItems:
-                                    format: int64
-                                    type: integer
-                                  maxLength:
-                                    format: int64
-                                    type: integer
-                                  maxProperties:
-                                    format: int64
-                                    type: integer
-                                  maximum:
-                                    description: A Number represents a JSON number
-                                      literal.
-                                    type: string
-                                  minItems:
-                                    format: int64
-                                    type: integer
-                                  minLength:
-                                    format: int64
-                                    type: integer
-                                  minProperties:
-                                    format: int64
-                                    type: integer
-                                  minimum:
-                                    description: A Number represents a JSON number
-                                      literal.
-                                    type: string
-                                  multipleOf:
-                                    description: A Number represents a JSON number
-                                      literal.
-                                    type: string
-                                  nullable:
-                                    type: boolean
-                                  pattern:
-                                    type: string
-                                  title:
-                                    type: string
-                                  type:
-                                    type: string
-                                  uniqueItems:
-                                    type: boolean
-                                  x-descriptors:
-                                    description: XDescriptors is a list of extended
-                                      properties that trigger a custom behavior in
-                                      external systems
-                                    items:
-                                      type: string
-                                    type: array
-                                type: object
-                              type: object
-                            required:
-                              items:
-                                type: string
-                              type: array
-                            title:
-                              type: string
-                            type:
-                              type: string
-                          type: object
-                      type: object
-                    description: 'Types defines the data type of the data produced/consumed
-                      by the endpoint and references a given data type specification.
-                      Deprecated: In favor of using DataTypes'
-                    type: object
                   uri:
                     description: URI can be used to specify the (Camel) endpoint explicitly
                     type: string
@@ -8023,176 +7853,6 @@ spec:
                         description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
                         type: string
                     type: object
-                  types:
-                    additionalProperties:
-                      description: 'EventTypeSpec represents a specification for an
-                        event type Deprecated: In favor of using DataTypeSpec'
-                      properties:
-                        mediaType:
-                          description: media type as expected for HTTP media types
-                            (ie, application/json)
-                          type: string
-                        schema:
-                          description: the expected schema for the event
-                          properties:
-                            $schema:
-                              description: JSONSchemaURL represents a schema url.
-                              type: string
-                            description:
-                              type: string
-                            example:
-                              description: 'JSON represents any valid JSON value.
-                                These types are supported: bool, int64, float64, string,
-                                []interface{}, map[string]interface{} and nil.'
-                              x-kubernetes-preserve-unknown-fields: true
-                            externalDocs:
-                              description: ExternalDocumentation allows referencing
-                                an external resource for extended documentation.
-                              properties:
-                                description:
-                                  type: string
-                                url:
-                                  type: string
-                              type: object
-                            id:
-                              type: string
-                            properties:
-                              additionalProperties:
-                                properties:
-                                  default:
-                                    description: default is a default value for undefined
-                                      object fields.
-                                    x-kubernetes-preserve-unknown-fields: true
-                                  deprecated:
-                                    type: boolean
-                                  description:
-                                    type: string
-                                  enum:
-                                    items:
-                                      description: 'JSON represents any valid JSON
-                                        value. These types are supported: bool, int64,
-                                        float64, string, []interface{}, map[string]interface{}
-                                        and nil.'
-                                      x-kubernetes-preserve-unknown-fields: true
-                                    type: array
-                                  example:
-                                    description: 'JSON represents any valid JSON value.
-                                      These types are supported: bool, int64, float64,
-                                      string, []interface{}, map[string]interface{}
-                                      and nil.'
-                                    x-kubernetes-preserve-unknown-fields: true
-                                  exclusiveMaximum:
-                                    type: boolean
-                                  exclusiveMinimum:
-                                    type: boolean
-                                  format:
-                                    description: "format is an OpenAPI v3 format string.
-                                      Unknown formats are ignored. The following formats
-                                      are validated: \n - bsonobjectid: a bson object
-                                      ID, i.e. a 24 characters hex string - uri: an
-                                      URI as parsed by Golang net/url.ParseRequestURI
-                                      - email: an email address as parsed by Golang
-                                      net/mail.ParseAddress - hostname: a valid representation
-                                      for an Internet host name, as defined by RFC
-                                      1034, section 3.1 [RFC1034]. - ipv4: an IPv4
-                                      IP as parsed by Golang net.ParseIP - ipv6: an
-                                      IPv6 IP as parsed by Golang net.ParseIP - cidr:
-                                      a CIDR as parsed by Golang net.ParseCIDR - mac:
-                                      a MAC address as parsed by Golang net.ParseMAC
-                                      - uuid: an UUID that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$
-                                      - uuid3: an UUID3 that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$
-                                      - uuid4: an UUID4 that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
-                                      - uuid5: an UUID5 that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
-                                      - isbn: an ISBN10 or ISBN13 number string like
-                                      \"0321751043\" or \"978-0321751041\" - isbn10:
-                                      an ISBN10 number string like \"0321751043\"
-                                      - isbn13: an ISBN13 number string like \"978-0321751041\"
-                                      - creditcard: a credit card number defined by
-                                      the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\\\d{3})\\\\d{11})$
-                                      with any non digit characters mixed in - ssn:
-                                      a U.S. social security number following the
-                                      regex ^\\\\d{3}[- ]?\\\\d{2}[- ]?\\\\d{4}$ -
-                                      hexcolor: an hexadecimal color code like \"#FFFFFF\"
-                                      following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
-                                      - rgbcolor: an RGB color code like rgb like
-                                      \"rgb(255,255,255)\" - byte: base64 encoded
-                                      binary data - password: any kind of string -
-                                      date: a date string like \"2006-01-02\" as defined
-                                      by full-date in RFC3339 - duration: a duration
-                                      string like \"22 ns\" as parsed by Golang time.ParseDuration
-                                      or compatible with Scala duration format - datetime:
-                                      a date time string like \"2014-12-15T19:30:20.000Z\"
-                                      as defined by date-time in RFC3339."
-                                    type: string
-                                  id:
-                                    type: string
-                                  maxItems:
-                                    format: int64
-                                    type: integer
-                                  maxLength:
-                                    format: int64
-                                    type: integer
-                                  maxProperties:
-                                    format: int64
-                                    type: integer
-                                  maximum:
-                                    description: A Number represents a JSON number
-                                      literal.
-                                    type: string
-                                  minItems:
-                                    format: int64
-                                    type: integer
-                                  minLength:
-                                    format: int64
-                                    type: integer
-                                  minProperties:
-                                    format: int64
-                                    type: integer
-                                  minimum:
-                                    description: A Number represents a JSON number
-                                      literal.
-                                    type: string
-                                  multipleOf:
-                                    description: A Number represents a JSON number
-                                      literal.
-                                    type: string
-                                  nullable:
-                                    type: boolean
-                                  pattern:
-                                    type: string
-                                  title:
-                                    type: string
-                                  type:
-                                    type: string
-                                  uniqueItems:
-                                    type: boolean
-                                  x-descriptors:
-                                    description: XDescriptors is a list of extended
-                                      properties that trigger a custom behavior in
-                                      external systems
-                                    items:
-                                      type: string
-                                    type: array
-                                type: object
-                              type: object
-                            required:
-                              items:
-                                type: string
-                              type: array
-                            title:
-                              type: string
-                            type:
-                              type: string
-                          type: object
-                      type: object
-                    description: 'Types defines the data type of the data produced/consumed
-                      by the endpoint and references a given data type specification.
-                      Deprecated: In favor of using DataTypes'
-                    type: object
                   uri:
                     description: URI can be used to specify the (Camel) endpoint explicitly
                     type: string
@@ -8262,178 +7922,6 @@ spec:
                           description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
                           type: string
                       type: object
-                    types:
-                      additionalProperties:
-                        description: 'EventTypeSpec represents a specification for
-                          an event type Deprecated: In favor of using DataTypeSpec'
-                        properties:
-                          mediaType:
-                            description: media type as expected for HTTP media types
-                              (ie, application/json)
-                            type: string
-                          schema:
-                            description: the expected schema for the event
-                            properties:
-                              $schema:
-                                description: JSONSchemaURL represents a schema url.
-                                type: string
-                              description:
-                                type: string
-                              example:
-                                description: 'JSON represents any valid JSON value.
-                                  These types are supported: bool, int64, float64,
-                                  string, []interface{}, map[string]interface{} and
-                                  nil.'
-                                x-kubernetes-preserve-unknown-fields: true
-                              externalDocs:
-                                description: ExternalDocumentation allows referencing
-                                  an external resource for extended documentation.
-                                properties:
-                                  description:
-                                    type: string
-                                  url:
-                                    type: string
-                                type: object
-                              id:
-                                type: string
-                              properties:
-                                additionalProperties:
-                                  properties:
-                                    default:
-                                      description: default is a default value for
-                                        undefined object fields.
-                                      x-kubernetes-preserve-unknown-fields: true
-                                    deprecated:
-                                      type: boolean
-                                    description:
-                                      type: string
-                                    enum:
-                                      items:
-                                        description: 'JSON represents any valid JSON
-                                          value. These types are supported: bool,
-                                          int64, float64, string, []interface{}, map[string]interface{}
-                                          and nil.'
-                                        x-kubernetes-preserve-unknown-fields: true
-                                      type: array
-                                    example:
-                                      description: 'JSON represents any valid JSON
-                                        value. These types are supported: bool, int64,
-                                        float64, string, []interface{}, map[string]interface{}
-                                        and nil.'
-                                      x-kubernetes-preserve-unknown-fields: true
-                                    exclusiveMaximum:
-                                      type: boolean
-                                    exclusiveMinimum:
-                                      type: boolean
-                                    format:
-                                      description: "format is an OpenAPI v3 format
-                                        string. Unknown formats are ignored. The following
-                                        formats are validated: \n - bsonobjectid:
-                                        a bson object ID, i.e. a 24 characters hex
-                                        string - uri: an URI as parsed by Golang net/url.ParseRequestURI
-                                        - email: an email address as parsed by Golang
-                                        net/mail.ParseAddress - hostname: a valid
-                                        representation for an Internet host name,
-                                        as defined by RFC 1034, section 3.1 [RFC1034].
-                                        - ipv4: an IPv4 IP as parsed by Golang net.ParseIP
-                                        - ipv6: an IPv6 IP as parsed by Golang net.ParseIP
-                                        - cidr: a CIDR as parsed by Golang net.ParseCIDR
-                                        - mac: a MAC address as parsed by Golang net.ParseMAC
-                                        - uuid: an UUID that allows uppercase defined
-                                        by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$
-                                        - uuid3: an UUID3 that allows uppercase defined
-                                        by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$
-                                        - uuid4: an UUID4 that allows uppercase defined
-                                        by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
-                                        - uuid5: an UUID5 that allows uppercase defined
-                                        by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
-                                        - isbn: an ISBN10 or ISBN13 number string
-                                        like \"0321751043\" or \"978-0321751041\"
-                                        - isbn10: an ISBN10 number string like \"0321751043\"
-                                        - isbn13: an ISBN13 number string like \"978-0321751041\"
-                                        - creditcard: a credit card number defined
-                                        by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\\\d{3})\\\\d{11})$
-                                        with any non digit characters mixed in - ssn:
-                                        a U.S. social security number following the
-                                        regex ^\\\\d{3}[- ]?\\\\d{2}[- ]?\\\\d{4}$
-                                        - hexcolor: an hexadecimal color code like
-                                        \"#FFFFFF\" following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
-                                        - rgbcolor: an RGB color code like rgb like
-                                        \"rgb(255,255,255)\" - byte: base64 encoded
-                                        binary data - password: any kind of string
-                                        - date: a date string like \"2006-01-02\"
-                                        as defined by full-date in RFC3339 - duration:
-                                        a duration string like \"22 ns\" as parsed
-                                        by Golang time.ParseDuration or compatible
-                                        with Scala duration format - datetime: a date
-                                        time string like \"2014-12-15T19:30:20.000Z\"
-                                        as defined by date-time in RFC3339."
-                                      type: string
-                                    id:
-                                      type: string
-                                    maxItems:
-                                      format: int64
-                                      type: integer
-                                    maxLength:
-                                      format: int64
-                                      type: integer
-                                    maxProperties:
-                                      format: int64
-                                      type: integer
-                                    maximum:
-                                      description: A Number represents a JSON number
-                                        literal.
-                                      type: string
-                                    minItems:
-                                      format: int64
-                                      type: integer
-                                    minLength:
-                                      format: int64
-                                      type: integer
-                                    minProperties:
-                                      format: int64
-                                      type: integer
-                                    minimum:
-                                      description: A Number represents a JSON number
-                                        literal.
-                                      type: string
-                                    multipleOf:
-                                      description: A Number represents a JSON number
-                                        literal.
-                                      type: string
-                                    nullable:
-                                      type: boolean
-                                    pattern:
-                                      type: string
-                                    title:
-                                      type: string
-                                    type:
-                                      type: string
-                                    uniqueItems:
-                                      type: boolean
-                                    x-descriptors:
-                                      description: XDescriptors is a list of extended
-                                        properties that trigger a custom behavior
-                                        in external systems
-                                      items:
-                                        type: string
-                                      type: array
-                                  type: object
-                                type: object
-                              required:
-                                items:
-                                  type: string
-                                type: array
-                              title:
-                                type: string
-                              type:
-                                type: string
-                            type: object
-                        type: object
-                      description: 'Types defines the data type of the data produced/consumed
-                        by the endpoint and references a given data type specification.
-                        Deprecated: In favor of using DataTypes'
-                      type: object
                     uri:
                       description: URI can be used to specify the (Camel) endpoint
                         explicitly
diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
index 05067c9cb..3498ff1f9 100644
--- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
+++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
@@ -1274,7 +1274,6 @@ the value to assign to the configuration (syntax may vary depending on the `Type
 
 *Appears on:*
 
-* <<#_camel_apache_org_v1_ResourceSpec, ResourceSpec>>
 * <<#_camel_apache_org_v1_SourceSpec, SourceSpec>>
 
 DataSpec represents the way the source is materialized in the running `Pod`
@@ -1514,14 +1513,6 @@ URI can be used to specify the (Camel) endpoint explicitly
 
 Properties are a key value representation of endpoint properties
 
-|`types` +
-*xref:#_camel_apache_org_v1_EventTypeSpec[map[github.com/apache/camel-k/v2/pkg/apis/camel/v1.TypeSlot\]github.com/apache/camel-k/v2/pkg/apis/camel/v1.EventTypeSpec]*
-|
-
-
-Types defines the data type of the data produced/consumed by the endpoint and references a given data type specification.
-Deprecated: In favor of using DataTypes
-
 |`dataTypes` +
 *xref:#_camel_apache_org_v1_DataTypeReference[map[github.com/apache/camel-k/v2/pkg/apis/camel/v1.TypeSlot\]github.com/apache/camel-k/v2/pkg/apis/camel/v1.DataTypeReference]*
 |
@@ -1702,7 +1693,6 @@ ErrorHandlerType a type of error handler (ie, sink)
 
 *Appears on:*
 
-* <<#_camel_apache_org_v1_Endpoint, Endpoint>>
 * <<#_camel_apache_org_v1_KameletSpec, KameletSpec>>
 
 EventTypeSpec represents a specification for an event type
@@ -4394,51 +4384,6 @@ Your options are to `ignore`, `fail`, or `warn` on missing or incorrect checksum
 ResourceCondition is a common type for all conditions
 
 
-[#_camel_apache_org_v1_ResourceSpec]
-=== ResourceSpec
-
-ResourceSpec represent an attached resource which will be materialized as a file on the running `Pod`
-TODO: we should deprecate in future releases in favour of mount, openapi or camel traits
-
-[cols="2,2a",options="header"]
-|===
-|Field
-|Description
-
-|`DataSpec` +
-*xref:#_camel_apache_org_v1_DataSpec[DataSpec]*
-|(Members of `DataSpec` are embedded into this type.)
-
-
-the content of the resource
-
-|`type` +
-*xref:#_camel_apache_org_v1_ResourceType[ResourceType]*
-|
-
-
-the kind of data to expect
-
-|`mountPath` +
-string
-|
-
-
-the mount path on destination `Pod`
-
-
-|===
-
-[#_camel_apache_org_v1_ResourceType]
-=== ResourceType(`string` alias)
-
-*Appears on:*
-
-* <<#_camel_apache_org_v1_ResourceSpec, ResourceSpec>>
-
-ResourceType defines a kind of resource
-
-
 [#_camel_apache_org_v1_RuntimeProvider]
 === RuntimeProvider(`string` alias)
 
diff --git a/e2e/common/misc/kamelet_binding_test.go b/e2e/common/misc/kamelet_binding_test.go
index 3b148174a..b0eb5f573 100644
--- a/e2e/common/misc/kamelet_binding_test.go
+++ b/e2e/common/misc/kamelet_binding_test.go
@@ -53,24 +53,16 @@ func TestPipe(t *testing.T) {
 			APIVersion: v1.SchemeGroupVersion.String(),
 		}
 
-		errorHandler := map[string]interface{}{
-			"sink": map[string]interface{}{
-				"endpoint": map[string]interface{}{
-					"ref": map[string]string{
-						"kind":       "Kamelet",
-						"apiVersion": v1.SchemeGroupVersion.String(),
-						"name":       "my-own-log-sink",
-					},
-					"properties": map[string]string{
-						"loggerName": "kameletErrorHandler",
-					},
-				}}}
-
 		t.Run("throw error test", func(t *testing.T) {
-			Expect(BindKameletToWithErrorHandler(ns, "throw-error-binding", map[string]string{},
-				from, to,
-				map[string]string{"message": "throw Error"}, map[string]string{"loggerName": "integrationLogger"},
-				errorHandler)()).To(Succeed())
+			Expect(KamelBind(ns,
+				from.Name,
+				to.Name,
+				"--error-handler", "sink:"+to.Name,
+				"-p", "source.message=throw Error",
+				"-p", "sink.loggerName=integrationLogger",
+				"-p", "error-handler.loggerName=kameletErrorHandler",
+				"--name", "throw-error-binding",
+			).Execute()).To(Succeed())
 
 			Eventually(IntegrationPodPhase(ns, "throw-error-binding"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
 			Eventually(IntegrationLogs(ns, "throw-error-binding"), TestTimeoutShort).Should(ContainSubstring("kameletErrorHandler"))
@@ -79,10 +71,15 @@ func TestPipe(t *testing.T) {
 		})
 
 		t.Run("don't throw error test", func(t *testing.T) {
-			Expect(BindKameletToWithErrorHandler(ns, "no-error-binding", map[string]string{},
-				from, to,
-				map[string]string{"message": "true"}, map[string]string{"loggerName": "integrationLogger"},
-				errorHandler)()).To(Succeed())
+			Expect(KamelBind(ns,
+				from.Name,
+				to.Name,
+				"--error-handler", "sink:"+to.Name,
+				"-p", "source.message=true",
+				"-p", "sink.loggerName=integrationLogger",
+				"-p", "error-handler.loggerName=kameletErrorHandler",
+				"--name", "no-error-binding",
+			).Execute()).To(Succeed())
 
 			Eventually(IntegrationPodPhase(ns, "no-error-binding"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
 			Eventually(IntegrationLogs(ns, "no-error-binding"), TestTimeoutShort).ShouldNot(ContainSubstring("kameletErrorHandler"))
@@ -108,11 +105,14 @@ func TestPipe(t *testing.T) {
 			APIVersion: v1.SchemeGroupVersion.String(),
 		}
 
-		Expect(BindKameletTo(ns, "kb-with-traits",
-			map[string]string{"trait.camel.apache.org/camel.properties": "[\"camel.prop1=a\",\"camel.prop2=b\"]"},
-			from, to,
-			map[string]string{"message": "hello from test"}, map[string]string{"loggerName": "integrationLogger"})()).
-			To(Succeed())
+		Expect(KamelBind(ns,
+			from.Name,
+			to.Name,
+			"-p", "source.message=hello from test",
+			"-p", "sink.loggerName=integrationLogger",
+			"--annotation", "trait.camel.apache.org/camel.properties=[\"camel.prop1=a\",\"camel.prop2=b\"]",
+			"--name", "kb-with-traits",
+		).Execute()).To(Succeed())
 
 		Eventually(IntegrationPodPhase(ns, "kb-with-traits"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
 		Eventually(IntegrationLogs(ns, "kb-with-traits"), TestTimeoutShort).Should(ContainSubstring("hello from test"))
diff --git a/e2e/common/misc/kamelet_binding_with_image_test.go b/e2e/common/misc/kamelet_binding_with_image_test.go
index 86dfdf799..77ddf9348 100644
--- a/e2e/common/misc/kamelet_binding_with_image_test.go
+++ b/e2e/common/misc/kamelet_binding_with_image_test.go
@@ -49,29 +49,22 @@ func TestPipeWithImage(t *testing.T) {
 		APIVersion: v1.SchemeGroupVersion.String(),
 	}
 
-	emptyMap := map[string]string{}
-
-	annotations1 := map[string]string{
-		"trait.camel.apache.org/container.image":      "docker.io/jmalloc/echo-server:0.3.2",
-		"trait.camel.apache.org/jvm.enabled":          "false",
-		"trait.camel.apache.org/kamelets.enabled":     "false",
-		"trait.camel.apache.org/dependencies.enabled": "false",
-		"test": "1",
-	}
-	annotations2 := map[string]string{
-		"trait.camel.apache.org/container.image":      "docker.io/jmalloc/echo-server:0.3.3",
-		"trait.camel.apache.org/jvm.enabled":          "false",
-		"trait.camel.apache.org/kamelets.enabled":     "false",
-		"trait.camel.apache.org/dependencies.enabled": "false",
-		"test": "2",
-	}
 	bindingID := "with-image-binding"
 
 	t.Run("run with initial image", func(t *testing.T) {
-		expectedImage := annotations1["trait.camel.apache.org/container.image"]
+		expectedImage := "docker.io/jmalloc/echo-server:0.3.2"
+
+		Expect(KamelBind(ns,
+			from.Name,
+			to.Name,
+			"--annotation", "trait.camel.apache.org/container.image="+expectedImage,
+			"--annotation", "trait.camel.apache.org/jvm.enabled=false",
+			"--annotation", "trait.camel.apache.org/kamelets.enabled=false",
+			"--annotation", "trait.camel.apache.org/dependencies.enabled=false",
+			"--annotation", "test=1",
+			"--name", bindingID,
+		).Execute()).To(Succeed())
 
-		Expect(BindKameletTo(ns, bindingID, annotations1, from, to, emptyMap, emptyMap)()).
-			To(Succeed())
 		Eventually(IntegrationGeneration(ns, bindingID)).
 			Should(gstruct.PointTo(BeNumerically("==", 1)))
 		Eventually(Integration(ns, bindingID)).Should(WithTransform(Annotations, And(
@@ -87,10 +80,18 @@ func TestPipeWithImage(t *testing.T) {
 	})
 
 	t.Run("run with new image", func(t *testing.T) {
-		expectedImage := annotations2["trait.camel.apache.org/container.image"]
-
-		Expect(BindKameletTo(ns, bindingID, annotations2, from, to, emptyMap, emptyMap)()).
-			To(Succeed())
+		expectedImage := "docker.io/jmalloc/echo-server:0.3.3"
+
+		Expect(KamelBind(ns,
+			from.Name,
+			to.Name,
+			"--annotation", "trait.camel.apache.org/container.image="+expectedImage,
+			"--annotation", "trait.camel.apache.org/jvm.enabled=false",
+			"--annotation", "trait.camel.apache.org/kamelets.enabled=false",
+			"--annotation", "trait.camel.apache.org/dependencies.enabled=false",
+			"--annotation", "test=2",
+			"--name", bindingID,
+		).Execute()).To(Succeed())
 		Eventually(IntegrationGeneration(ns, bindingID)).
 			Should(gstruct.PointTo(BeNumerically("==", 1)))
 		Eventually(Integration(ns, bindingID)).Should(WithTransform(Annotations, And(
diff --git a/e2e/common/traits/health_test.go b/e2e/common/traits/health_test.go
index fc15af7d1..fb73eab88 100644
--- a/e2e/common/traits/health_test.go
+++ b/e2e/common/traits/health_test.go
@@ -151,29 +151,23 @@ func TestHealthTrait(t *testing.T) {
 			APIVersion: camelv1.SchemeGroupVersion.String(),
 		}
 
-		fromParams := map[string]string{
-			"message": "Magicstring!",
-		}
-
 		to := corev1.ObjectReference{
 			Kind:       "Kamelet",
 			Name:       "my-own-log-sink",
 			APIVersion: camelv1.SchemeGroupVersion.String(),
 		}
 
-		toParams := map[string]string{
-			"loggerName": "binding",
-		}
-
-		annotations := map[string]string{
-			"trait.camel.apache.org/health.enabled":                        "true",
-			"trait.camel.apache.org/jolokia.enabled":                       "true",
-			"trait.camel.apache.org/jolokia.use-ssl-client-authentication": "false",
-			"trait.camel.apache.org/jolokia.protocol":                      "http",
-		}
-
-		Expect(BindKameletTo(ns, name, annotations, from, to, fromParams, toParams)()).
-			To(Succeed())
+		Expect(KamelBind(ns,
+			from.Name,
+			to.Name,
+			"-p", "source.message=Magicstring!",
+			"-p", "sink.loggerName=binding",
+			"--annotation", "trait.camel.apache.org/health.enabled=true",
+			"--annotation", "trait.camel.apache.org/jolokia.enabled=true",
+			"--annotation", "trait.camel.apache.org/jolokia.use-ssl-client-authentication=false",
+			"--annotation", "trait.camel.apache.org/jolokia.protocol=http",
+			"--name", name,
+		).Execute()).To(Succeed())
 
 		Eventually(IntegrationPodPhase(ns, name), TestTimeoutLong).Should(Equal(corev1.PodRunning))
 		Eventually(IntegrationPhase(ns, name), TestTimeoutShort).Should(Equal(v1.IntegrationPhaseRunning))
diff --git a/e2e/knative/kamelet_test.go b/e2e/knative/kamelet_test.go
index e2598b8a3..218b997d7 100644
--- a/e2e/knative/kamelet_test.go
+++ b/e2e/knative/kamelet_test.go
@@ -59,17 +59,20 @@ func TestKameletChange(t *testing.T) {
 	}
 
 	timerPipe := "timer-binding"
-	annotations := map[string]string{
-		"trait.camel.apache.org/health.enabled":                 "true",
-		"trait.camel.apache.org/health.readiness-initial-delay": "10",
-	}
 
 	// Create the Pipe
-	Expect(BindKameletTo(ns, timerPipe, annotations, from, to, map[string]string{"message": "message is Hello"}, map[string]string{})()).To(Succeed())
+	Expect(KamelBind(ns,
+		from.Name,
+		to.Name,
+		"-p", "source.message=message is Hello",
+		"--annotation", "trait.camel.apache.org/health.enabled=true",
+		"--annotation", "trait.camel.apache.org/health.readiness-initial-delay=10",
+		"--name", timerPipe,
+	).Execute()).To(Succeed())
 
 	Eventually(IntegrationPodPhase(ns, timerPipe), TestTimeoutLong).Should(Equal(corev1.PodRunning))
-	Eventually(IntegrationConditionStatus(ns, "timer-binding", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-	Eventually(IntegrationLogs(ns, "test-kamelet-display"), TestTimeoutShort).Should(ContainSubstring("message is Hello"))
+	Eventually(IntegrationConditionStatus(ns, timerPipe, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
+	Eventually(IntegrationLogs(ns, timerPipe), TestTimeoutShort).Should(ContainSubstring("message is Hello"))
 
 	Eventually(PipeCondition(ns, timerPipe, v1.PipeConditionReady), TestTimeoutMedium).Should(And(
 		WithTransform(PipeConditionStatusExtract, Equal(corev1.ConditionTrue)),
@@ -78,11 +81,18 @@ func TestKameletChange(t *testing.T) {
 	))
 
 	// Update the Pipe
-	Expect(BindKameletTo(ns, "timer-binding", annotations, from, to, map[string]string{"message": "message is Hi"}, map[string]string{})()).To(Succeed())
+	Expect(KamelBind(ns,
+		from.Name,
+		to.Name,
+		"-p", "source.message=message is Hi",
+		"--annotation", "trait.camel.apache.org/health.enabled=true",
+		"--annotation", "trait.camel.apache.org/health.readiness-initial-delay=10",
+		"--name", timerPipe,
+	).Execute()).To(Succeed())
 
-	Eventually(IntegrationPodPhase(ns, "timer-binding"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
-	Eventually(IntegrationConditionStatus(ns, "timer-binding", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-	Eventually(IntegrationLogs(ns, "test-kamelet-display"), TestTimeoutShort).Should(ContainSubstring("message is Hi"))
+	Eventually(IntegrationPodPhase(ns, timerPipe), TestTimeoutLong).Should(Equal(corev1.PodRunning))
+	Eventually(IntegrationConditionStatus(ns, timerPipe, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
+	Eventually(IntegrationLogs(ns, timerPipe), TestTimeoutShort).Should(ContainSubstring("message is Hi"))
 
 	Eventually(PipeCondition(ns, timerPipe, v1.PipeConditionReady), TestTimeoutMedium).
 		Should(And(
diff --git a/e2e/native/native_binding_test.go b/e2e/native/native_binding_test.go
index 8e6aca73a..8207e4d12 100644
--- a/e2e/native/native_binding_test.go
+++ b/e2e/native/native_binding_test.go
@@ -69,10 +69,13 @@ func TestNativeBinding(t *testing.T) {
 
 		t.Run("binding with native build", func(t *testing.T) {
 			bindingName := "native-binding"
-			Expect(BindKameletTo(ns, bindingName,
-				map[string]string{"trait.camel.apache.org/quarkus.package-type": "native"},
-				from, to,
-				map[string]string{"message": message}, map[string]string{})()).To(Succeed())
+			Expect(KamelBind(ns,
+				from.Name,
+				to.Name,
+				"-p", "source.message=message",
+				"--annotation", "trait.camel.apache.org/quarkus.package-type=native",
+				"--name", bindingName,
+			).Execute()).To(Succeed())
 
 			// ====================================
 			// !!! THE MOST TIME-CONSUMING PART !!!
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index 4377c64b8..fd07afc60 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -2345,40 +2345,6 @@ func CreateTimerKamelet(ns string, name string) func() error {
 	return CreateKamelet(ns, name, flow, props, nil)
 }
 
-// Deprecated:
-// Use KamelBind func instead
-func BindKameletTo(ns, name string, annotations map[string]string, from, to corev1.ObjectReference,
-	sourceProperties, sinkProperties map[string]string) func() error {
-	return BindKameletToWithErrorHandler(ns, name, annotations, from, to, sourceProperties, sinkProperties, nil)
-}
-
-// Deprecated:
-// Use KamelBind func instead
-func BindKameletToWithErrorHandler(ns, name string, annotations map[string]string, from, to corev1.ObjectReference,
-	sourceProperties, sinkProperties map[string]string, errorHandler map[string]interface{}) func() error {
-	return func() error {
-		kb := v1.NewPipe(ns, name)
-		kb.Annotations = annotations
-		kb.Spec = v1.PipeSpec{
-			Source: v1.Endpoint{
-				Ref:        &from,
-				Properties: asEndpointProperties(sourceProperties),
-			},
-			Sink: v1.Endpoint{
-				Ref:        &to,
-				Properties: asEndpointProperties(sinkProperties),
-			},
-		}
-		if errorHandler != nil {
-			kb.Spec.ErrorHandler = asErrorHandlerSpec(errorHandler)
-		}
-		_, err := kubernetes.ReplaceResource(TestContext, TestClient(), &kb)
-		return err
-	}
-}
-
-// Deprecated:
-// Use KamelBind func instead
 func asTemplate(source map[string]interface{}) *v1.Template {
 	bytes, err := json.Marshal(source)
 	if err != nil {
@@ -2389,34 +2355,6 @@ func asTemplate(source map[string]interface{}) *v1.Template {
 	}
 }
 
-// Deprecated:
-// Use KamelBind func instead
-func asErrorHandlerSpec(source map[string]interface{}) *v1.ErrorHandlerSpec {
-	bytes, err := json.Marshal(source)
-	if err != nil {
-		failTest(err)
-	}
-	return &v1.ErrorHandlerSpec{
-		RawMessage: bytes,
-	}
-}
-
-// Deprecated:
-// Use KamelBind func instead
-func asEndpointProperties(props map[string]string) *v1.EndpointProperties {
-	if props == nil {
-		return &v1.EndpointProperties{}
-	}
-
-	bytes, err := json.Marshal(props)
-	if err != nil {
-		failTest(err)
-	}
-	return &v1.EndpointProperties{
-		RawMessage: bytes,
-	}
-}
-
 // nolint: staticcheck
 func AsTraitConfiguration(props map[string]string) *traitv1.Configuration {
 	bytes, err := json.Marshal(props)
diff --git a/helm/camel-k/crds/crd-pipe.yaml b/helm/camel-k/crds/crd-pipe.yaml
index d1640f18e..103ac83fc 100644
--- a/helm/camel-k/crds/crd-pipe.yaml
+++ b/helm/camel-k/crds/crd-pipe.yaml
@@ -7788,176 +7788,6 @@ spec:
                         description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
                         type: string
                     type: object
-                  types:
-                    additionalProperties:
-                      description: 'EventTypeSpec represents a specification for an
-                        event type Deprecated: In favor of using DataTypeSpec'
-                      properties:
-                        mediaType:
-                          description: media type as expected for HTTP media types
-                            (ie, application/json)
-                          type: string
-                        schema:
-                          description: the expected schema for the event
-                          properties:
-                            $schema:
-                              description: JSONSchemaURL represents a schema url.
-                              type: string
-                            description:
-                              type: string
-                            example:
-                              description: 'JSON represents any valid JSON value.
-                                These types are supported: bool, int64, float64, string,
-                                []interface{}, map[string]interface{} and nil.'
-                              x-kubernetes-preserve-unknown-fields: true
-                            externalDocs:
-                              description: ExternalDocumentation allows referencing
-                                an external resource for extended documentation.
-                              properties:
-                                description:
-                                  type: string
-                                url:
-                                  type: string
-                              type: object
-                            id:
-                              type: string
-                            properties:
-                              additionalProperties:
-                                properties:
-                                  default:
-                                    description: default is a default value for undefined
-                                      object fields.
-                                    x-kubernetes-preserve-unknown-fields: true
-                                  deprecated:
-                                    type: boolean
-                                  description:
-                                    type: string
-                                  enum:
-                                    items:
-                                      description: 'JSON represents any valid JSON
-                                        value. These types are supported: bool, int64,
-                                        float64, string, []interface{}, map[string]interface{}
-                                        and nil.'
-                                      x-kubernetes-preserve-unknown-fields: true
-                                    type: array
-                                  example:
-                                    description: 'JSON represents any valid JSON value.
-                                      These types are supported: bool, int64, float64,
-                                      string, []interface{}, map[string]interface{}
-                                      and nil.'
-                                    x-kubernetes-preserve-unknown-fields: true
-                                  exclusiveMaximum:
-                                    type: boolean
-                                  exclusiveMinimum:
-                                    type: boolean
-                                  format:
-                                    description: "format is an OpenAPI v3 format string.
-                                      Unknown formats are ignored. The following formats
-                                      are validated: \n - bsonobjectid: a bson object
-                                      ID, i.e. a 24 characters hex string - uri: an
-                                      URI as parsed by Golang net/url.ParseRequestURI
-                                      - email: an email address as parsed by Golang
-                                      net/mail.ParseAddress - hostname: a valid representation
-                                      for an Internet host name, as defined by RFC
-                                      1034, section 3.1 [RFC1034]. - ipv4: an IPv4
-                                      IP as parsed by Golang net.ParseIP - ipv6: an
-                                      IPv6 IP as parsed by Golang net.ParseIP - cidr:
-                                      a CIDR as parsed by Golang net.ParseCIDR - mac:
-                                      a MAC address as parsed by Golang net.ParseMAC
-                                      - uuid: an UUID that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$
-                                      - uuid3: an UUID3 that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$
-                                      - uuid4: an UUID4 that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
-                                      - uuid5: an UUID5 that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
-                                      - isbn: an ISBN10 or ISBN13 number string like
-                                      \"0321751043\" or \"978-0321751041\" - isbn10:
-                                      an ISBN10 number string like \"0321751043\"
-                                      - isbn13: an ISBN13 number string like \"978-0321751041\"
-                                      - creditcard: a credit card number defined by
-                                      the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\\\d{3})\\\\d{11})$
-                                      with any non digit characters mixed in - ssn:
-                                      a U.S. social security number following the
-                                      regex ^\\\\d{3}[- ]?\\\\d{2}[- ]?\\\\d{4}$ -
-                                      hexcolor: an hexadecimal color code like \"#FFFFFF\"
-                                      following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
-                                      - rgbcolor: an RGB color code like rgb like
-                                      \"rgb(255,255,255)\" - byte: base64 encoded
-                                      binary data - password: any kind of string -
-                                      date: a date string like \"2006-01-02\" as defined
-                                      by full-date in RFC3339 - duration: a duration
-                                      string like \"22 ns\" as parsed by Golang time.ParseDuration
-                                      or compatible with Scala duration format - datetime:
-                                      a date time string like \"2014-12-15T19:30:20.000Z\"
-                                      as defined by date-time in RFC3339."
-                                    type: string
-                                  id:
-                                    type: string
-                                  maxItems:
-                                    format: int64
-                                    type: integer
-                                  maxLength:
-                                    format: int64
-                                    type: integer
-                                  maxProperties:
-                                    format: int64
-                                    type: integer
-                                  maximum:
-                                    description: A Number represents a JSON number
-                                      literal.
-                                    type: string
-                                  minItems:
-                                    format: int64
-                                    type: integer
-                                  minLength:
-                                    format: int64
-                                    type: integer
-                                  minProperties:
-                                    format: int64
-                                    type: integer
-                                  minimum:
-                                    description: A Number represents a JSON number
-                                      literal.
-                                    type: string
-                                  multipleOf:
-                                    description: A Number represents a JSON number
-                                      literal.
-                                    type: string
-                                  nullable:
-                                    type: boolean
-                                  pattern:
-                                    type: string
-                                  title:
-                                    type: string
-                                  type:
-                                    type: string
-                                  uniqueItems:
-                                    type: boolean
-                                  x-descriptors:
-                                    description: XDescriptors is a list of extended
-                                      properties that trigger a custom behavior in
-                                      external systems
-                                    items:
-                                      type: string
-                                    type: array
-                                type: object
-                              type: object
-                            required:
-                              items:
-                                type: string
-                              type: array
-                            title:
-                              type: string
-                            type:
-                              type: string
-                          type: object
-                      type: object
-                    description: 'Types defines the data type of the data produced/consumed
-                      by the endpoint and references a given data type specification.
-                      Deprecated: In favor of using DataTypes'
-                    type: object
                   uri:
                     description: URI can be used to specify the (Camel) endpoint explicitly
                     type: string
@@ -8023,176 +7853,6 @@ spec:
                         description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
                         type: string
                     type: object
-                  types:
-                    additionalProperties:
-                      description: 'EventTypeSpec represents a specification for an
-                        event type Deprecated: In favor of using DataTypeSpec'
-                      properties:
-                        mediaType:
-                          description: media type as expected for HTTP media types
-                            (ie, application/json)
-                          type: string
-                        schema:
-                          description: the expected schema for the event
-                          properties:
-                            $schema:
-                              description: JSONSchemaURL represents a schema url.
-                              type: string
-                            description:
-                              type: string
-                            example:
-                              description: 'JSON represents any valid JSON value.
-                                These types are supported: bool, int64, float64, string,
-                                []interface{}, map[string]interface{} and nil.'
-                              x-kubernetes-preserve-unknown-fields: true
-                            externalDocs:
-                              description: ExternalDocumentation allows referencing
-                                an external resource for extended documentation.
-                              properties:
-                                description:
-                                  type: string
-                                url:
-                                  type: string
-                              type: object
-                            id:
-                              type: string
-                            properties:
-                              additionalProperties:
-                                properties:
-                                  default:
-                                    description: default is a default value for undefined
-                                      object fields.
-                                    x-kubernetes-preserve-unknown-fields: true
-                                  deprecated:
-                                    type: boolean
-                                  description:
-                                    type: string
-                                  enum:
-                                    items:
-                                      description: 'JSON represents any valid JSON
-                                        value. These types are supported: bool, int64,
-                                        float64, string, []interface{}, map[string]interface{}
-                                        and nil.'
-                                      x-kubernetes-preserve-unknown-fields: true
-                                    type: array
-                                  example:
-                                    description: 'JSON represents any valid JSON value.
-                                      These types are supported: bool, int64, float64,
-                                      string, []interface{}, map[string]interface{}
-                                      and nil.'
-                                    x-kubernetes-preserve-unknown-fields: true
-                                  exclusiveMaximum:
-                                    type: boolean
-                                  exclusiveMinimum:
-                                    type: boolean
-                                  format:
-                                    description: "format is an OpenAPI v3 format string.
-                                      Unknown formats are ignored. The following formats
-                                      are validated: \n - bsonobjectid: a bson object
-                                      ID, i.e. a 24 characters hex string - uri: an
-                                      URI as parsed by Golang net/url.ParseRequestURI
-                                      - email: an email address as parsed by Golang
-                                      net/mail.ParseAddress - hostname: a valid representation
-                                      for an Internet host name, as defined by RFC
-                                      1034, section 3.1 [RFC1034]. - ipv4: an IPv4
-                                      IP as parsed by Golang net.ParseIP - ipv6: an
-                                      IPv6 IP as parsed by Golang net.ParseIP - cidr:
-                                      a CIDR as parsed by Golang net.ParseCIDR - mac:
-                                      a MAC address as parsed by Golang net.ParseMAC
-                                      - uuid: an UUID that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$
-                                      - uuid3: an UUID3 that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$
-                                      - uuid4: an UUID4 that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
-                                      - uuid5: an UUID5 that allows uppercase defined
-                                      by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
-                                      - isbn: an ISBN10 or ISBN13 number string like
-                                      \"0321751043\" or \"978-0321751041\" - isbn10:
-                                      an ISBN10 number string like \"0321751043\"
-                                      - isbn13: an ISBN13 number string like \"978-0321751041\"
-                                      - creditcard: a credit card number defined by
-                                      the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\\\d{3})\\\\d{11})$
-                                      with any non digit characters mixed in - ssn:
-                                      a U.S. social security number following the
-                                      regex ^\\\\d{3}[- ]?\\\\d{2}[- ]?\\\\d{4}$ -
-                                      hexcolor: an hexadecimal color code like \"#FFFFFF\"
-                                      following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
-                                      - rgbcolor: an RGB color code like rgb like
-                                      \"rgb(255,255,255)\" - byte: base64 encoded
-                                      binary data - password: any kind of string -
-                                      date: a date string like \"2006-01-02\" as defined
-                                      by full-date in RFC3339 - duration: a duration
-                                      string like \"22 ns\" as parsed by Golang time.ParseDuration
-                                      or compatible with Scala duration format - datetime:
-                                      a date time string like \"2014-12-15T19:30:20.000Z\"
-                                      as defined by date-time in RFC3339."
-                                    type: string
-                                  id:
-                                    type: string
-                                  maxItems:
-                                    format: int64
-                                    type: integer
-                                  maxLength:
-                                    format: int64
-                                    type: integer
-                                  maxProperties:
-                                    format: int64
-                                    type: integer
-                                  maximum:
-                                    description: A Number represents a JSON number
-                                      literal.
-                                    type: string
-                                  minItems:
-                                    format: int64
-                                    type: integer
-                                  minLength:
-                                    format: int64
-                                    type: integer
-                                  minProperties:
-                                    format: int64
-                                    type: integer
-                                  minimum:
-                                    description: A Number represents a JSON number
-                                      literal.
-                                    type: string
-                                  multipleOf:
-                                    description: A Number represents a JSON number
-                                      literal.
-                                    type: string
-                                  nullable:
-                                    type: boolean
-                                  pattern:
-                                    type: string
-                                  title:
-                                    type: string
-                                  type:
-                                    type: string
-                                  uniqueItems:
-                                    type: boolean
-                                  x-descriptors:
-                                    description: XDescriptors is a list of extended
-                                      properties that trigger a custom behavior in
-                                      external systems
-                                    items:
-                                      type: string
-                                    type: array
-                                type: object
-                              type: object
-                            required:
-                              items:
-                                type: string
-                              type: array
-                            title:
-                              type: string
-                            type:
-                              type: string
-                          type: object
-                      type: object
-                    description: 'Types defines the data type of the data produced/consumed
-                      by the endpoint and references a given data type specification.
-                      Deprecated: In favor of using DataTypes'
-                    type: object
                   uri:
                     description: URI can be used to specify the (Camel) endpoint explicitly
                     type: string
@@ -8262,178 +7922,6 @@ spec:
                           description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
                           type: string
                       type: object
-                    types:
-                      additionalProperties:
-                        description: 'EventTypeSpec represents a specification for
-                          an event type Deprecated: In favor of using DataTypeSpec'
-                        properties:
-                          mediaType:
-                            description: media type as expected for HTTP media types
-                              (ie, application/json)
-                            type: string
-                          schema:
-                            description: the expected schema for the event
-                            properties:
-                              $schema:
-                                description: JSONSchemaURL represents a schema url.
-                                type: string
-                              description:
-                                type: string
-                              example:
-                                description: 'JSON represents any valid JSON value.
-                                  These types are supported: bool, int64, float64,
-                                  string, []interface{}, map[string]interface{} and
-                                  nil.'
-                                x-kubernetes-preserve-unknown-fields: true
-                              externalDocs:
-                                description: ExternalDocumentation allows referencing
-                                  an external resource for extended documentation.
-                                properties:
-                                  description:
-                                    type: string
-                                  url:
-                                    type: string
-                                type: object
-                              id:
-                                type: string
-                              properties:
-                                additionalProperties:
-                                  properties:
-                                    default:
-                                      description: default is a default value for
-                                        undefined object fields.
-                                      x-kubernetes-preserve-unknown-fields: true
-                                    deprecated:
-                                      type: boolean
-                                    description:
-                                      type: string
-                                    enum:
-                                      items:
-                                        description: 'JSON represents any valid JSON
-                                          value. These types are supported: bool,
-                                          int64, float64, string, []interface{}, map[string]interface{}
-                                          and nil.'
-                                        x-kubernetes-preserve-unknown-fields: true
-                                      type: array
-                                    example:
-                                      description: 'JSON represents any valid JSON
-                                        value. These types are supported: bool, int64,
-                                        float64, string, []interface{}, map[string]interface{}
-                                        and nil.'
-                                      x-kubernetes-preserve-unknown-fields: true
-                                    exclusiveMaximum:
-                                      type: boolean
-                                    exclusiveMinimum:
-                                      type: boolean
-                                    format:
-                                      description: "format is an OpenAPI v3 format
-                                        string. Unknown formats are ignored. The following
-                                        formats are validated: \n - bsonobjectid:
-                                        a bson object ID, i.e. a 24 characters hex
-                                        string - uri: an URI as parsed by Golang net/url.ParseRequestURI
-                                        - email: an email address as parsed by Golang
-                                        net/mail.ParseAddress - hostname: a valid
-                                        representation for an Internet host name,
-                                        as defined by RFC 1034, section 3.1 [RFC1034].
-                                        - ipv4: an IPv4 IP as parsed by Golang net.ParseIP
-                                        - ipv6: an IPv6 IP as parsed by Golang net.ParseIP
-                                        - cidr: a CIDR as parsed by Golang net.ParseCIDR
-                                        - mac: a MAC address as parsed by Golang net.ParseMAC
-                                        - uuid: an UUID that allows uppercase defined
-                                        by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$
-                                        - uuid3: an UUID3 that allows uppercase defined
-                                        by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$
-                                        - uuid4: an UUID4 that allows uppercase defined
-                                        by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
-                                        - uuid5: an UUID5 that allows uppercase defined
-                                        by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
-                                        - isbn: an ISBN10 or ISBN13 number string
-                                        like \"0321751043\" or \"978-0321751041\"
-                                        - isbn10: an ISBN10 number string like \"0321751043\"
-                                        - isbn13: an ISBN13 number string like \"978-0321751041\"
-                                        - creditcard: a credit card number defined
-                                        by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\\\d{3})\\\\d{11})$
-                                        with any non digit characters mixed in - ssn:
-                                        a U.S. social security number following the
-                                        regex ^\\\\d{3}[- ]?\\\\d{2}[- ]?\\\\d{4}$
-                                        - hexcolor: an hexadecimal color code like
-                                        \"#FFFFFF\" following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
-                                        - rgbcolor: an RGB color code like rgb like
-                                        \"rgb(255,255,255)\" - byte: base64 encoded
-                                        binary data - password: any kind of string
-                                        - date: a date string like \"2006-01-02\"
-                                        as defined by full-date in RFC3339 - duration:
-                                        a duration string like \"22 ns\" as parsed
-                                        by Golang time.ParseDuration or compatible
-                                        with Scala duration format - datetime: a date
-                                        time string like \"2014-12-15T19:30:20.000Z\"
-                                        as defined by date-time in RFC3339."
-                                      type: string
-                                    id:
-                                      type: string
-                                    maxItems:
-                                      format: int64
-                                      type: integer
-                                    maxLength:
-                                      format: int64
-                                      type: integer
-                                    maxProperties:
-                                      format: int64
-                                      type: integer
-                                    maximum:
-                                      description: A Number represents a JSON number
-                                        literal.
-                                      type: string
-                                    minItems:
-                                      format: int64
-                                      type: integer
-                                    minLength:
-                                      format: int64
-                                      type: integer
-                                    minProperties:
-                                      format: int64
-                                      type: integer
-                                    minimum:
-                                      description: A Number represents a JSON number
-                                        literal.
-                                      type: string
-                                    multipleOf:
-                                      description: A Number represents a JSON number
-                                        literal.
-                                      type: string
-                                    nullable:
-                                      type: boolean
-                                    pattern:
-                                      type: string
-                                    title:
-                                      type: string
-                                    type:
-                                      type: string
-                                    uniqueItems:
-                                      type: boolean
-                                    x-descriptors:
-                                      description: XDescriptors is a list of extended
-                                        properties that trigger a custom behavior
-                                        in external systems
-                                      items:
-                                        type: string
-                                      type: array
-                                  type: object
-                                type: object
-                              required:
-                                items:
-                                  type: string
-                                type: array
-                              title:
-                                type: string
-                              type:
-                                type: string
-                            type: object
-                        type: object
-                      description: 'Types defines the data type of the data produced/consumed
-                        by the endpoint and references a given data type specification.
-                        Deprecated: In favor of using DataTypes'
-                      type: object
                     uri:
                       description: URI can be used to specify the (Camel) endpoint
                         explicitly
diff --git a/pkg/apis/camel/v1/common_types.go b/pkg/apis/camel/v1/common_types.go
index 52978eb47..4e25c9c7e 100644
--- a/pkg/apis/camel/v1/common_types.go
+++ b/pkg/apis/camel/v1/common_types.go
@@ -335,29 +335,6 @@ const (
 	RuntimeProviderQuarkus RuntimeProvider = "quarkus"
 )
 
-// ResourceSpec represent an attached resource which will be materialized as a file on the running `Pod`
-// TODO: we should deprecate in future releases in favour of mount, openapi or camel traits
-type ResourceSpec struct {
-	// the content of the resource
-	DataSpec `json:",inline"`
-	// the kind of data to expect
-	Type ResourceType `json:"type,omitempty"`
-	// the mount path on destination `Pod`
-	MountPath string `json:"mountPath,omitempty"`
-}
-
-// ResourceType defines a kind of resource
-type ResourceType string
-
-const (
-	// ResourceTypeData represents a generic data resource (text or binary)
-	ResourceTypeData ResourceType = "data"
-	// ResourceTypeConfig represents a configuration resource (text only)
-	ResourceTypeConfig ResourceType = "config"
-	// ResourceTypeOpenAPI represents an OpenAPI specification resource
-	ResourceTypeOpenAPI ResourceType = "openapi"
-)
-
 // SourceSpec defines the configuration for one or more routes to be executed in a certain Camel DSL language
 type SourceSpec struct {
 	// contains configuration related to the source code
diff --git a/pkg/apis/camel/v1/integration_types_support.go b/pkg/apis/camel/v1/integration_types_support.go
index b86319ae6..d74145b7e 100644
--- a/pkg/apis/camel/v1/integration_types_support.go
+++ b/pkg/apis/camel/v1/integration_types_support.go
@@ -192,16 +192,6 @@ func NewSourceSpec(name string, content string, language Language) SourceSpec {
 	}
 }
 
-func NewResourceSpec(name string, content string, destination string, resourceType ResourceType) ResourceSpec {
-	return ResourceSpec{
-		DataSpec: DataSpec{
-			Name:    name,
-			Content: content,
-		},
-		Type: resourceType,
-	}
-}
-
 // InferLanguage returns the language of the source or discovers it from file extension if not set
 func (in *SourceSpec) InferLanguage() Language {
 	if in.Language != "" {
diff --git a/pkg/apis/camel/v1/pipe_types.go b/pkg/apis/camel/v1/pipe_types.go
index b6112c63e..03498586e 100644
--- a/pkg/apis/camel/v1/pipe_types.go
+++ b/pkg/apis/camel/v1/pipe_types.go
@@ -69,9 +69,6 @@ type Endpoint struct {
 	URI *string `json:"uri,omitempty"`
 	// Properties are a key value representation of endpoint properties
 	Properties *EndpointProperties `json:"properties,omitempty"`
-	// Types defines the data type of the data produced/consumed by the endpoint and references a given data type specification.
-	// Deprecated: In favor of using DataTypes
-	Types map[TypeSlot]EventTypeSpec `json:"types,omitempty"`
 	// DataTypes defines the data type of the data produced/consumed by the endpoint and references a given data type specification.
 	DataTypes map[TypeSlot]DataTypeReference `json:"dataTypes,omitempty"`
 }
diff --git a/pkg/apis/camel/v1/zz_generated.deepcopy.go b/pkg/apis/camel/v1/zz_generated.deepcopy.go
index d2a72a692..cbc0897b7 100644
--- a/pkg/apis/camel/v1/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1/zz_generated.deepcopy.go
@@ -705,13 +705,6 @@ func (in *Endpoint) DeepCopyInto(out *Endpoint) {
 		*out = new(EndpointProperties)
 		(*in).DeepCopyInto(*out)
 	}
-	if in.Types != nil {
-		in, out := &in.Types, &out.Types
-		*out = make(map[TypeSlot]EventTypeSpec, len(*in))
-		for key, val := range *in {
-			(*out)[key] = *val.DeepCopy()
-		}
-	}
 	if in.DataTypes != nil {
 		in, out := &in.DataTypes, &out.DataTypes
 		*out = make(map[TypeSlot]DataTypeReference, len(*in))
@@ -2400,22 +2393,6 @@ func (in *RepositoryPolicy) DeepCopy() *RepositoryPolicy {
 	return out
 }
 
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec) {
-	*out = *in
-	in.DataSpec.DeepCopyInto(&out.DataSpec)
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
-func (in *ResourceSpec) DeepCopy() *ResourceSpec {
-	if in == nil {
-		return nil
-	}
-	out := new(ResourceSpec)
-	in.DeepCopyInto(out)
-	return out
-}
-
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *RuntimeSpec) DeepCopyInto(out *RuntimeSpec) {
 	*out = *in
diff --git a/pkg/client/camel/applyconfiguration/camel/v1/endpoint.go b/pkg/client/camel/applyconfiguration/camel/v1/endpoint.go
index 1cfd8b744..20c602a76 100644
--- a/pkg/client/camel/applyconfiguration/camel/v1/endpoint.go
+++ b/pkg/client/camel/applyconfiguration/camel/v1/endpoint.go
@@ -30,7 +30,6 @@ type EndpointApplyConfiguration struct {
 	Ref        *v1.ObjectReference                                          `json:"ref,omitempty"`
 	URI        *string                                                      `json:"uri,omitempty"`
 	Properties *EndpointPropertiesApplyConfiguration                        `json:"properties,omitempty"`
-	Types      map[apiscamelv1.TypeSlot]EventTypeSpecApplyConfiguration     `json:"types,omitempty"`
 	DataTypes  map[apiscamelv1.TypeSlot]DataTypeReferenceApplyConfiguration `json:"dataTypes,omitempty"`
 }
 
@@ -64,20 +63,6 @@ func (b *EndpointApplyConfiguration) WithProperties(value *EndpointPropertiesApp
 	return b
 }
 
-// WithTypes puts the entries into the Types field in the declarative configuration
-// and returns the receiver, so that objects can be build by chaining "With" function invocations.
-// If called multiple times, the entries provided by each call will be put on the Types field,
-// overwriting an existing map entries in Types field with the same key.
-func (b *EndpointApplyConfiguration) WithTypes(entries map[apiscamelv1.TypeSlot]EventTypeSpecApplyConfiguration) *EndpointApplyConfiguration {
-	if b.Types == nil && len(entries) > 0 {
-		b.Types = make(map[apiscamelv1.TypeSlot]EventTypeSpecApplyConfiguration, len(entries))
-	}
-	for k, v := range entries {
-		b.Types[k] = v
-	}
-	return b
-}
-
 // WithDataTypes puts the entries into the DataTypes field in the declarative configuration
 // and returns the receiver, so that objects can be build by chaining "With" function invocations.
 // If called multiple times, the entries provided by each call will be put on the DataTypes field,
diff --git a/pkg/cmd/init.go b/pkg/cmd/init.go
deleted file mode 100644
index 9c41df9b6..000000000
--- a/pkg/cmd/init.go
+++ /dev/null
@@ -1,124 +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"
-	"os"
-	"path/filepath"
-	"strings"
-	"text/template"
-
-	"github.com/apache/camel-k/v2/pkg/util"
-
-	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
-	"github.com/apache/camel-k/v2/pkg/resources"
-	"github.com/spf13/cobra"
-)
-
-func newCmdInit(rootCmdOptions *RootCmdOptions) (*cobra.Command, *initCmdOptions) {
-	options := initCmdOptions{
-		RootCmdOptions: rootCmdOptions,
-	}
-	cmd := cobra.Command{
-		Use:        "init [flags] IntegrationFile.java",
-		Short:      "Initialize empty Camel K files",
-		Long:       `Initialize empty Camel K integrations and other resources.`,
-		Deprecated: "consider using Camel JBang instead (https://camel.apache.org/manual/camel-jbang.html)",
-		PreRunE:    decode(&options),
-		RunE: func(cmd *cobra.Command, args []string) error {
-			if err := options.validate(cmd, args); err != nil {
-				return err
-			}
-			if err := options.init(cmd, args); err != nil {
-				return err
-			}
-			return nil
-		},
-		Annotations: map[string]string{
-			offlineCommandLabel: "true",
-		},
-	}
-
-	return &cmd, &options
-}
-
-type initCmdOptions struct {
-	*RootCmdOptions
-}
-
-func (o *initCmdOptions) validate(_ *cobra.Command, args []string) error {
-	if len(args) != 1 {
-		return fmt.Errorf("init expects exactly 1 argument, received %d", len(args))
-	}
-
-	if fileName := args[0]; o.extractLanguage(fileName) == nil {
-		return fmt.Errorf("unsupported file type: %s", fileName)
-	}
-
-	return nil
-}
-
-func (o *initCmdOptions) init(_ *cobra.Command, args []string) error {
-	fileName := args[0]
-	language := o.extractLanguage(fileName)
-	return o.writeFromTemplate(*language, fileName)
-}
-
-func (o *initCmdOptions) writeFromTemplate(language v1.Language, fileName string) error {
-	simpleName := filepath.Base(fileName)
-	if idx := strings.Index(simpleName, "."); idx >= 0 {
-		simpleName = simpleName[:idx]
-	}
-
-	type TemplateParameters struct {
-		Name string
-	}
-	params := TemplateParameters{
-		Name: simpleName,
-	}
-
-	rawData, err := resources.ResourceAsString(fmt.Sprintf("/templates/%s.tmpl", language))
-	if err != nil {
-		return err
-	}
-	if rawData == "" {
-		return fmt.Errorf("cannot find template for language %s", string(language))
-	}
-	tmpl, err := template.New(string(language)).Parse(rawData)
-	if err != nil {
-		return err
-	}
-
-	return util.WithFile(fileName, os.O_RDWR|os.O_CREATE, 0o644, func(file *os.File) error {
-		return tmpl.Execute(file, params)
-	})
-}
-
-func (o *initCmdOptions) extractLanguage(fileName string) *v1.Language {
-	if strings.HasSuffix(fileName, ".kamelet.yaml") {
-		language := v1.LanguageKamelet
-		return &language
-	}
-	for _, l := range v1.Languages {
-		if strings.HasSuffix(fileName, fmt.Sprintf(".%s", string(l))) {
-			return &l
-		}
-	}
-	return nil
-}
diff --git a/pkg/cmd/install.go b/pkg/cmd/install.go
index faafc2364..26fbcffa3 100644
--- a/pkg/cmd/install.go
+++ b/pkg/cmd/install.go
@@ -24,7 +24,6 @@ import (
 	"io"
 	"os"
 	"regexp"
-	"strconv"
 	"strings"
 	"time"
 
@@ -113,9 +112,6 @@ func newCmdInstall(rootCmdOptions *RootCmdOptions) (*cobra.Command, *installCmdO
 	cmd.Flags().String("build-timeout", "", "Set how long the build process can last")
 	cmd.Flags().String("trait-profile", "", "The profile to use for traits")
 
-	// Kaniko
-	cmd.Flags().Bool("kaniko-build-cache", false, "To enable or disable the Kaniko cache. Deprecated use --build-publish-strategy-option KanikoBuildCacheEnabled=true instead")
-
 	// OLM
 	cmd.Flags().Bool("olm", true, "Try to install everything via OLM (Operator Lifecycle Manager) if available")
 	cmd.Flags().String("olm-operator-name", "", "Name of the Camel K operator in the OLM source or marketplace")
@@ -166,16 +162,14 @@ func newCmdInstall(rootCmdOptions *RootCmdOptions) (*cobra.Command, *installCmdO
 
 type installCmdOptions struct {
 	*RootCmdOptions
-	Wait                     bool `mapstructure:"wait"`
-	ClusterSetupOnly         bool `mapstructure:"cluster-setup"`
-	SkipOperatorSetup        bool `mapstructure:"skip-operator-setup"`
-	SkipClusterSetup         bool `mapstructure:"skip-cluster-setup"`
-	SkipRegistrySetup        bool `mapstructure:"skip-registry-setup"`
-	SkipDefaultKameletsSetup bool `mapstructure:"skip-default-kamelets-setup"`
-	ExampleSetup             bool `mapstructure:"example"`
-	Global                   bool `mapstructure:"global"`
-	// Deprecated: use the BuildPublishStrategyOption "KanikoBuildCacheEnabled" instead
-	KanikoBuildCache            bool `mapstructure:"kaniko-build-cache"`
+	Wait                        bool `mapstructure:"wait"`
+	ClusterSetupOnly            bool `mapstructure:"cluster-setup"`
+	SkipOperatorSetup           bool `mapstructure:"skip-operator-setup"`
+	SkipClusterSetup            bool `mapstructure:"skip-cluster-setup"`
+	SkipRegistrySetup           bool `mapstructure:"skip-registry-setup"`
+	SkipDefaultKameletsSetup    bool `mapstructure:"skip-default-kamelets-setup"`
+	ExampleSetup                bool `mapstructure:"example"`
+	Global                      bool `mapstructure:"global"`
 	Save                        bool `mapstructure:"save" kamel:"omitsave"`
 	Force                       bool `mapstructure:"force"`
 	Olm                         bool `mapstructure:"olm"`
@@ -590,10 +584,6 @@ func (o *installCmdOptions) setupIntegrationPlatform(
 			}
 		}
 	}
-	if platform.Spec.Build.PublishStrategy == v1.IntegrationPlatformBuildPublishStrategyKaniko && cmd.Flags().Lookup("kaniko-build-cache").Changed {
-		fmt.Fprintln(cmd.OutOrStdout(), "Warn: the flag --kaniko-build-cache is deprecated, use --build-publish-strategy-option KanikoBuildCacheEnabled=true instead")
-		platform.Spec.Build.AddOption(builder.KanikoBuildCacheEnabled, strconv.FormatBool(o.KanikoBuildCache))
-	}
 	if len(o.BuildPublishStrategyOptions) > 0 {
 		if err = o.addBuildPublishStrategyOptions(&platform.Spec.Build); err != nil {
 			return nil, err
diff --git a/pkg/cmd/install_test.go b/pkg/cmd/install_test.go
index 0c53032a2..a34fdef83 100644
--- a/pkg/cmd/install_test.go
+++ b/pkg/cmd/install_test.go
@@ -66,7 +66,6 @@ func TestInstallNoFlag(t *testing.T) {
 	assert.Equal(t, false, installCmdOptions.SkipDefaultKameletsSetup)
 	assert.Equal(t, false, installCmdOptions.ExampleSetup)
 	assert.Equal(t, false, installCmdOptions.Global)
-	assert.Equal(t, false, installCmdOptions.KanikoBuildCache)
 	assert.Equal(t, false, installCmdOptions.Save)
 	assert.Equal(t, false, installCmdOptions.Force)
 	assert.Equal(t, true, installCmdOptions.Olm)
@@ -157,13 +156,6 @@ func TestInstallHealthFlag(t *testing.T) {
 	assert.Equal(t, int32(7777), installCmdOptions.HealthPort)
 }
 
-func TestInstallKanikoBuildCacheFlag(t *testing.T) {
-	installCmdOptions, rootCmd, _ := initializeInstallCmdOptions(t)
-	_, err := test.ExecuteCommand(rootCmd, cmdInstall, "--kaniko-build-cache")
-	assert.Nil(t, err)
-	assert.Equal(t, true, installCmdOptions.KanikoBuildCache)
-}
-
 func TestInstallBuildPublishStrategyOptions(t *testing.T) {
 	installCmdOptions, rootCmd, _ := initializeInstallCmdOptions(t)
 	_, err := test.ExecuteCommand(rootCmd, cmdInstall, "--build-publish-strategy-option", "foo1=bar1", "--build-publish-strategy-option", "foo2=bar2")
diff --git a/pkg/cmd/local.go b/pkg/cmd/local.go
deleted file mode 100644
index 4868defdf..000000000
--- a/pkg/cmd/local.go
+++ /dev/null
@@ -1,96 +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"
-
-	"github.com/apache/camel-k/v2/pkg/util/camel"
-	"github.com/spf13/cobra"
-)
-
-// Usage descritions of common flags that are shared across some of the subcommands.
-const (
-	usageImage                = `Full path to integration image including registry, e.g. "docker.io/user/app"`
-	usageIntegrationDirectory = "Directory to hold local integration files"
-	usagePropertyFile         = "Add a property file to the integration"
-	usageProperty             = "Add a Camel property to the integration"
-)
-
-// newCmdLocal -- Add local kamel subcommand with several other subcommands of its own.
-func newCmdLocal(rootCmdOptions *RootCmdOptions) (*cobra.Command, *LocalCmdOptions) {
-	options := LocalCmdOptions{
-		RootCmdOptions: rootCmdOptions,
-	}
-
-	cmd := cobra.Command{
-		Use:               "local [sub-command]",
-		Short:             "Perform integration actions locally.",
-		Long:              `Perform integration actions locally given a set of input integration files.`,
-		Deprecated:        "consider using Camel JBang instead (https://camel.apache.org/manual/camel-jbang.html)",
-		PersistentPreRunE: options.persistentPreRun,
-		Annotations: map[string]string{
-			offlineCommandLabel: "true",
-		},
-	}
-
-	cmd.PersistentFlags().StringArrayVarP(&options.Dependencies, "dependency", "d", nil, usageDependency)
-	cmd.PersistentFlags().StringArrayVar(&options.MavenRepositories, "maven-repository", nil,
-		"Use a maven repository")
-
-	// hidden flags for compatibility with kamel run
-	cmd.PersistentFlags().StringArrayVarP(&options.Traits, "trait", "t", nil, "")
-	if err := cmd.PersistentFlags().MarkHidden("trait"); err != nil {
-		fmt.Fprintln(cmd.ErrOrStderr(), err.Error())
-	}
-
-	// completion support
-	configureKnownCompletions(&cmd)
-
-	cmd.AddCommand(cmdOnly(newCmdLocalBuild(&options)))
-	cmd.AddCommand(cmdOnly(newCmdLocalInspect(&options)))
-	cmd.AddCommand(cmdOnly(newCmdLocalRun(&options)))
-
-	return &cmd, &options
-}
-
-type LocalCmdOptions struct {
-	*RootCmdOptions
-	Dependencies      []string `mapstructure:"dependencies"`
-	MavenRepositories []string `mapstructure:"maven-repositories"`
-	Traits            []string `mapstructure:"traits"`
-}
-
-func (o *LocalCmdOptions) persistentPreRun(cmd *cobra.Command, args []string) error {
-	// pre-process dependencies
-	for i, dependency := range o.Dependencies {
-		o.Dependencies[i] = camel.NormalizeDependency(dependency)
-	}
-
-	// validate traits
-	warnTraitUsages(cmd, o.Traits)
-
-	return nil
-}
-
-func warnTraitUsages(cmd *cobra.Command, traits []string) {
-	if len(traits) > 0 {
-		fmt.Fprintf(cmd.ErrOrStderr(),
-			"Warning: traits are specified but don't take effect for local run: %v\n", traits)
-	}
-}
diff --git a/pkg/cmd/local/container.go b/pkg/cmd/local/container.go
deleted file mode 100644
index 12ab06b93..000000000
--- a/pkg/cmd/local/container.go
+++ /dev/null
@@ -1,347 +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 local
-
-import (
-	"context"
-	"errors"
-	"fmt"
-	"io"
-	"os"
-	"os/exec"
-	"os/signal"
-	"strings"
-	"syscall"
-
-	"github.com/apache/camel-k/v2/pkg/util"
-	"github.com/apache/camel-k/v2/pkg/util/docker"
-)
-
-// Local Docker file system management functions.
-
-// CreateDockerBaseWorkingDirectory creates local docker base directory.
-func CreateDockerBaseWorkingDirectory() error {
-	temporaryDirectory, err := os.MkdirTemp(os.TempDir(), "docker-base-")
-	if err != nil {
-		return err
-	}
-
-	// Set the Docker base directory to the default value.
-	docker.BaseWorkingDirectory = temporaryDirectory
-
-	return nil
-}
-
-// DeleteDockerBaseWorkingDirectory removes directory used for computing the base dependencies.
-func DeleteDockerBaseWorkingDirectory() error {
-	return os.RemoveAll(docker.BaseWorkingDirectory)
-}
-
-// CreateDockerWorkingDirectory creates local docker directory.
-func CreateDockerWorkingDirectory() error {
-	temporaryDirectory, err := os.MkdirTemp(os.TempDir(), "docker-")
-	if err != nil {
-		return err
-	}
-
-	// Set the Docker base directory to the default value.
-	docker.IntegrationWorkingDirectory = temporaryDirectory
-
-	return nil
-}
-
-// DeleteDockerWorkingDirectory removes directory used for computing the integration dependencies.
-func DeleteDockerWorkingDirectory() error {
-	return os.RemoveAll(docker.IntegrationWorkingDirectory)
-}
-
-func SetDockerNetworkName(networkName string) {
-	if networkName != "" {
-		docker.NetworkName = networkName
-	}
-}
-
-func SetDockerEnvVars(envVars []string) {
-	if len(envVars) > 0 {
-		util.CLIEnvVars = envVars
-	}
-}
-
-func createAndBuildBaseImage(ctx context.Context, stdout, stderr io.Writer) error {
-	// This ensures the Dockerfile for the base image will not end up in an undesired location.
-	if docker.BaseWorkingDirectory == "" {
-		return errors.New("base directory that holds the base image Dockerfile has not been set correctly")
-	}
-
-	// Create the base image Docker file.
-	if err := docker.CreateBaseImageDockerFile(); err != nil {
-		return err
-	}
-
-	return buildBaseImage(ctx, stdout, stderr)
-}
-
-func buildBaseImage(ctx context.Context, stdout, stderr io.Writer) error {
-	// Get the Docker command arguments for building the base image and create the command.
-	args := docker.BuildBaseImageArgs()
-	cmd := exec.CommandContext(ctx, "docker", args...)
-
-	// Set stdout and stderr.
-	cmd.Stdout = stdout
-	cmd.Stderr = stderr
-
-	// Output executed command.
-	fmt.Fprintln(cmd.Stdout, "Executing:", strings.Join(cmd.Args, " "))
-
-	// Run the command.
-	if err := cmd.Run(); err != nil {
-		return fmt.Errorf("base image containerization did not run successfully: %w", err)
-	}
-
-	return nil
-}
-
-func setupDockerRegistry(containerRegistry string, image string, justBaseImage bool) error {
-	docker.RegistryName = containerRegistry
-	// If we build a normal image, i.e. not the base image, we need to parse
-	// the location where images will be pushed.
-	if !justBaseImage {
-		registryName, err := docker.ExtractRegistryName(image)
-		if err != nil {
-			return err
-		}
-		docker.RegistryName = registryName
-	}
-
-	return nil
-}
-
-func CreateAndBuildIntegrationImage(ctx context.Context, containerRegistry string, justBaseImage bool, image string,
-	propertyFiles []string, dependencies []string, routes []string, startsFromLocalFolder bool,
-	stdout, stderr io.Writer) error {
-	if err := setupDockerRegistry(containerRegistry, image, justBaseImage); err != nil {
-		return err
-	}
-
-	// Create the Dockerfile and build the base image.
-	if err := createAndBuildBaseImage(ctx, stdout, stderr); err != nil {
-		return err
-	}
-
-	if justBaseImage {
-		return nil
-	}
-
-	if docker.IntegrationWorkingDirectory == "" {
-		return errors.New("integration directory that holds the image Dockerfile has not been set correctly")
-	}
-
-	// Create integration image if integration files were provided.
-	// Copy dependencies to a dependencies folder under a local directory.
-	if err := updateIntegrationDependencies(dependencies); err != nil {
-		return err
-	}
-
-	// Copy routes to a routes folder under a local directory.
-	if err := updateIntegrationRoutes(routes); err != nil {
-		return err
-	}
-
-	// Copy quarkus files in maven subdirectory
-	if err := updateQuarkusDirectory(); err != nil {
-		return err
-	}
-
-	// Copy app files in maven subdirectory
-	if err := updateAppDirectory(); err != nil {
-		return err
-	}
-
-	// Copy lib files in maven subdirectory
-	if err := updateLibDirectory(); err != nil {
-		return err
-	}
-
-	// Get integration run command to be run inside the container. This means the command
-	// has to be created with the paths which will be valid inside the container.
-	containerCmd, err := getContainerIntegrationRunCommand(ctx, propertyFiles, dependencies, routes, stdout, stderr)
-	if err != nil {
-		return err
-	}
-
-	// Create the integration image Docker file.
-	if err := docker.CreateIntegrationImageDockerFile(containerCmd, startsFromLocalFolder); err != nil {
-		return err
-	}
-
-	return buildIntegrationImage(ctx, image, stdout, stderr)
-}
-
-func buildIntegrationImage(ctx context.Context, image string, stdout, stderr io.Writer) error {
-	// Get the Docker command arguments for building the base image and create the command.
-	args := docker.BuildIntegrationImageArgs(image, MavenWorkingDirectory)
-	cmd := exec.CommandContext(ctx, "docker", args...)
-
-	// Set stdout and stderr.
-	cmd.Stderr = stderr
-	cmd.Stdout = stdout
-
-	// Output executed command.
-	fmt.Fprintln(cmd.Stdout, "Executing:", strings.Join(cmd.Args, " "))
-
-	// Run the command.
-	if err := cmd.Run(); err != nil {
-		return fmt.Errorf("integration image containerization did not run successfully: %w", err)
-	}
-
-	return nil
-}
-
-func RunIntegrationImage(ctx context.Context, image string, stdout, stderr io.Writer) error {
-	// Stop the child process before exiting
-	dockerCtx, cancel := context.WithCancel(ctx)
-	cs := make(chan os.Signal, 1)
-	signal.Notify(cs, os.Interrupt, syscall.SIGTERM)
-	go func() {
-		<-cs
-		cancel()
-	}()
-
-	// Get the docker command line argument for running an image.
-	args, err := docker.RunIntegrationImageArgs(image)
-	if err != nil {
-		return err
-	}
-
-	cmd := exec.CommandContext(dockerCtx, "docker", args...)
-
-	// Set stdout and stderr.
-	cmd.Stderr = stderr
-	cmd.Stdout = stdout
-
-	// Output executed command.
-	fmt.Fprintln(cmd.Stdout, "Executing:", strings.Join(cmd.Args, " "))
-
-	// Run the command.
-	if err := cmd.Run(); err != nil {
-		return fmt.Errorf("integration image did not run successfully: %w", err)
-	}
-
-	return nil
-}
-
-// getContainerIntegrationRunCommand returns the integration command which will be run inside the container.
-func getContainerIntegrationRunCommand(ctx context.Context, properties []string, dependencies []string, routes []string,
-	stdout, stderr io.Writer) (*exec.Cmd, error) {
-	// All paths need to be valid container paths.
-	// Update property file paths.
-	containerProperties := docker.ContainerizeFilePaths(properties, docker.GetContainerPropertiesDir())
-	containerDependencies := docker.ContainerizeDependencyPaths(dependencies, docker.GetContainerDependenciesDir())
-	containerRoutes := docker.ContainerizeFilePaths(routes, docker.GetContainerRoutesDir())
-
-	return assembleIntegrationRunCommand(ctx, containerProperties, containerDependencies, containerRoutes,
-		docker.GetContainerPropertiesDir(), stdout, stderr, false)
-}
-
-func RunLocalIntegration(ctx context.Context, properties []string, dependencies []string, routes []string,
-	propertiesDir string, stdout, stderr io.Writer) error {
-	cmd, err := assembleIntegrationRunCommand(ctx, properties, dependencies, routes,
-		propertiesDir, stdout, stderr, true)
-	if err != nil {
-		return err
-	}
-
-	// Output command we are about to run.
-	fmt.Fprintln(cmd.Stdout, "Executing:", strings.Join(cmd.Args, " "))
-
-	// Run integration locally.
-	return cmd.Run()
-}
-
-func assembleIntegrationRunCommand(ctx context.Context, properties []string, dependencies []string, routes []string,
-	propertiesDir string, stdout, stderr io.Writer, local bool) (*exec.Cmd, error) {
-	// Create classpath value.
-	classpathValue := assembleClasspathArgValue(properties, dependencies, routes)
-
-	// Create java command that runs the integration.
-	javaCmd := "java"
-
-	// Create java command arguments.
-	args := make([]string, 0)
-	args = append(args, "-cp")
-	args = append(args, classpathValue)
-	args = append(args, "io.quarkus.bootstrap.runner.QuarkusEntryPoint")
-
-	cmd := exec.CommandContext(ctx, javaCmd, args...)
-
-	// Add directory where the properties files reside. The directory is the local properties directory
-	// or the properties directory inside the container.
-	cmd.Env = append(cmd.Env, "CAMEL_K_CONF_D="+propertiesDir)
-
-	// Add files to the command line under the CAMEL_K_ROUTES flag.
-	cmd.Env = append(cmd.Env, "CAMEL_K_ROUTES="+strings.Join(formatRoutes(routes), ","))
-
-	// Add any lazily evaluated environment variables.
-	if local {
-		// If we are running locally then this is as late as we can evaluate the
-		// lazy environment variables since we are going to run the command
-		// immediately after the generation of these arguments.
-		setEnvVars, err := util.EvaluateCLIAndLazyEnvVars()
-		if err != nil {
-			return nil, err
-		}
-		cmd.Env = append(cmd.Env, setEnvVars...)
-	} else {
-		// If we are running in containerized or just building an image, we should
-		// not evaluate the variables at this point since we are only generating the
-		// run command and not actually running it.
-		for _, lazyEnvVar := range util.ListOfLazyEvaluatedEnvVars {
-			cmd.Env = append(cmd.Env, lazyEnvVar+"={{env:"+lazyEnvVar+"}}")
-		}
-	}
-
-	// Set stdout and stderr.
-	cmd.Stderr = stderr
-	cmd.Stdout = stdout
-
-	return cmd, nil
-}
-
-func assembleClasspathArgValue(properties []string, dependencies []string, routes []string) string {
-	classpathContents := []string{}
-	classpathContents = append(classpathContents, properties...)
-	classpathContents = append(classpathContents, routes...)
-	classpathContents = append(classpathContents, dependencies...)
-	return strings.Join(classpathContents, string(os.PathListSeparator))
-}
-
-func formatRoutes(files []string) []string {
-	routes := []string{}
-	for _, route := range files {
-		// Split route path.
-		a := strings.Split(route, ".")
-
-		// Extract extension.
-		extension := a[len(a)-1]
-
-		// Add file with extension.
-		routes = append(routes, "file:"+route+"?language="+extension)
-	}
-
-	return routes
-}
diff --git a/pkg/cmd/local/local.go b/pkg/cmd/local/local.go
deleted file mode 100644
index ed2664353..000000000
--- a/pkg/cmd/local/local.go
+++ /dev/null
@@ -1,556 +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 local
-
-import (
-	"context"
-	"encoding/json"
-	"errors"
-	"fmt"
-	"os"
-	"path/filepath"
-	"sort"
-	"strings"
-
-	"github.com/scylladb/go-set/strset"
-	"github.com/spf13/cobra"
-
-	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
-	"github.com/apache/camel-k/v2/pkg/builder"
-	"github.com/apache/camel-k/v2/pkg/cmd/source"
-	"github.com/apache/camel-k/v2/pkg/trait"
-	"github.com/apache/camel-k/v2/pkg/util"
-	"github.com/apache/camel-k/v2/pkg/util/camel"
-	"github.com/apache/camel-k/v2/pkg/util/defaults"
-	"github.com/apache/camel-k/v2/pkg/util/maven"
-)
-
-var acceptedDependencyTypes = []string{
-	"bom", "camel", "camel-k", "camel-quarkus", "mvn",
-	// jitpack
-	"github", "gitlab", "bitbucket", "gitee", "azure",
-}
-
-// GetDependencies resolves and gets the list of dependencies from catalog and sources.
-func GetDependencies(ctx context.Context, cmd *cobra.Command, srcs, userDependencies, repositories []string,
-	allDependencies bool) ([]string, error) {
-	// Fetch existing catalog or create new one if one does not already exist
-	catalog, err := CreateCamelCatalog(ctx)
-	if err != nil {
-		return nil, fmt.Errorf("failed to create Camel catalog: %w", err)
-	}
-
-	// Validate user-provided dependencies against Camel catalog
-	camel.ValidateDependencies(catalog, userDependencies, cmd)
-
-	// Get top-level dependencies from sources
-	dependencies, err := getTopLevelDependencies(ctx, catalog, srcs)
-	if err != nil {
-		return nil, fmt.Errorf("failed to resolve dependencies from source: %w", err)
-	}
-
-	// Add additional user-provided dependencies
-	dependencies = append(dependencies, userDependencies...)
-
-	// Compute transitive dependencies
-	if allDependencies {
-		// Add runtime dependency since this dependency is always required for running
-		// an integration. Only add this dependency if it has not been added already.
-		for _, runtimeDep := range catalog.Runtime.Dependencies {
-			util.StringSliceUniqueAdd(&dependencies, runtimeDep.GetDependencyID())
-		}
-
-		dependencies, err = getTransitiveDependencies(ctx, catalog, dependencies, repositories)
-		if err != nil {
-			return nil, fmt.Errorf("failed to compute transitive dependencies: %w", err)
-		}
-	}
-
-	return dependencies, nil
-}
-
-// getTopLevelDependencies gets top-level dependencies from sources.
-func getTopLevelDependencies(ctx context.Context, catalog *camel.RuntimeCatalog, srcs []string) ([]string, error) {
-	// List of top-level dependencies
-	dependencies := strset.New()
-
-	// Invoke the dependency inspector code for each source file
-	for _, src := range srcs {
-		data, _, _, err := source.LoadTextContent(ctx, src, false)
-		if err != nil {
-			return []string{}, err
-		}
-
-		sourceSpec := v1.SourceSpec{
-			DataSpec: v1.DataSpec{
-				Name:        filepath.Base(src),
-				Content:     data,
-				Compression: false,
-			},
-		}
-
-		// Extract list of top-level dependencies
-		srcDeps, err := trait.ExtractSourceDependencies(sourceSpec, catalog)
-		if err != nil {
-			return nil, err
-		}
-		dependencies.Merge(srcDeps)
-	}
-
-	return dependencies.List(), nil
-}
-
-func getTransitiveDependencies(ctx context.Context, catalog *camel.RuntimeCatalog, dependencies []string, repositories []string) ([]string, error) {
-	project := builder.GenerateQuarkusProjectCommon(
-		defaults.DefaultRuntimeVersion,
-		catalog.GetQuarkusVersion(),
-		make(map[string]string),
-	)
-
-	if err := camel.ManageIntegrationDependencies(&project, dependencies, catalog); err != nil {
-		return nil, err
-	}
-
-	mc := maven.NewContext(MavenWorkingDirectory)
-	mc.LocalRepository = ""
-
-	if len(repositories) > 0 {
-		settings, err := maven.NewSettings(maven.DefaultRepositories, maven.Repositories(repositories...))
-		if err != nil {
-			return nil, err
-		}
-		settingsData, err := util.EncodeXML(settings)
-		if err != nil {
-			return nil, err
-		}
-		mc.UserSettings = settingsData
-	}
-
-	// Make maven command less verbose
-	mc.AdditionalArguments = append(mc.AdditionalArguments, "-q")
-
-	if err := builder.BuildQuarkusRunnerCommon(ctx, mc, project); err != nil {
-		return nil, err
-	}
-
-	// Compose artifacts list
-	artifacts, err := builder.ProcessQuarkusTransitiveDependencies(mc)
-	if err != nil {
-		return nil, err
-	}
-
-	// Dump dependencies in the dependencies directory and construct the list of dependencies
-	transitiveDependencies := []string{}
-	for _, entry := range artifacts {
-		transitiveDependencies = append(transitiveDependencies, entry.Location)
-	}
-	return transitiveDependencies, nil
-}
-
-func getRegularFilesInDir(directory string, dirnameInPath bool) ([]string, error) {
-	var dirFiles []string
-	files, err := os.ReadDir(directory)
-	if err != nil {
-		return nil, err
-	}
-
-	for _, file := range files {
-		fileName := file.Name()
-
-		// Do not include hidden files or sub-directories.
-		if !file.IsDir() && !strings.HasPrefix(fileName, ".") {
-			if dirnameInPath {
-				dirFiles = append(dirFiles, filepath.Join(directory, fileName))
-			} else {
-				dirFiles = append(dirFiles, fileName)
-			}
-		}
-	}
-
-	return dirFiles, nil
-}
-
-func GetBuildDependencies(integrationDirectory string) ([]string, error) {
-	locallyBuiltDependencies, err := getRegularFilesInDir(GetCustomDependenciesDir(integrationDirectory), true)
-	if err != nil {
-		return nil, err
-	}
-	return locallyBuiltDependencies, nil
-}
-
-func GetBuildProperties(integrationDirectory string) ([]string, error) {
-	locallyBuiltProperties, err := getRegularFilesInDir(GetCustomPropertiesDir(integrationDirectory), true)
-	if err != nil {
-		return nil, err
-	}
-	return locallyBuiltProperties, nil
-}
-
-func GetBuildRoutes(integrationDirectory string) ([]string, error) {
-	locallyBuiltRoutes, err := getRegularFilesInDir(GetCustomRoutesDir(integrationDirectory), true)
-	if err != nil {
-		return nil, err
-	}
-	return locallyBuiltRoutes, nil
-}
-
-func generateCatalog(ctx context.Context) (*camel.RuntimeCatalog, error) {
-	// A Camel catalog is required for this operation
-	mvn := v1.MavenSpec{
-		LocalRepository: "",
-	}
-	runtime := v1.RuntimeSpec{
-		Version:  defaults.DefaultRuntimeVersion,
-		Provider: v1.RuntimeProviderQuarkus,
-	}
-	var providerDependencies []maven.Dependency
-	var caCert [][]byte
-	catalog, err := camel.GenerateCatalogCommon(ctx, nil, nil, caCert, mvn, runtime, providerDependencies)
-	if err != nil {
-		return nil, err
-	}
-
-	return catalog, nil
-}
-
-func CreateCamelCatalog(ctx context.Context) (*camel.RuntimeCatalog, error) {
-	// Attempt to reuse existing Camel catalog if one is present
-	catalog, err := camel.DefaultCatalog()
-	if err != nil {
-		return nil, err
-	}
-
-	// Generate catalog if one was not found
-	if catalog == nil {
-		catalog, err = generateCatalog(ctx)
-		if err != nil {
-			return nil, err
-		}
-	}
-
-	return catalog, nil
-}
-
-func OutputDependencies(dependencies []string, format string, cmd *cobra.Command) error {
-	sort.Strings(dependencies)
-	if format != "" {
-		if err := printDependencies(format, dependencies, cmd); err != nil {
-			return err
-		}
-	} else {
-		// Print output in text form
-		fmt.Fprintln(cmd.OutOrStdout(), "dependencies:")
-		for _, dep := range dependencies {
-			fmt.Fprintln(cmd.OutOrStdout(), dep)
-		}
-	}
-
-	return nil
-}
-
-func printDependencies(format string, dependencies []string, cmd *cobra.Command) error {
-	switch format {
-	case "yaml":
-		data, err := dependenciesToYAML(dependencies)
-		if err != nil {
-			return err
-		}
-		fmt.Fprint(cmd.OutOrStdout(), string(data))
-	case "json":
-		data, err := dependenciesToJSON(dependencies)
-		if err != nil {
-			return err
-		}
-		fmt.Fprint(cmd.OutOrStdout(), string(data))
-	default:
-		return fmt.Errorf("unknown output format: %s", format)
-	}
-	return nil
-}
-
-func dependenciesToJSON(list []string) ([]byte, error) {
-	jsondata := map[string]interface{}{}
-	jsondata["dependencies"] = list
-	return json.Marshal(jsondata)
-}
-
-func dependenciesToYAML(list []string) ([]byte, error) {
-	data, err := dependenciesToJSON(list)
-	if err != nil {
-		return nil, err
-	}
-
-	return util.JSONToYAML(data)
-}
-
-func validateFile(file string) error {
-	fileExists, err := util.FileExists(file)
-	if err != nil {
-		return err
-	}
-
-	if !fileExists {
-		return errors.New("File " + file + " file does not exist")
-	}
-
-	return nil
-}
-
-// ValidateFiles ensures existence of given files.
-func ValidateFiles(args []string) error {
-	// Ensure source files exist
-	for _, arg := range args {
-		err := validateFile(arg)
-		if err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-// ValidateDependencies validates list of additional dependencies i.e. makes sure
-// that each dependency has a valid type.
-func ValidateDependencies(dependencies []string) error {
-	for _, dependency := range dependencies {
-		depType := strings.Split(dependency, ":")[0]
-		if !util.StringSliceExists(acceptedDependencyTypes, depType) {
-			return fmt.Errorf("dependency is not valid: %s", dependency)
-		}
-	}
-
-	return nil
-}
-
-func ValidatePropertyFiles(propertyFiles []string) error {
-	for _, fileName := range propertyFiles {
-		if err := validatePropertyFile(fileName); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-func validatePropertyFile(fileName string) error {
-	if !strings.HasSuffix(fileName, ".properties") {
-		return fmt.Errorf("supported property files must have a .properties extension: %s", fileName)
-	}
-
-	if file, err := os.Stat(fileName); err != nil {
-		return fmt.Errorf("unable to access property file %s: %w", fileName, err)
-	} else if file.IsDir() {
-		return fmt.Errorf("property file %s is a directory", fileName)
-	}
-
-	return nil
-}
-
-func UpdateIntegrationProperties(properties []string, propertyFiles []string, hasIntegrationDir bool) ([]string, error) {
-	// Create properties directory under Maven working directory.
-	// This ensures that property files of different integrations do not clash.
-	if err := CreateLocalPropertiesDirectory(); err != nil {
-		return nil, err
-	}
-
-	// Relocate properties files to this integration's property directory.
-	relocatedPropertyFiles := []string{}
-	dir := GetLocalPropertiesDir()
-	for _, propertyFile := range propertyFiles {
-		relocatedPropertyFile := filepath.Join(dir, filepath.Base(propertyFile))
-		if _, err := util.CopyFile(propertyFile, relocatedPropertyFile); err != nil {
-			return nil, err
-		}
-		relocatedPropertyFiles = append(relocatedPropertyFiles, relocatedPropertyFile)
-	}
-
-	if !hasIntegrationDir {
-		// Output list of properties to property file if any CLI properties were given.
-		if len(properties) > 0 {
-			propertyFilePath := filepath.Join(dir, "CLI.properties")
-			if err := os.WriteFile(propertyFilePath, []byte(strings.Join(properties, "\n")), 0o600); err != nil {
-				return nil, err
-			}
-			relocatedPropertyFiles = append(relocatedPropertyFiles, propertyFilePath)
-		}
-	}
-
-	return relocatedPropertyFiles, nil
-}
-
-func updateIntegrationDependencies(dependencies []string) error {
-	// Create dependencies directory under Maven working directory.
-	// This ensures that dependencies will be removed after they are not needed.
-	if err := createLocalDependenciesDirectory(); err != nil {
-		return err
-	}
-
-	// Relocate dependencies files to this integration's dependencies directory
-	dir := getLocalDependenciesDir()
-	for _, dependency := range dependencies {
-		var targetPath string
-		basePath := util.SubstringFrom(dependency, util.QuarkusDependenciesBaseDirectory)
-		if basePath != "" {
-			targetPath = filepath.Join(dir, basePath)
-		} else {
-			targetPath = filepath.Join(dir, filepath.Base(dependency))
-		}
-		if _, err := util.CopyFile(dependency, targetPath); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-func updateIntegrationRoutes(routes []string) error {
-	if err := createLocalRoutesDirectory(); err != nil {
-		return err
-	}
-
-	dir := getLocalRoutesDir()
-	for _, route := range routes {
-		if _, err := util.CopyFile(route, filepath.Join(dir, filepath.Base(route))); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-func updateQuarkusDirectory() error {
-	if err := createLocalQuarkusDirectory(); err != nil {
-		return err
-	}
-
-	// ignore error if custom dir doesn't exist
-	_ = CopyQuarkusAppFiles(util.CustomQuarkusDirectoryName, getLocalQuarkusDir())
-
-	return nil
-}
-
-func updateAppDirectory() error {
-	if err := createLocalAppDirectory(); err != nil {
-		return err
-	}
-
-	// ignore error if custom dir doesn't exist
-	_ = CopyAppFile(util.CustomAppDirectoryName, getLocalAppDir())
-
-	return nil
-}
-
-func updateLibDirectory() error {
-	if err := createLocalLibDirectory(); err != nil {
-		return err
-	}
-
-	// ignore error if custom dir doesn't exist
-	_ = CopyLibFiles(util.CustomLibDirectoryName, getLocalLibDir())
-
-	return nil
-}
-
-func CopyIntegrationFilesToDirectory(files []string, directory string) ([]string, error) {
-	// Create directory if one does not already exist
-	if err := util.CreateDirectory(directory); err != nil {
-		return nil, err
-	}
-
-	// Copy files to new location. Also create the list with relocated files.
-	relocatedFilesList := []string{}
-	for _, filePath := range files {
-		newFilePath := filepath.Join(directory, filepath.Base(filePath))
-		if _, err := util.CopyFile(filePath, newFilePath); err != nil {
-			return relocatedFilesList, err
-		}
-		relocatedFilesList = append(relocatedFilesList, newFilePath)
-	}
-
-	return relocatedFilesList, nil
-}
-
-func CopyQuarkusAppFiles(dependenciesDir string, quarkusDir string) error {
-	// Create directory if one does not already exist
-	if err := util.CreateDirectory(quarkusDir); err != nil {
-		return err
-	}
-
-	// Transfer all files with a .dat extension and all files with a *-bytecode.jar suffix.
-	files, err := getRegularFilesInDir(dependenciesDir, false)
-	if err != nil {
-		return err
-	}
-	for _, file := range files {
-		if strings.HasSuffix(file, ".dat") || strings.HasSuffix(file, "-bytecode.jar") {
-			source := filepath.Join(dependenciesDir, file)
-			destination := filepath.Join(quarkusDir, file)
-			if _, err = util.CopyFile(source, destination); err != nil {
-				return err
-			}
-		}
-	}
-
-	return nil
-}
-
-func CopyLibFiles(dependenciesDir string, libDir string) error {
-	// Create directory if one does not already exist
-	if err := util.CreateDirectory(libDir); err != nil {
-		return err
-	}
-
-	fileNames, err := getRegularFilesInDir(dependenciesDir, false)
-	if err != nil {
-		return err
-	}
-
-	for _, dependencyJar := range fileNames {
-		source := filepath.Join(dependenciesDir, dependencyJar)
-		destination := filepath.Join(libDir, dependencyJar)
-		if _, err = util.CopyFile(source, destination); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-func CopyAppFile(dependenciesDir string, appDir string) error {
-	// Create directory if one does not already exist
-	if err := util.CreateDirectory(appDir); err != nil {
-		return err
-	}
-
-	fileNames, err := getRegularFilesInDir(dependenciesDir, false)
-	if err != nil {
-		return err
-	}
-
-	for _, dependencyJar := range fileNames {
-		if strings.HasPrefix(dependencyJar, "camel-k-integration-") {
-			source := filepath.Join(dependenciesDir, dependencyJar)
-			destination := filepath.Join(appDir, dependencyJar)
-			if _, err = util.CopyFile(source, destination); err != nil {
-				return err
-			}
-		}
-	}
-
-	return nil
-}
diff --git a/pkg/cmd/local/local_test.go b/pkg/cmd/local/local_test.go
deleted file mode 100644
index ef6f53c09..000000000
--- a/pkg/cmd/local/local_test.go
+++ /dev/null
@@ -1,67 +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 local
-
-import (
-	"os"
-	"strings"
-	"testing"
-
-	"github.com/stretchr/testify/assert"
-)
-
-func TestValidatePropertyFiles_ShouldSucceed(t *testing.T) {
-	var tmpFile1 *os.File
-	var err error
-	if tmpFile1, err = os.CreateTemp("", "camel-k-*.properties"); err != nil {
-		t.Error(err)
-	}
-
-	assert.Nil(t, tmpFile1.Close())
-	assert.Nil(t, os.WriteFile(tmpFile1.Name(), []byte("key=value"), 0o400))
-
-	inputValues := []string{tmpFile1.Name()}
-	err = ValidatePropertyFiles(inputValues)
-
-	assert.Nil(t, err)
-}
-
-func TestValidatePropertyFiles_ShouldFailNotAPropertiesFile(t *testing.T) {
-	var tmpFile1 *os.File
-	var err error
-	if tmpFile1, err = os.CreateTemp("", "camel-k-"); err != nil {
-		t.Error(err)
-	}
-
-	assert.Nil(t, tmpFile1.Close())
-	assert.Nil(t, os.WriteFile(tmpFile1.Name(), []byte("key=value"), 0o400))
-
-	inputValues := []string{tmpFile1.Name()}
-	err = ValidatePropertyFiles(inputValues)
-
-	assert.NotNil(t, err)
-	assert.True(t, strings.HasPrefix(err.Error(), "supported property files must have a .properties extension"))
-}
-
-func TestValidatePropertyFiles_ShouldFailNotFound(t *testing.T) {
-	inputValues := []string{"/tmp/not-found.properties"}
-	err := ValidatePropertyFiles(inputValues)
-
-	assert.NotNil(t, err)
-	assert.True(t, strings.HasPrefix(err.Error(), "unable to access property file"))
-}
diff --git a/pkg/cmd/local/workdir.go b/pkg/cmd/local/workdir.go
deleted file mode 100644
index 97ddbde80..000000000
--- a/pkg/cmd/local/workdir.go
+++ /dev/null
@@ -1,244 +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 local
-
-import (
-	"os"
-	"path"
-	"path/filepath"
-	"strings"
-
-	"github.com/apache/camel-k/v2/pkg/util"
-)
-
-// MavenWorkingDirectory is the directory used by Maven for an invocation of the kamel local command.
-// By default, a temporary folder will be used.
-var MavenWorkingDirectory = ""
-
-// CreateMavenWorkingDirectory creates local Maven working directory.
-func CreateMavenWorkingDirectory() error {
-	temporaryDirectory, err := os.MkdirTemp(os.TempDir(), "maven-")
-	if err != nil {
-		return err
-	}
-
-	// Set the Maven directory to the default value
-	MavenWorkingDirectory = temporaryDirectory
-
-	return nil
-}
-
-// DeleteMavenWorkingDirectory removes local Maven working directory.
-func DeleteMavenWorkingDirectory() error {
-	return os.RemoveAll(MavenWorkingDirectory)
-}
-
-// getLocalDependenciesDir returns <mavenWorkingDirectory>/dependencies.
-func getLocalDependenciesDir() string {
-	return filepath.Join(MavenWorkingDirectory, util.DefaultDependenciesDirectoryName)
-}
-
-func createLocalDependenciesDirectory() error {
-	// Do not create a directory unless the maven directory contains a valid value.
-	if MavenWorkingDirectory == "" {
-		return nil
-	}
-
-	directoryExists, err := util.DirectoryExists(getLocalDependenciesDir())
-	if err != nil {
-		return err
-	}
-
-	if !directoryExists {
-		if err := os.MkdirAll(getLocalDependenciesDir(), 0o700); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-// GetLocalPropertiesDir returns <mavenWorkingDirectory>/properties.
-func GetLocalPropertiesDir() string {
-	return filepath.Join(MavenWorkingDirectory, util.DefaultPropertiesDirectoryName)
-}
-
-func CreateLocalPropertiesDirectory() error {
-	// Do not create a directory unless the maven directory contains a valid value.
-	if MavenWorkingDirectory == "" {
-		return nil
-	}
-
-	directoryExists, err := util.DirectoryExists(GetLocalPropertiesDir())
-	if err != nil {
-		return err
-	}
-
-	if !directoryExists {
-		err := os.MkdirAll(GetLocalPropertiesDir(), 0o700)
-		if err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-// getLocalRoutesDir returns <mavenWorkingDirectory>/routes.
-func getLocalRoutesDir() string {
-	return filepath.Join(MavenWorkingDirectory, util.DefaultRoutesDirectoryName)
-}
-
-func createLocalRoutesDirectory() error {
-	// Do not create a directory unless the maven directory contains a valid value.
-	if MavenWorkingDirectory == "" {
-		return nil
-	}
-
-	directoryExists, err := util.DirectoryExists(getLocalRoutesDir())
-	if err != nil {
-		return err
-	}
-
-	if !directoryExists {
-		if err := os.MkdirAll(getLocalRoutesDir(), 0o700); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-// getLocalQuarkusDir returns <mavenWorkingDirectory>/quarkus.
-func getLocalQuarkusDir() string {
-	return filepath.Join(MavenWorkingDirectory, util.CustomQuarkusDirectoryName)
-}
-
-func createLocalQuarkusDirectory() error {
-	// Do not create a directory unless the maven directory contains a valid value.
-	if MavenWorkingDirectory == "" {
-		return nil
-	}
-
-	directoryExists, err := util.DirectoryExists(getLocalQuarkusDir())
-	if err != nil {
-		return err
-	}
-
-	if !directoryExists {
-		if err := os.MkdirAll(getLocalQuarkusDir(), 0o700); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-// getLocalAppDir returns <mavenWorkingDirectory>/app.
-func getLocalAppDir() string {
-	return filepath.Join(MavenWorkingDirectory, util.CustomAppDirectoryName)
-}
-
-func createLocalAppDirectory() error {
-	// Do not create a directory unless the maven directory contains a valid value.
-	if MavenWorkingDirectory == "" {
-		return nil
-	}
-
-	directoryExists, err := util.DirectoryExists(getLocalAppDir())
-	if err != nil {
-		return err
-	}
-
-	if !directoryExists {
-		if err := os.MkdirAll(getLocalAppDir(), 0o700); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-// getLocalLibDir returns <mavenWorkingDirectory>/lib/main.
-func getLocalLibDir() string {
-	return filepath.Join(MavenWorkingDirectory, util.CustomLibDirectoryName)
-}
-
-func createLocalLibDirectory() error {
-	// Do not create a directory unless the maven directory contains a valid value.
-	if MavenWorkingDirectory == "" {
-		return nil
-	}
-
-	directoryExists, err := util.DirectoryExists(getLocalLibDir())
-	if err != nil {
-		return err
-	}
-
-	if !directoryExists {
-		if err := os.MkdirAll(getLocalLibDir(), 0o700); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-func GetCustomDependenciesDir(dir string) string {
-	return filepath.Join(dir, util.DefaultDependenciesDirectoryName)
-}
-
-func GetCustomPropertiesDir(dir string) string {
-	return filepath.Join(dir, util.DefaultPropertiesDirectoryName)
-}
-
-func GetCustomRoutesDir(dir string) string {
-	return filepath.Join(dir, util.DefaultRoutesDirectoryName)
-}
-
-func GetCustomQuarkusDir(dir string) string {
-	parentDir := path.Dir(strings.TrimSuffix(dir, "/"))
-	return filepath.Join(parentDir, util.CustomQuarkusDirectoryName)
-}
-
-func GetCustomLibDir(dir string) string {
-	parentDir := path.Dir(strings.TrimSuffix(dir, "/"))
-	return filepath.Join(parentDir, util.CustomLibDirectoryName)
-}
-
-func GetCustomAppDir(dir string) string {
-	parentDir := path.Dir(strings.TrimSuffix(dir, "/"))
-	return filepath.Join(parentDir, "app")
-}
-
-func DeleteLocalIntegrationDirs(dir string) error {
-	dirs := []string{
-		GetCustomQuarkusDir(dir),
-		GetCustomLibDir(dir),
-		GetCustomAppDir(dir),
-	}
-
-	for _, dir := range dirs {
-		err := os.RemoveAll(dir)
-		if err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
diff --git a/pkg/cmd/local_build.go b/pkg/cmd/local_build.go
deleted file mode 100644
index ef6136cc7..000000000
--- a/pkg/cmd/local_build.go
+++ /dev/null
@@ -1,269 +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"
-
-	"github.com/apache/camel-k/v2/pkg/cmd/local"
-	"github.com/apache/camel-k/v2/pkg/util"
-)
-
-func newCmdLocalBuild(localCmdOptions *LocalCmdOptions) (*cobra.Command, *localBuildCmdOptions) {
-	options := localBuildCmdOptions{
-		LocalCmdOptions: localCmdOptions,
-	}
-
-	cmd := cobra.Command{
-		Use:        "build [options]",
-		Short:      "Build integration images locally.",
-		Long:       `Build integration images locally for containerized integrations.`,
-		Deprecated: "it may be removed in future versions",
-		PreRunE:    decode(&options),
-		RunE: func(cmd *cobra.Command, args []string) error {
-			if err := options.validate(cmd, args); err != nil {
-				return err
-			}
-			if err := options.init(args); err != nil {
-				return err
-			}
-			defer func() {
-				if err := options.deinit(); err != nil {
-					fmt.Fprintln(cmd.ErrOrStderr(), err.Error())
-				}
-			}()
-			return options.run(cmd, args)
-		},
-		Annotations: map[string]string{
-			offlineCommandLabel: "true",
-		},
-	}
-
-	cmd.Flags().Bool("base-image", false, "Build base image used as a starting point for any integration")
-	cmd.Flags().Bool("dependencies-only", false,
-		"Only output the integration dependencies. The integration-directory flag must be set.")
-	cmd.Flags().String("container-registry", "",
-		"Registry that holds intermediate images. This flag should only be used in conjunction with the base-image flag.")
-	cmd.Flags().String("image", "", usageImage)
-	cmd.Flags().String("integration-directory", "", usageIntegrationDirectory)
-	cmd.Flags().StringArray("property-file", nil, usagePropertyFile)
-	cmd.Flags().StringArrayP("property", "p", nil, usageProperty)
-
-	return &cmd, &options
-}
-
-type localBuildCmdOptions struct {
-	*LocalCmdOptions
-	BaseImage            bool     `mapstructure:"base-image"`
-	DependenciesOnly     bool     `mapstructure:"dependencies-only"`
-	ContainerRegistry    string   `mapstructure:"container-registry"`
-	Image                string   `mapstructure:"image"`
-	IntegrationDirectory string   `mapstructure:"integration-directory"`
-	Properties           []string `mapstructure:"properties"`
-	PropertyFiles        []string `mapstructure:"property-files"`
-}
-
-func (o *localBuildCmdOptions) validate(cmd *cobra.Command, args []string) error {
-	if o.BaseImage {
-		return o.validateBaseImageMode(cmd, args)
-	}
-
-	return o.validateIntegrationMode(args)
-}
-
-func (o *localBuildCmdOptions) validateBaseImageMode(cmd *cobra.Command, args []string) error {
-	// Cannot have both integration files and the base image construction enabled.
-	if len(args) > 0 {
-		return errors.New("cannot use --base-image with integration files")
-	}
-
-	// Docker registry must be set.
-	if o.ContainerRegistry == "" {
-		return errors.New("--base-image requires --container-registry")
-	}
-
-	// If an integration directory is provided then no base image containerization can be enabled.
-	if o.IntegrationDirectory != "" {
-		return errors.New("cannot use --integration-directory with --base-image")
-	}
-
-	if o.DependenciesOnly {
-		return errors.New("cannot use --dependencies-only with --base-image")
-	}
-
-	if len(o.Dependencies) > 0 || len(o.PropertyFiles) > 0 || len(o.Properties) > 0 {
-		fmt.Fprintln(cmd.OutOrStdout(),
-			"Warning: --dependency, --property, and --property-file are ignored in --base-image mode")
-	}
-
-	return nil
-}
-
-func (o *localBuildCmdOptions) validateIntegrationMode(args []string) error {
-	if len(args) == 0 {
-		if o.IntegrationDirectory == "" {
-			return errors.New("either integration files, --integration-directory, or --base-image must be provided")
-		}
-	} else {
-		if o.IntegrationDirectory == "" && o.Image == "" {
-			return errors.New("either --integration-directory or --image must be provided with integration files")
-		}
-	}
-
-	if o.ContainerRegistry != "" {
-		// ContainerRegistry should only be specified when building the base image.
-		return errors.New("--container-registry must be used with --base-image")
-	}
-
-	// The integration directory must be set when only outputting dependencies.
-	if o.DependenciesOnly && o.IntegrationDirectory == "" {
-		return errors.New("--dependencies-only requires --integration-directory")
-	}
-
-	// Validate integration files.
-	if err := local.ValidateFiles(args); err != nil {
-		return err
-	}
-
-	// Validate additional dependencies specified by the user.
-	if err := local.ValidateDependencies(o.Dependencies); err != nil {
-		return err
-	}
-
-	// Validate properties file.
-	if err := local.ValidateFiles(o.PropertyFiles); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (o *localBuildCmdOptions) init(args []string) error {
-	// Create integration directory if one is provided.
-	if o.IntegrationDirectory != "" {
-		if err := util.CreateDirectory(o.IntegrationDirectory); err != nil {
-			return err
-		}
-	}
-
-	if o.BaseImage || o.Image != "" {
-		// If base image construction is enabled create a directory for it.
-		if err := local.CreateDockerBaseWorkingDirectory(); err != nil {
-			return err
-		}
-
-		// If integration image construction is enabled, an integration image will be built.
-		if o.Image != "" {
-			if err := local.CreateDockerWorkingDirectory(); err != nil {
-				return err
-			}
-		}
-	}
-
-	return local.CreateMavenWorkingDirectory()
-}
-
-func (o *localBuildCmdOptions) run(cmd *cobra.Command, args []string) error {
-	var dependenciesList, propertyFilesList []string
-	routeFiles := args
-
-	if !o.BaseImage {
-		dependencies, err := local.GetDependencies(o.Context, cmd, args, o.Dependencies, o.MavenRepositories, true)
-		if err != nil {
-			return err
-		}
-
-		var propertyFiles []string
-		if !o.DependenciesOnly {
-			// Manage integration properties which may come from files or CLI
-			propertyFiles, err = local.UpdateIntegrationProperties(o.Properties, o.PropertyFiles, false)
-			if err != nil {
-				return err
-			}
-		}
-
-		dependenciesList = dependencies
-		propertyFilesList = propertyFiles
-
-		// Integration directory can only be used when building an integration image or when we just
-		// build the integration without also building the image. A local build of the integration is
-		// represented by all the files that define the integration: dependencies, properties, and routes.
-		if o.IntegrationDirectory != "" {
-			localDependenciesDir := local.GetCustomDependenciesDir(o.IntegrationDirectory)
-			dependenciesList, err = local.CopyIntegrationFilesToDirectory(dependencies, localDependenciesDir)
-			if err != nil {
-				return err
-			}
-
-			if o.DependenciesOnly {
-				// Once dependencies have been copied to local folder, we can exit.
-				return nil
-			}
-
-			localPropertiesDir := local.GetCustomPropertiesDir(o.IntegrationDirectory)
-			propertyFilesList, err = local.CopyIntegrationFilesToDirectory(propertyFiles, localPropertiesDir)
-			if err != nil {
-				return err
-			}
-
-			localRoutesDir := local.GetCustomRoutesDir(o.IntegrationDirectory)
-			routeFiles, err = local.CopyIntegrationFilesToDirectory(args, localRoutesDir)
-			if err != nil {
-				return err
-			}
-
-			// The only case in which we should not execute the integration image creation is when we want to
-			// just output the files that comprise the integration locally.
-			if o.Image == "" {
-				fmt.Fprintf(cmd.OutOrStdout(),
-					"Integration directory generated: %s\n", o.IntegrationDirectory)
-				return nil
-			}
-		}
-	}
-
-	if err := local.CreateAndBuildIntegrationImage(o.Context, o.ContainerRegistry, o.BaseImage, o.Image,
-		propertyFilesList, dependenciesList, routeFiles, false,
-		cmd.OutOrStdout(), cmd.ErrOrStderr()); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (o *localBuildCmdOptions) deinit() error {
-	// If base image construction is enabled delete the directory for it.
-	if err := local.DeleteDockerBaseWorkingDirectory(); err != nil {
-		return err
-	}
-
-	// If integration files are provided delete the maven project folder.
-	if !o.BaseImage {
-		if err := local.DeleteDockerWorkingDirectory(); err != nil {
-			return err
-		}
-		if err := local.DeleteMavenWorkingDirectory(); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
diff --git a/pkg/cmd/local_build_test.go b/pkg/cmd/local_build_test.go
deleted file mode 100644
index 1494c55f9..000000000
--- a/pkg/cmd/local_build_test.go
+++ /dev/null
@@ -1,73 +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/apache/camel-k/v2/pkg/util/test"
-	"github.com/spf13/cobra"
-	"github.com/stretchr/testify/assert"
-	"github.com/stretchr/testify/require"
-)
-
-func addTestLocalBuildCmd(rootCmdOptions *RootCmdOptions, rootCmd *cobra.Command) *localBuildCmdOptions {
-	localCmd, localCmdOptions := newCmdLocal(rootCmdOptions)
-	// remove predefined sub commands
-	localCmd.RemoveCommand(localCmd.Commands()...)
-	// add a testing version of build Command
-	localBuildCmd, localBuildCmdOptions := newCmdLocalBuild(localCmdOptions)
-	localBuildCmd.RunE = func(c *cobra.Command, args []string) error {
-		return nil
-	}
-	localBuildCmd.Args = test.ArbitraryArgs
-	localCmd.AddCommand(localBuildCmd)
-	rootCmd.AddCommand(localCmd)
-	return localBuildCmdOptions
-}
-
-func TestLocalBuildAcceptsTraits(t *testing.T) {
-	options, rootCmd := kamelTestPreAddCommandInit()
-	addTestLocalBuildCmd(options, rootCmd)
-	kamelTestPostAddCommandInit(t, rootCmd)
-
-	_, err := test.ExecuteCommand(rootCmd, "local", "build", "route.java",
-		"-t", "jolokia.enabled=true",
-		"--trait", "prometheus.enabled=true")
-
-	require.NoError(t, err)
-}
-
-func TestLocalBuildWithDependencies(t *testing.T) {
-	options, rootCmd := kamelTestPreAddCommandInit()
-	localBuildCmdOptions := addTestLocalBuildCmd(options, rootCmd)
-	kamelTestPostAddCommandInit(t, rootCmd)
-
-	_, err := test.ExecuteCommand(rootCmd, "local", "build", "route.java",
-		"-d", "camel-amqp",
-		"-d", "camel:bean",
-		"-d", "camel-quarkus-controlbus",
-		"-d", "camel-quarkus:directvm",
-		"--dependency", "mvn:test:component:1.0.0")
-
-	require.NoError(t, err)
-	assert.Len(t, localBuildCmdOptions.Dependencies, 5)
-	assert.ElementsMatch(t, localBuildCmdOptions.Dependencies, []string{
-		"camel:amqp", "camel:bean", "camel:controlbus", "camel:directvm", "mvn:test:component:1.0.0",
-	})
-}
diff --git a/pkg/cmd/local_inspect.go b/pkg/cmd/local_inspect.go
deleted file mode 100644
index 5cecfdab5..000000000
--- a/pkg/cmd/local_inspect.go
+++ /dev/null
@@ -1,109 +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/apache/camel-k/v2/pkg/cmd/local"
-	"github.com/spf13/cobra"
-)
-
-func newCmdLocalInspect(localCmdOptions *LocalCmdOptions) (*cobra.Command, *localInspectCmdOptions) {
-	options := localInspectCmdOptions{
-		LocalCmdOptions: localCmdOptions,
-	}
-
-	cmd := cobra.Command{
-		Use:   "inspect [files to inspect]",
-		Short: "Generate dependencies list given integration files.",
-		Long: `Output dependencies for a list of integration files. By default this command returns the
-top level dependencies only. When --all-dependencies is enabled, the transitive dependencies
-will be generated by calling Maven and then printed in the selected output format.`,
-		Deprecated: "it may be removed in future versions",
-		PreRunE:    decode(&options),
-		RunE: func(cmd *cobra.Command, args []string) error {
-			if err := options.validate(args); err != nil {
-				return err
-			}
-			if err := options.init(); err != nil {
-				return err
-			}
-			defer func() {
-				if err := options.deinit(); err != nil {
-					fmt.Fprintln(cmd.ErrOrStderr(), err.Error())
-				}
-			}()
-			return options.run(cmd, args)
-		},
-		Annotations: map[string]string{
-			offlineCommandLabel: "true",
-		},
-	}
-
-	cmd.Flags().Bool("all-dependencies", false, "Enable computation of transitive dependencies.")
-	cmd.Flags().StringP("output", "o", "", "Output format. One of: json|yaml")
-
-	return &cmd, &options
-}
-
-type localInspectCmdOptions struct {
-	*LocalCmdOptions
-	AllDependencies bool   `mapstructure:"all-dependencies"`
-	OutputFormat    string `mapstructure:"output"`
-}
-
-func (o *localInspectCmdOptions) validate(args []string) error {
-	// If no source files have been provided there is nothing to inspect.
-	if len(args) == 0 {
-		return errors.New("no integration files have been provided")
-	}
-
-	if err := local.ValidateFiles(args); err != nil {
-		return err
-	}
-
-	if err := local.ValidateDependencies(o.Dependencies); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (o *localInspectCmdOptions) init() error {
-	return local.CreateMavenWorkingDirectory()
-}
-
-func (o *localInspectCmdOptions) run(cmd *cobra.Command, args []string) error {
-	dependencies, err := local.GetDependencies(o.Context, cmd,
-		args, o.Dependencies, o.MavenRepositories, o.AllDependencies)
-	if err != nil {
-		return err
-	}
-
-	if err = local.OutputDependencies(dependencies, o.OutputFormat, cmd); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (o *localInspectCmdOptions) deinit() error {
-	return local.DeleteMavenWorkingDirectory()
-}
diff --git a/pkg/cmd/local_inspect_test.go b/pkg/cmd/local_inspect_test.go
deleted file mode 100644
index b00d07a6b..000000000
--- a/pkg/cmd/local_inspect_test.go
+++ /dev/null
@@ -1,73 +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/apache/camel-k/v2/pkg/util/test"
-	"github.com/spf13/cobra"
-	"github.com/stretchr/testify/assert"
-	"github.com/stretchr/testify/require"
-)
-
-func addTestLocalInspectCmd(rootCmdOptions *RootCmdOptions, rootCmd *cobra.Command) *localInspectCmdOptions {
-	localCmd, localCmdOptions := newCmdLocal(rootCmdOptions)
-	// remove predefined sub commands
-	localCmd.RemoveCommand(localCmd.Commands()...)
-	// add a testing version of inspect Command
-	localInspectCmd, localInspectCmdOptions := newCmdLocalInspect(localCmdOptions)
-	localInspectCmd.RunE = func(c *cobra.Command, args []string) error {
-		return nil
-	}
-	localInspectCmd.Args = test.ArbitraryArgs
-	localCmd.AddCommand(localInspectCmd)
-	rootCmd.AddCommand(localCmd)
-	return localInspectCmdOptions
-}
-
-func TestLocalInspectAcceptsTraits(t *testing.T) {
-	rootOptions, rootCmd := kamelTestPreAddCommandInit()
-	addTestLocalInspectCmd(rootOptions, rootCmd)
-	kamelTestPostAddCommandInit(t, rootCmd)
-
-	_, err := test.ExecuteCommand(rootCmd, "local", "inspect", "route.java",
-		"-t", "jolokia.enabled=true",
-		"--trait", "prometheus.enabled=true")
-
-	require.NoError(t, err)
-}
-
-func TestLocalInspectWithDependencies(t *testing.T) {
-	rootOptions, rootCmd := kamelTestPreAddCommandInit()
-	options := addTestLocalInspectCmd(rootOptions, rootCmd)
-	kamelTestPostAddCommandInit(t, rootCmd)
-
-	_, err := test.ExecuteCommand(rootCmd, "local", "inspect", "route.java",
-		"-d", "camel-amqp",
-		"-d", "camel:bean",
-		"-d", "camel-quarkus-controlbus",
-		"-d", "camel-quarkus:directvm",
-		"--dependency", "mvn:test:component:1.0.0")
-
-	require.NoError(t, err)
-	assert.Len(t, options.Dependencies, 5)
-	assert.ElementsMatch(t, options.Dependencies, []string{
-		"camel:amqp", "camel:bean", "camel:controlbus", "camel:directvm", "mvn:test:component:1.0.0",
-	})
-}
diff --git a/pkg/cmd/local_run.go b/pkg/cmd/local_run.go
deleted file mode 100644
index ac572b752..000000000
--- a/pkg/cmd/local_run.go
+++ /dev/null
@@ -1,283 +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"
-	"os"
-	"os/signal"
-	"syscall"
-
-	"github.com/apache/camel-k/v2/pkg/cmd/local"
-	"github.com/apache/camel-k/v2/pkg/util"
-
-	"github.com/spf13/cobra"
-)
-
-func newCmdLocalRun(localCmdOptions *LocalCmdOptions) (*cobra.Command, *localRunCmdOptions) {
-	options := localRunCmdOptions{
-		LocalCmdOptions: localCmdOptions,
-	}
-
-	cmd := cobra.Command{
-		Use:        "run [integration files]",
-		Short:      "Run integration locally.",
-		Long:       `Run integration locally using the input integration files.`,
-		Deprecated: "consider using Camel JBang instead (https://camel.apache.org/manual/camel-jbang.html)",
-		PreRunE:    decode(&options),
-		RunE: func(cmd *cobra.Command, args []string) error {
-			if err := options.validate(args); err != nil {
-				return err
-			}
-			if err := options.init(); err != nil {
-				return err
-			}
-
-			// make sure cleanup is done when process is stopped externally
-			cs := make(chan os.Signal, 1)
-			signal.Notify(cs, os.Interrupt, syscall.SIGTERM)
-			go func() {
-				<-cs
-				if err := options.deinit(); err != nil {
-					fmt.Fprintln(cmd.ErrOrStderr(), err)
-					os.Exit(1)
-				}
-				os.Exit(0)
-			}()
-
-			defer func() {
-				if err := options.deinit(); err != nil {
-					fmt.Fprintln(cmd.ErrOrStderr(), err.Error())
-				}
-			}()
-			return options.run(cmd, args)
-		},
-		Annotations: map[string]string{
-			offlineCommandLabel: "true",
-		},
-	}
-
-	cmd.Flags().Bool("containerize", false, "Run integration in a local container.")
-	cmd.Flags().String("image", "", usageImage)
-	cmd.Flags().String("network", "", "Custom network name to be used by the underlying Docker command.")
-	cmd.Flags().String("integration-directory", "", usageIntegrationDirectory)
-	cmd.Flags().StringArrayP("env", "e", nil, "Flag to specify an environment variable [--env VARIABLE=value].")
-	cmd.Flags().StringArray("property-file", nil, usagePropertyFile)
-	cmd.Flags().StringArrayP("property", "p", nil, usageProperty)
-
-	return &cmd, &options
-}
-
-type localRunCmdOptions struct {
-	*LocalCmdOptions
-	Containerize         bool     `mapstructure:"containerize"`
-	Image                string   `mapstructure:"image"`
-	Network              string   `mapstructure:"network"`
-	IntegrationDirectory string   `mapstructure:"integration-directory"`
-	EnvironmentVariables []string `mapstructure:"envs"`
-	PropertyFiles        []string `mapstructure:"property-files"`
-	Properties           []string `mapstructure:"properties"`
-}
-
-func (o *localRunCmdOptions) validate(args []string) error {
-	if len(args) == 0 && o.IntegrationDirectory == "" && o.Image == "" {
-		return errors.New("either integration files, --image, or --integration-directory must be provided")
-	}
-
-	// If containerize is set then docker image name must be set.
-	if o.Containerize && o.Image == "" {
-		return errors.New("--containerize requires --image")
-	}
-
-	// Validate integration files.
-	if err := local.ValidateFiles(args); err != nil {
-		return err
-	}
-
-	// Validate additional dependencies specified by the user.
-	if err := local.ValidateDependencies(o.Dependencies); err != nil {
-		return err
-	}
-
-	// Validate properties file.
-	if err := local.ValidatePropertyFiles(o.PropertyFiles); err != nil {
-		return err
-	}
-
-	if o.IntegrationDirectory != "" {
-		if ok, err := util.DirectoryExists(o.IntegrationDirectory); err != nil {
-			return err
-		} else if !ok {
-			return fmt.Errorf("integration directory %q does not exist", o.IntegrationDirectory)
-		}
-	}
-
-	return nil
-}
-
-func (o *localRunCmdOptions) init() error {
-	if o.Containerize {
-		if err := local.CreateDockerBaseWorkingDirectory(); err != nil {
-			return err
-		}
-		if err := local.CreateDockerWorkingDirectory(); err != nil {
-			return err
-		}
-	}
-	local.SetDockerNetworkName(o.Network)
-	local.SetDockerEnvVars(o.EnvironmentVariables)
-
-	return local.CreateMavenWorkingDirectory()
-}
-
-func (o *localRunCmdOptions) run(cmd *cobra.Command, args []string) error {
-	// If local run is provided with an image name, it will just run the image locally and exit.
-	if o.Image != "" && !o.Containerize {
-		// Run image locally.
-		return local.RunIntegrationImage(o.Context, o.Image, cmd.OutOrStdout(), cmd.ErrOrStderr())
-	}
-
-	dependencies, err := o.processDependencies(cmd, args)
-	if err != nil {
-		return err
-	}
-	propertyFiles, err := o.processPropertyFiles()
-	if err != nil {
-		return err
-	}
-	routes, err := o.processRoutes(args)
-	if err != nil {
-		return err
-	}
-
-	if o.Containerize {
-		// Create, build, and run the container image.
-		if err := local.CreateAndBuildIntegrationImage(o.Context, "", false, o.Image,
-			propertyFiles, dependencies, routes, o.IntegrationDirectory != "",
-			cmd.OutOrStdout(), cmd.ErrOrStderr()); err != nil {
-			return err
-		}
-
-		return local.RunIntegrationImage(o.Context, o.Image, cmd.OutOrStdout(), cmd.ErrOrStderr())
-	}
-
-	// Run integration locally.
-	return local.RunLocalIntegration(o.Context, propertyFiles, dependencies, routes, o.getPropertiesDir(),
-		cmd.OutOrStdout(), cmd.ErrOrStderr())
-}
-
-func (o *localRunCmdOptions) processDependencies(cmd *cobra.Command, args []string) ([]string, error) {
-	if o.IntegrationDirectory == "" {
-		return local.GetDependencies(o.Context, cmd, args, o.Dependencies, o.MavenRepositories, true)
-	}
-
-	// Set up on the integration directory
-
-	// Fetch local dependencies
-	dependencies, err := local.GetBuildDependencies(o.IntegrationDirectory)
-	if err != nil {
-		return nil, err
-	}
-	if err := o.setupDependenciesForQuarkusRun(); err != nil {
-		return dependencies, err
-	}
-
-	return dependencies, nil
-}
-
-// setupDependenciesForQuarkusRun sets up resources under the integration directory for running Quarkus app.
-func (o *localRunCmdOptions) setupDependenciesForQuarkusRun() error {
-	// Local dependencies directory
-	localDependenciesDir := local.GetCustomDependenciesDir(o.IntegrationDirectory)
-
-	// The quarkus application files need to be at a specific location i.e.:
-	// <integration_directory>/../quarkus/quarkus-application.dat
-	// <integration_directory>/../quarkus/generated-bytecode.jar
-	localQuarkusDir := local.GetCustomQuarkusDir(o.IntegrationDirectory)
-	if err := local.CopyQuarkusAppFiles(localDependenciesDir, localQuarkusDir); err != nil {
-		return err
-	}
-
-	// The dependency jar files need to be at a specific location i.e.:
-	// <integration_directory>/../lib/main/*.jar
-	localLibDir := local.GetCustomLibDir(o.IntegrationDirectory)
-	if err := local.CopyLibFiles(localDependenciesDir, localLibDir); err != nil {
-		return err
-	}
-
-	// The Camel K jar file needs to be at a specific location i.e.:
-	// <integration_directory>/../app/camel-k-integration-X.X.X{-SNAPSHOT}.jar
-	localAppDir := local.GetCustomAppDir(o.IntegrationDirectory)
-	if err := local.CopyAppFile(localDependenciesDir, localAppDir); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-// processPropertyFiles processes integration properties which may come from files or CLI.
-func (o *localRunCmdOptions) processPropertyFiles() ([]string, error) {
-	propertyFiles := o.PropertyFiles
-	hasIntegrationDir := o.IntegrationDirectory != ""
-	if hasIntegrationDir {
-		localPropertyFiles, err := local.GetBuildProperties(o.IntegrationDirectory)
-		if err != nil {
-			return nil, err
-		}
-		propertyFiles = localPropertyFiles
-	}
-
-	return local.UpdateIntegrationProperties(o.Properties, propertyFiles, hasIntegrationDir)
-}
-
-func (o *localRunCmdOptions) processRoutes(args []string) ([]string, error) {
-	if o.IntegrationDirectory == "" {
-		return args, nil
-	}
-
-	return local.GetBuildRoutes(o.IntegrationDirectory)
-}
-
-func (o *localRunCmdOptions) getPropertiesDir() string {
-	if o.IntegrationDirectory == "" {
-		return local.GetLocalPropertiesDir()
-	}
-
-	return local.GetCustomPropertiesDir(o.IntegrationDirectory)
-}
-
-func (o *localRunCmdOptions) deinit() error {
-	if o.Containerize {
-		if err := local.DeleteDockerBaseWorkingDirectory(); err != nil {
-			return err
-		}
-
-		if err := local.DeleteDockerWorkingDirectory(); err != nil {
-			return err
-		}
-	}
-
-	if o.IntegrationDirectory != "" {
-		if err := local.DeleteLocalIntegrationDirs(o.IntegrationDirectory); err != nil {
-			return err
-		}
-	}
-
-	return local.DeleteMavenWorkingDirectory()
-}
diff --git a/pkg/cmd/local_run_test.go b/pkg/cmd/local_run_test.go
deleted file mode 100644
index 6dfa1867e..000000000
--- a/pkg/cmd/local_run_test.go
+++ /dev/null
@@ -1,109 +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/apache/camel-k/v2/pkg/util/test"
-	"github.com/spf13/cobra"
-	"github.com/stretchr/testify/assert"
-	"github.com/stretchr/testify/require"
-)
-
-func addTestLocalRunCmd(rootCmdOptions *RootCmdOptions, rootCmd *cobra.Command) *localRunCmdOptions {
-	localCmd, localCmdOptions := newCmdLocal(rootCmdOptions)
-	// remove predefined sub commands
-	localCmd.RemoveCommand(localCmd.Commands()...)
-	// add a testing version of run Command
-	localRunCmd, localRunCmdOptions := newCmdLocalRun(localCmdOptions)
-	localRunCmd.RunE = func(c *cobra.Command, args []string) error {
-		return nil
-	}
-	localRunCmd.Args = test.ArbitraryArgs
-	localCmd.AddCommand(localRunCmd)
-	rootCmd.AddCommand(localCmd)
-	return localRunCmdOptions
-}
-
-func TestLocalRunPropertyFileFlag(t *testing.T) {
-	options, rootCmd := kamelTestPreAddCommandInit()
-	localRunCmdOptions := addTestLocalRunCmd(options, rootCmd)
-	kamelTestPostAddCommandInit(t, rootCmd)
-
-	_, err := test.ExecuteCommand(rootCmd, "local", "run", "route.java",
-		"--property-file", "file1.properties",
-		"--property-file", "file2.properties")
-
-	require.NoError(t, err)
-	if len(localRunCmdOptions.PropertyFiles) != 2 {
-		t.Fatalf("Property files expected to contain: \n %v elements\nGot:\n %v elements\n", 2, len(localRunCmdOptions.PropertyFiles))
-	}
-	if localRunCmdOptions.PropertyFiles[0] != "file1.properties" || localRunCmdOptions.PropertyFiles[1] != "file2.properties" {
-		t.Fatalf("Property files expected to be: \n %v\nGot:\n %v\n", "[file1.properties, file2.properties]", localRunCmdOptions.PropertyFiles)
-	}
-}
-
-func TestLocalRunPropertiesFlag(t *testing.T) {
-	options, rootCmd := kamelTestPreAddCommandInit()
-	localRunCmdOptions := addTestLocalRunCmd(options, rootCmd)
-	kamelTestPostAddCommandInit(t, rootCmd)
-
-	_, err := test.ExecuteCommand(rootCmd, "local", "run", "route.java",
-		"-p", "prop1=value1",
-		"-p", "prop2=value2")
-
-	require.NoError(t, err)
-	if len(localRunCmdOptions.Properties) != 2 {
-		t.Fatalf("Additional dependencies expected to contain: \n %v elements\nGot:\n %v elements\n", 2, len(localRunCmdOptions.Properties))
-	}
-	if localRunCmdOptions.Properties[0] != "prop1=value1" || localRunCmdOptions.Properties[1] != "prop2=value2" {
-		t.Fatalf("Additional dependencies expected to be: \n %v\nGot:\n %v\n", "[prop1=value1, prop2=value2]", localRunCmdOptions.Properties)
-	}
-}
-
-func TestLocalRunAdditionalDependenciesFlag(t *testing.T) {
-	options, rootCmd := kamelTestPreAddCommandInit()
-	localRunCmdOptions := addTestLocalRunCmd(options, rootCmd)
-	kamelTestPostAddCommandInit(t, rootCmd)
-
-	_, err := test.ExecuteCommand(rootCmd, "local", "run", "route.java",
-		"-d", "camel-amqp",
-		"-d", "camel:bean",
-		"-d", "camel-quarkus-controlbus",
-		"-d", "camel-quarkus:directvm",
-		"--dependency", "mvn:test:component:1.0.0")
-
-	require.NoError(t, err)
-	assert.Len(t, localRunCmdOptions.Dependencies, 5)
-	assert.ElementsMatch(t, localRunCmdOptions.Dependencies, []string{
-		"camel:amqp", "camel:bean", "camel:controlbus", "camel:directvm", "mvn:test:component:1.0.0",
-	})
-}
-
-func TestLocalRunAcceptsTraits(t *testing.T) {
-	options, rootCmd := kamelTestPreAddCommandInit()
-	addTestLocalRunCmd(options, rootCmd)
-	kamelTestPostAddCommandInit(t, rootCmd)
-
-	_, err := test.ExecuteCommand(rootCmd, "local", "run", "route.java",
-		"-t", "jolokia.enabled=true",
-		"--trait", "prometheus.enabled=true")
-
-	require.NoError(t, err)
-}
diff --git a/pkg/cmd/modeline_test.go b/pkg/cmd/modeline_test.go
index 02c710d9f..3b5e6855c 100644
--- a/pkg/cmd/modeline_test.go
+++ b/pkg/cmd/modeline_test.go
@@ -464,49 +464,6 @@ func TestModelineRunResourceFile(t *testing.T) {
 	assert.NoError(t, err)
 }
 
-func TestModelineInspectSimple(t *testing.T) {
-	err := util.WithTempDir("camel-k-test-", func(dir string) error {
-
-		file := `
-		// camel-k: dependency=mvn:org.my:lib:1.0
-	`
-		fileName := filepath.Join(dir, "simple.groovy")
-		err := os.WriteFile(fileName, []byte(file), 0o400)
-		assert.NoError(t, err)
-
-		cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "local", "inspect", fileName})
-		assert.NoError(t, err)
-		assert.NotNil(t, cmd)
-		assert.Equal(t, []string{"local", "inspect", fileName, "--dependency=mvn:org.my:lib:1.0"}, flags)
-
-		return nil
-	})
-
-	assert.NoError(t, err)
-}
-
-func TestModelineInspectMultipleDeps(t *testing.T) {
-	err := util.WithTempDir("camel-k-test-", func(dir string) error {
-
-		file := `
-		// camel-k: dependency=mvn:org.my:lib:1.0
-		// camel-k: dependency=camel-k:camel-dep
-	`
-		fileName := filepath.Join(dir, "simple.groovy")
-		err := os.WriteFile(fileName, []byte(file), 0o400)
-		assert.NoError(t, err)
-
-		cmd, flags, err := NewKamelWithModelineCommand(context.TODO(), []string{"kamel", "local", "inspect", fileName})
-		assert.NoError(t, err)
-		assert.NotNil(t, cmd)
-		assert.Equal(t, []string{"local", "inspect", fileName, "--dependency=mvn:org.my:lib:1.0", "--dependency=camel-k:camel-dep"}, flags)
-
-		return nil
-	})
-
-	assert.NoError(t, err)
-}
-
 func TestModelineQuotedPodTemplate(t *testing.T) {
 	err := util.WithTempDir("camel-k-test-", func(dir string) error {
 
diff --git a/pkg/cmd/promote_test.go b/pkg/cmd/promote_test.go
index d12ceed43..d63543902 100644
--- a/pkg/cmd/promote_test.go
+++ b/pkg/cmd/promote_test.go
@@ -62,8 +62,8 @@ func TestIntegrationNotCompatible(t *testing.T) {
 	dstPlatform.Status.Build.RuntimeVersion = "0.0.1"
 	dstPlatform.Status.Phase = v1.IntegrationPlatformPhaseReady
 	defaultIntegration := nominalIntegration("my-it-test")
-	srcCatalog := createCamelCatalog(srcPlatform)
-	dstCatalog := createCamelCatalog(dstPlatform)
+	srcCatalog := createTestCamelCatalog(srcPlatform)
+	dstCatalog := createTestCamelCatalog(dstPlatform)
 
 	promoteCmdOptions, promoteCmd, _ := initializePromoteCmdOptions(t, &srcPlatform, &dstPlatform, &defaultIntegration, &srcCatalog, &dstCatalog)
 	_, err := test.ExecuteCommand(promoteCmd, cmdPromote, "my-it-test", "--to", "prod-namespace", "-o", "yaml", "-n", "default")
@@ -85,8 +85,8 @@ func TestIntegrationDryRun(t *testing.T) {
 	dstPlatform.Status.Build.RuntimeVersion = defaults.DefaultRuntimeVersion
 	dstPlatform.Status.Phase = v1.IntegrationPlatformPhaseReady
 	defaultIntegration := nominalIntegration("my-it-test")
-	srcCatalog := createCamelCatalog(srcPlatform)
-	dstCatalog := createCamelCatalog(dstPlatform)
+	srcCatalog := createTestCamelCatalog(srcPlatform)
+	dstCatalog := createTestCamelCatalog(dstPlatform)
 
 	promoteCmdOptions, promoteCmd, _ := initializePromoteCmdOptions(t, &srcPlatform, &dstPlatform, &defaultIntegration, &srcCatalog, &dstCatalog)
 	output, err := test.ExecuteCommand(promoteCmd, cmdPromote, "my-it-test", "--to", "prod-namespace", "-o", "yaml", "-n", "default")
@@ -124,8 +124,8 @@ func TestPipeDryRun(t *testing.T) {
 	dstPlatform.Status.Phase = v1.IntegrationPlatformPhaseReady
 	defaultKB := nominalPipe("my-kb-test")
 	defaultIntegration := nominalIntegration("my-kb-test")
-	srcCatalog := createCamelCatalog(srcPlatform)
-	dstCatalog := createCamelCatalog(dstPlatform)
+	srcCatalog := createTestCamelCatalog(srcPlatform)
+	dstCatalog := createTestCamelCatalog(dstPlatform)
 
 	promoteCmdOptions, promoteCmd, _ := initializePromoteCmdOptions(t, &srcPlatform, &dstPlatform, &defaultKB, &defaultIntegration, &srcCatalog, &dstCatalog)
 	output, err := test.ExecuteCommand(promoteCmd, cmdPromote, "my-kb-test", "--to", "prod-namespace", "-o", "yaml", "-n", "default")
@@ -155,7 +155,7 @@ func nominalPipe(name string) v1.Pipe {
 	return kb
 }
 
-func createCamelCatalog(platform v1.IntegrationPlatform) v1.CamelCatalog {
+func createTestCamelCatalog(platform v1.IntegrationPlatform) v1.CamelCatalog {
 	c := v1.NewCamelCatalog(platform.Namespace, defaults.DefaultRuntimeVersion)
 	c.Spec = v1.CamelCatalogSpec{Runtime: v1.RuntimeSpec{Provider: platform.Status.Build.RuntimeProvider, Version: platform.Status.Build.RuntimeVersion}}
 	return c
diff --git a/pkg/cmd/root.go b/pkg/cmd/root.go
index 47ff24d08..d20b1b30c 100644
--- a/pkg/cmd/root.go
+++ b/pkg/cmd/root.go
@@ -145,10 +145,8 @@ func addKamelSubcommands(cmd *cobra.Command, options *RootCmdOptions) {
 	cmd.AddCommand(cmdOnly(newCmdRebuild(options)))
 	cmd.AddCommand(cmdOnly(newCmdOperator()))
 	cmd.AddCommand(cmdOnly(newCmdBuilder(options)))
-	cmd.AddCommand(cmdOnly(newCmdInit(options)))
 	cmd.AddCommand(cmdOnly(newCmdDebug(options)))
 	cmd.AddCommand(cmdOnly(newCmdDump(options)))
-	cmd.AddCommand(cmdOnly(newCmdLocal(options)))
 	cmd.AddCommand(cmdOnly(newCmdBind(options)))
 	cmd.AddCommand(cmdOnly(newCmdPromote(options)))
 	cmd.AddCommand(newCmdKamelet(options))
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index 228d1dde3..740682488 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -60,7 +60,6 @@ import (
 
 	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/cmd/local"
 	"github.com/apache/camel-k/v2/pkg/cmd/source"
 	"github.com/apache/camel-k/v2/pkg/platform"
 	"github.com/apache/camel-k/v2/pkg/trait"
@@ -263,7 +262,7 @@ func (o *runCmdOptions) validate() error {
 
 	propertyFiles := filterBuildPropertyFiles(o.Properties)
 	propertyFiles = append(propertyFiles, filterBuildPropertyFiles(o.BuildProperties)...)
-	err := local.ValidatePropertyFiles(propertyFiles)
+	err := validatePropertyFiles(propertyFiles)
 	if err != nil {
 		return err
 	}
@@ -823,7 +822,7 @@ func (o *runCmdOptions) applyDependencies(cmd *cobra.Command, c client.Client, i
 				// And the validation only warns potential misusages of Camel components at the CLI level,
 				// so strictness of catalog version is not necessary here.
 				var err error
-				catalog, err = local.CreateCamelCatalog(o.Context)
+				catalog, err = createCamelCatalog(o.Context)
 				if err != nil {
 					return err
 				}
diff --git a/pkg/cmd/run_support.go b/pkg/cmd/run_support.go
index 8c24588fc..ee7ffb163 100644
--- a/pkg/cmd/run_support.go
+++ b/pkg/cmd/run_support.go
@@ -31,11 +31,13 @@ import (
 
 	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/cmd/source"
 	"github.com/apache/camel-k/v2/pkg/util/camel"
+	"github.com/apache/camel-k/v2/pkg/util/defaults"
 	"github.com/apache/camel-k/v2/pkg/util/kubernetes"
+	"github.com/apache/camel-k/v2/pkg/util/maven"
 	"github.com/apache/camel-k/v2/pkg/util/resource"
 	"github.com/magiconair/properties"
+	"github.com/pkg/errors"
 	"github.com/spf13/cobra"
 	corev1 "k8s.io/api/core/v1"
 )
@@ -60,25 +62,6 @@ func parseConfigAndGenCm(ctx context.Context, cmd *cobra.Command, c client.Clien
 		if secret == nil {
 			fmt.Fprintln(cmd.ErrOrStderr(), "Warn:", config.Name(), "Secret not found in", integration.Namespace, "namespace, make sure to provide it before the Integration can run")
 		}
-	case resource.StorageTypeFile:
-		// Don't allow a binary non compressed resource
-		rawData, contentType, err := source.LoadRawContent(ctx, config.Name())
-		if err != nil {
-			return nil, err
-		}
-		if config.ContentType() != resource.ContentTypeData && !enableCompression && source.IsBinary(contentType) {
-			return nil, fmt.Errorf("you cannot provide a binary config, use a text file or check --resource flag instead")
-		}
-		resourceType := v1.ResourceTypeData
-		if config.ContentType() == resource.ContentTypeText {
-			resourceType = v1.ResourceTypeConfig
-		}
-		resourceSpec, err := binaryOrTextResource(filepath.Base(config.Name()), rawData, contentType, enableCompression, resourceType, config.DestinationPath())
-		if err != nil {
-			return nil, err
-		}
-
-		return resource.ConvertFileToConfigmap(ctx, c, config, integration.Namespace, integration.Name, resourceSpec.Content, resourceSpec.RawContent)
 	default:
 		// Should never reach this
 		return nil, fmt.Errorf("invalid option type %s", config.StorageType())
@@ -87,36 +70,6 @@ func parseConfigAndGenCm(ctx context.Context, cmd *cobra.Command, c client.Clien
 	return nil, nil
 }
 
-func binaryOrTextResource(fileName string, data []byte, contentType string, base64Compression bool, resourceType v1.ResourceType, destinationPath string) (v1.ResourceSpec, error) {
-	resourceSpec := v1.ResourceSpec{
-		DataSpec: v1.DataSpec{
-			Name:        fileName,
-			Path:        destinationPath,
-			ContentKey:  fileName,
-			ContentType: contentType,
-			Compression: false,
-		},
-		Type: resourceType,
-	}
-
-	if !base64Compression && source.IsBinary(contentType) {
-		resourceSpec.RawContent = data
-		return resourceSpec, nil
-	}
-	// either is a text resource or base64 compression is enabled
-	if base64Compression {
-		content, err := source.CompressToString(data)
-		if err != nil {
-			return resourceSpec, err
-		}
-		resourceSpec.Content = content
-		resourceSpec.Compression = true
-	} else {
-		resourceSpec.Content = string(data)
-	}
-	return resourceSpec, nil
-}
-
 func filterFileLocation(maybeFileLocations []string) []string {
 	filteredOptions := make([]string, 0)
 	for _, option := range maybeFileLocations {
@@ -206,3 +159,64 @@ func downloadDependency(ctx context.Context, url url.URL) (string, error) {
 	}
 	return out.Name(), nil
 }
+
+func validatePropertyFiles(propertyFiles []string) error {
+	for _, fileName := range propertyFiles {
+		if err := validatePropertyFile(fileName); err != nil {
+			return err
+		}
+	}
+
+	return nil
+}
+
+func validatePropertyFile(fileName string) error {
+	if !strings.HasSuffix(fileName, ".properties") {
+		return fmt.Errorf("supported property files must have a .properties extension: %s", fileName)
+	}
+
+	if file, err := os.Stat(fileName); err != nil {
+		return errors.Wrapf(err, "unable to access property file %s", fileName)
+	} else if file.IsDir() {
+		return fmt.Errorf("property file %s is a directory", fileName)
+	}
+
+	return nil
+}
+
+func createCamelCatalog(ctx context.Context) (*camel.RuntimeCatalog, error) {
+	// Attempt to reuse existing Camel catalog if one is present
+	catalog, err := camel.DefaultCatalog()
+	if err != nil {
+		return nil, err
+	}
+
+	// Generate catalog if one was not found
+	if catalog == nil {
+		catalog, err = generateCatalog(ctx)
+		if err != nil {
+			return nil, err
+		}
+	}
+
+	return catalog, nil
+}
+
+func generateCatalog(ctx context.Context) (*camel.RuntimeCatalog, error) {
+	// A Camel catalog is required for this operation
+	mvn := v1.MavenSpec{
+		LocalRepository: "",
+	}
+	runtime := v1.RuntimeSpec{
+		Version:  defaults.DefaultRuntimeVersion,
+		Provider: v1.RuntimeProviderQuarkus,
+	}
+	var providerDependencies []maven.Dependency
+	var caCert [][]byte
+	catalog, err := camel.GenerateCatalogCommon(ctx, nil, nil, caCert, mvn, runtime, providerDependencies)
+	if err != nil {
+		return nil, err
+	}
+
+	return catalog, nil
+}
diff --git a/pkg/cmd/run_support_test.go b/pkg/cmd/run_support_test.go
index 970e81450..15ff0d93f 100644
--- a/pkg/cmd/run_support_test.go
+++ b/pkg/cmd/run_support_test.go
@@ -24,55 +24,9 @@ import (
 	"strings"
 	"testing"
 
-	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
-	"github.com/apache/camel-k/v2/pkg/cmd/source"
 	"github.com/stretchr/testify/assert"
 )
 
-func TestRunBinaryResource(t *testing.T) {
-	binaryResourceSpec, err := binaryOrTextResource("file.ext", []byte{1, 2, 3, 4}, "application/octet-stream", false, v1.ResourceTypeData, "")
-	assert.Nil(t, err)
-	assert.Equal(t, "", binaryResourceSpec.Content)
-	assert.NotNil(t, binaryResourceSpec.RawContent)
-	assert.Equal(t, "file.ext", binaryResourceSpec.Name)
-	assert.Equal(t, "application/octet-stream", binaryResourceSpec.ContentType)
-	assert.False(t, binaryResourceSpec.Compression)
-}
-
-func TestRunBinaryCompressedResource(t *testing.T) {
-	data := []byte{1, 2, 3, 4}
-	base64Compressed, _ := source.CompressToString(data)
-	binaryResourceSpec, err := binaryOrTextResource("file.ext", data, "application/octet-stream", true, v1.ResourceTypeData, "")
-	assert.Nil(t, err)
-	assert.Equal(t, base64Compressed, binaryResourceSpec.Content)
-	assert.Nil(t, binaryResourceSpec.RawContent)
-	assert.Equal(t, "file.ext", binaryResourceSpec.Name)
-	assert.Equal(t, "application/octet-stream", binaryResourceSpec.ContentType)
-	assert.True(t, binaryResourceSpec.Compression)
-}
-
-func TestRunTextResource(t *testing.T) {
-	textResourceSpec, err := binaryOrTextResource("file.ext", []byte("hello world"), "text/plain", false, v1.ResourceTypeData, "")
-	assert.Nil(t, err)
-	assert.Equal(t, "hello world", textResourceSpec.Content)
-	assert.Nil(t, textResourceSpec.RawContent)
-	assert.Equal(t, "file.ext", textResourceSpec.Name)
-	assert.Equal(t, "text/plain", textResourceSpec.ContentType)
-	assert.False(t, textResourceSpec.Compression)
-}
-
-func TestRunTextCompressedResource(t *testing.T) {
-	data := []byte("hello horld")
-	base64Compressed, _ := source.CompressToString(data)
-	textResourceSpec, err := binaryOrTextResource("file.ext", []byte("hello horld"), "text/plain", true, v1.ResourceTypeData, "")
-	assert.Nil(t, err)
-	assert.Equal(t, base64Compressed, textResourceSpec.Content)
-	assert.Nil(t, textResourceSpec.RawContent)
-	assert.Equal(t, "file.ext", textResourceSpec.Name)
-	assert.Equal(t, "text/plain", textResourceSpec.ContentType)
-	assert.True(t, textResourceSpec.Compression)
-}
-
 func TestFilterFileLocation(t *testing.T) {
 	optionFileLocations := []string{
 		"file:/path/to/valid/file",
diff --git a/pkg/resources/resources.go b/pkg/resources/resources.go
index eef958a20..10cb52fb6 100644
--- a/pkg/resources/resources.go
+++ b/pkg/resources/resources.go
@@ -152,9 +152,9 @@ var assets = func() http.FileSystem {
 		"/crd/bases/camel.apache.org_kameletbindings.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "camel.apache.org_kameletbindings.yaml",
 			modTime:          time.Time{},
-			uncompressedSize: 574426,
+			uncompressedSize: 574267,
 
-			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x6b\x73\x1b\x37\xb6\x30\x0a\x7f\xf7\xaf\x40\xc9\xa9\x47\xd2\x8e\x48\xd9\x99\x99\xd4\x8c\xdf\xa9\x9d\xd2\xc8\x72\xa2\x37\xb6\xcc\xb2\x94\xe4\x49\x39\xd9\x09\xd8\x0d\x92\xd8\xea\x06\x7a\x00\x34\x25\xe6\xf8\xfc\xf7\x53\x58\x00\xfa\xc2\x9b\xb0\x9a\x92\x46\x9e\x69\x4c\x55\xc6\xa4\xd8\xab\x71\x5b\xf7\xdb\x73\x32\xb8\xbf\xf1\xec\x39\x79\xcb\x13\x26\x34\x4b\x89\x91\xc4\xcc\x18\x39\x29\x68\x32\x63\xe4\x52\x4e\xcc\x0d\x [...]
+			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x6b\x73\x1b\x37\xb6\x30\x0a\x7f\xf7\xaf\x40\xc9\xa9\x47\xd2\x8e\x48\xd9\x99\x99\xd4\x8c\xdf\xa9\x9d\xd2\xc8\x72\xa2\x37\xb6\xcc\xb2\x94\xe4\x49\x39\xd9\x09\xd8\x0d\x92\xd8\xea\x06\x7a\x00\x34\x25\xe6\xf8\xfc\xf7\x53\x58\x00\xfa\xc2\x9b\xb0\x9a\x92\x46\x9e\x69\x4c\x55\xc6\xa4\xd8\xab\x71\x5b\xf7\xdb\x73\x32\xb8\xbf\xf1\xec\x39\x79\xcb\x13\x26\x34\x4b\x89\x91\xc4\xcc\x18\x39\x29\x68\x32\x63\xe4\x52\x4e\xcc\x0d\x [...]
 		},
 		"/crd/bases/camel.apache.org_kamelets.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "camel.apache.org_kamelets.yaml",
@@ -166,14 +166,26 @@ var assets = func() http.FileSystem {
 		"/crd/bases/camel.apache.org_pipes.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "camel.apache.org_pipes.yaml",
 			modTime:          time.Time{},
-			uncompressedSize: 574151,
+			uncompressedSize: 541535,
 
-			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x79\x73\x1b\x37\xb6\x38\x0c\xff\xef\x4f\x81\x92\x53\x3f\x49\x37\x22\x65\x67\x96\x9a\xf1\x3b\x75\x53\xba\xb2\xec\xe8\x8d\x2d\xb3\x2c\x25\xf9\xa5\x9c\xdc\x04\xec\x06\x49\x5c\x75\x03\x7d\x01\x34\x25\xe6\xf1\xf3\xdd\x9f\xc2\x01\xd0\x0b\x37\xe1\x34\x25\x8d\x3c\xd3\x98\xaa\x8c\x49\xb1\x4f\x63\x3b\xfb\xf6\x9c\x0c\xee\x6f\x3c\x7b\x4e\xde\xf1\x84\x09\xcd\x52\x62\x24\x31\x33\x46\x4e\x0a\x9a\xcc\x18\xb9\x94\x13\x73\x43\x [...]
+			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x79\x73\x1b\x37\xb6\x38\x0c\xff\xef\x4f\x81\x92\x53\x3f\x49\x37\x22\x65\x67\x96\x9a\xf1\x3b\x75\x53\xba\xb2\xec\xe8\x8d\x2d\xb3\x2c\x25\xf9\xa5\x9c\xdc\x04\xec\x06\x49\x5c\x75\x03\x7d\x01\x34\x25\xe6\xf1\xf3\xdd\x9f\xc2\x01\xd0\x0b\x37\xe1\x34\x25\x8d\x3c\xd3\x98\xaa\x8c\x49\xb1\x4f\x63\x3b\xfb\xf6\x9c\x0c\xee\x6f\x3c\x7b\x4e\xde\xf1\x84\x09\xcd\x52\x62\x24\x31\x33\x46\x4e\x0a\x9a\xcc\x18\xb9\x94\x13\x73\x43\x [...]
 		},
 		"/manager": &vfsgen۰DirInfo{
 			name:    "manager",
 			modTime: time.Time{},
 		},
+		"/manager/bundle": &vfsgen۰DirInfo{
+			name:    "bundle",
+			modTime: time.Time{},
+		},
+		"/manager/bundle/manifests": &vfsgen۰DirInfo{
+			name:    "manifests",
+			modTime: time.Time{},
+		},
+		"/manager/bundle/metadata": &vfsgen۰DirInfo{
+			name:    "metadata",
+			modTime: time.Time{},
+		},
 		"/manager/operator-deployment.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "operator-deployment.yaml",
 			modTime:          time.Time{},
@@ -686,6 +698,7 @@ var assets = func() http.FileSystem {
 		fs["/crd/bases/camel.apache.org_pipes.yaml"].(os.FileInfo),
 	}
 	fs["/manager"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
+		fs["/manager/bundle"].(os.FileInfo),
 		fs["/manager/operator-deployment.yaml"].(os.FileInfo),
 		fs["/manager/operator-pvc.yaml"].(os.FileInfo),
 		fs["/manager/operator-service-account.yaml"].(os.FileInfo),
@@ -699,6 +712,10 @@ var assets = func() http.FileSystem {
 		fs["/manager/patch-toleration.yaml"].(os.FileInfo),
 		fs["/manager/patch-watch-namespace-global.yaml"].(os.FileInfo),
 	}
+	fs["/manager/bundle"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
+		fs["/manager/bundle/manifests"].(os.FileInfo),
+		fs["/manager/bundle/metadata"].(os.FileInfo),
+	}
 	fs["/prometheus"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
 		fs["/prometheus/operator-pod-monitor.yaml"].(os.FileInfo),
 		fs["/prometheus/operator-prometheus-rule.yaml"].(os.FileInfo),
diff --git a/pkg/trait/openapi.go b/pkg/trait/openapi.go
index 09a478066..5f2f8dc30 100644
--- a/pkg/trait/openapi.go
+++ b/pkg/trait/openapi.go
@@ -303,7 +303,7 @@ func (t *openAPITrait) createNewOpenAPIConfigMap(e *Environment, resource v1.Dat
 				"camel.apache.org/source.name":        resource.Name,
 				"camel.apache.org/source.compression": strconv.FormatBool(resource.Compression),
 				"camel.apache.org/source.generated":   "true",
-				"camel.apache.org/source.type":        string(v1.ResourceTypeOpenAPI),
+				"camel.apache.org/source.type":        "openapi",
 				"camel.apache.org/source.digest":      hash,
 			},
 		},
diff --git a/pkg/trait/service_test.go b/pkg/trait/service_test.go
index b5310400e..6de827890 100644
--- a/pkg/trait/service_test.go
+++ b/pkg/trait/service_test.go
@@ -335,6 +335,7 @@ func TestServiceWithNodePort(t *testing.T) {
 	compressedRoute, err := gzip.CompressBase64([]byte(`from("netty-http:test").log("hello")`))
 	assert.NoError(t, err)
 
+	serviceType := traitv1.ServiceTypeNodePort
 	environment := Environment{
 		CamelCatalog: catalog,
 		Catalog:      traitCatalog,
@@ -364,8 +365,8 @@ func TestServiceWithNodePort(t *testing.T) {
 						Trait: traitv1.Trait{
 							Enabled: pointer.Bool(true),
 						},
-						Auto:     pointer.Bool(false),
-						NodePort: pointer.Bool(true),
+						Auto: pointer.Bool(false),
+						Type: &serviceType,
 					},
 				},
 			},
diff --git a/pkg/trait/trait_configure_test.go b/pkg/trait/trait_configure_test.go
index 66117a984..52af5df1e 100644
--- a/pkg/trait/trait_configure_test.go
+++ b/pkg/trait/trait_configure_test.go
@@ -45,8 +45,7 @@ func TestTraitConfiguration(t *testing.T) {
 						Trait: traitv1.Trait{
 							Enabled: pointer.Bool(true),
 						},
-						Auto:     pointer.Bool(true),
-						NodePort: pointer.Bool(false),
+						Auto: pointer.Bool(true),
 					},
 				},
 			},
@@ -63,7 +62,6 @@ func TestTraitConfiguration(t *testing.T) {
 	require.True(t, ok)
 	assert.True(t, *service.Enabled)
 	assert.True(t, *service.Auto)
-	assert.False(t, *service.NodePort)
 }
 
 func TestTraitConfigurationFromAnnotations(t *testing.T) {
diff --git a/pkg/util/kubernetes/resolver.go b/pkg/util/kubernetes/resolver.go
index a6d47be14..fef16369f 100644
--- a/pkg/util/kubernetes/resolver.go
+++ b/pkg/util/kubernetes/resolver.go
@@ -41,19 +41,6 @@ func ResolveSources(elements []v1.SourceSpec, mapLookup func(string) (*corev1.Co
 	return elements, nil
 }
 
-// ResolveResource --.
-func ResolveResource(elements []v1.ResourceSpec, mapLookup func(string) (*corev1.ConfigMap, error)) ([]v1.ResourceSpec, error) {
-	for i := 0; i < len(elements); i++ {
-		r := &elements[i]
-
-		if err := Resolve(&r.DataSpec, mapLookup); err != nil {
-			return nil, err
-		}
-	}
-
-	return elements, nil
-}
-
 // Resolve --.
 func Resolve(data *v1.DataSpec, mapLookup func(string) (*corev1.ConfigMap, error)) error {
 	// if it is a reference, get the content from the
diff --git a/pkg/util/log/log.go b/pkg/util/log/log.go
index 8f9f86569..07051df96 100644
--- a/pkg/util/log/log.go
+++ b/pkg/util/log/log.go
@@ -150,7 +150,7 @@ func (l Logger) ForPipe(target *v1.Pipe) Logger {
 }
 
 // ForKameletBinding --.
-// Deprecated: use ForBinding instead.
+// Deprecated: use ForPipe instead.
 func (l Logger) ForKameletBinding(target *v1alpha1.KameletBinding) Logger {
 	return l.WithValues(
 		"api-version", target.APIVersion,
diff --git a/pkg/util/resource/config.go b/pkg/util/resource/config.go
index 3bb106597..474c14aee 100644
--- a/pkg/util/resource/config.go
+++ b/pkg/util/resource/config.go
@@ -87,8 +87,6 @@ const (
 	StorageTypeConfigmap StorageType = "configmap"
 	// StorageTypeSecret --.
 	StorageTypeSecret StorageType = "secret"
-	// StorageTypeFile --.
-	StorageTypeFile StorageType = "file"
 	// StorageTypePVC --.
 	StorageTypePVC StorageType = "pvc"
 )
@@ -105,12 +103,11 @@ const (
 
 var (
 	validConfigSecretRegexp = regexp.MustCompile(`^(configmap|secret)\:([\w\.\-\_\:\/@]+)$`)
-	validFileRegexp         = regexp.MustCompile(`^file\:([\w\.\-\_\:\/@" ]+)$`)
 	validResourceRegexp     = regexp.MustCompile(`^([\w\.\-\_\:]+)(\/([\w\.\-\_\:]+))?(\@([\w\.\-\_\:\/]+))?$`)
 )
 
 func newConfig(storageType StorageType, contentType ContentType, value string) *Config {
-	rn, mk, mp := parseResourceValue(storageType, value)
+	rn, mk, mp := parseCMOrSecretValue(value)
 	return &Config{
 		storageType:     storageType,
 		contentType:     contentType,
@@ -120,15 +117,6 @@ func newConfig(storageType StorageType, contentType ContentType, value string) *
 	}
 }
 
-func parseResourceValue(storageType StorageType, value string) (string, string, string) {
-	if storageType == StorageTypeFile {
-		resource, maybeDestinationPath := ParseFileValue(value)
-		return resource, "", maybeDestinationPath
-	}
-
-	return parseCMOrSecretValue(value)
-}
-
 // ParseFileValue will parse a file resource/config option to return the local path and the
 // destination path expected.
 func ParseFileValue(value string) (string, string) {
@@ -189,13 +177,8 @@ func parse(item string, contentType ContentType) (*Config, error) {
 			cot = StorageTypeSecret
 		}
 		value = groups[2]
-	case validFileRegexp.MatchString(item):
-		// parse as file
-		groups := validFileRegexp.FindStringSubmatch(item)
-		cot = StorageTypeFile
-		value = groups[1]
 	default:
-		return nil, fmt.Errorf("could not match config, secret or file configuration as %s", item)
+		return nil, fmt.Errorf("could not match config or secret configuration as %s", item)
 	}
 
 	return newConfig(cot, contentType, value), nil
diff --git a/pkg/util/resource/config_test.go b/pkg/util/resource/config_test.go
index bb28d858b..f099a0487 100644
--- a/pkg/util/resource/config_test.go
+++ b/pkg/util/resource/config_test.go
@@ -26,9 +26,7 @@ import (
 func TestParseConfigOption(t *testing.T) {
 	validConfigMap := "configmap:my-config_map"
 	validSecret := "secret:my-secret"
-	validFile := "file:/tmp/my-file.txt"
 	notValid := "someprotocol:wrong"
-	validLocation := "file:my-file.txt@/tmp/another-name.xml"
 
 	configmap, err := ParseConfig(validConfigMap)
 	assert.Nil(t, err)
@@ -38,17 +36,8 @@ func TestParseConfigOption(t *testing.T) {
 	assert.Nil(t, err)
 	assert.Equal(t, StorageTypeSecret, secret.storageType)
 	assert.Equal(t, "my-secret", secret.Name())
-	file, err := ParseConfig(validFile)
-	assert.Nil(t, err)
-	assert.Equal(t, StorageTypeFile, file.storageType)
-	assert.Equal(t, "/tmp/my-file.txt", file.Name())
 	_, err = ParseConfig(notValid)
 	assert.NotNil(t, err)
-	location, err := ParseConfig(validLocation)
-	assert.Nil(t, err)
-	assert.Equal(t, StorageTypeFile, location.storageType)
-	assert.Equal(t, "my-file.txt", location.Name())
-	assert.Equal(t, "/tmp/another-name.xml", location.DestinationPath())
 }
 
 func TestParseConfigOptionAllParams(t *testing.T) {
@@ -60,9 +49,6 @@ func TestParseConfigOptionAllParams(t *testing.T) {
 	sec2 := "secret:sec/key"
 	sec3 := "secret:sec@/tmp/sec"
 	sec4 := "secret:sec"
-	file1 := "file:/path/to/my-file.txt@/tmp/file.txt"
-	file2 := "file:/path/to/my-file.txt"
-	file3 := "file:/path to/my-file.txt"
 
 	parsedCm1, err := ParseConfig(cm1)
 	assert.Nil(t, err)
@@ -119,25 +105,4 @@ func TestParseConfigOptionAllParams(t *testing.T) {
 	assert.Equal(t, "sec", parsedSec4.Name())
 	assert.Equal(t, "", parsedSec4.Key())
 	assert.Equal(t, "", parsedSec4.DestinationPath())
-
-	parsedFile1, err := ParseConfig(file1)
-	assert.Nil(t, err)
-	assert.Equal(t, StorageTypeFile, parsedFile1.StorageType())
-	assert.Equal(t, "/path/to/my-file.txt", parsedFile1.Name())
-	assert.Equal(t, "", parsedFile1.Key())
-	assert.Equal(t, "/tmp/file.txt", parsedFile1.DestinationPath())
-
-	parsedFile2, err := ParseConfig(file2)
-	assert.Nil(t, err)
-	assert.Equal(t, StorageTypeFile, parsedFile2.StorageType())
-	assert.Equal(t, "/path/to/my-file.txt", parsedFile2.Name())
-	assert.Equal(t, "", parsedFile2.Key())
-	assert.Equal(t, "", parsedFile2.DestinationPath())
-
-	parsedFile3, err := ParseConfig(file3)
-	assert.Nil(t, err)
-	assert.Equal(t, StorageTypeFile, parsedFile3.StorageType())
-	assert.Equal(t, "/path to/my-file.txt", parsedFile3.Name())
-	assert.Equal(t, "", parsedFile3.Key())
-	assert.Equal(t, "", parsedFile3.DestinationPath())
 }


[camel-k] 05/05: chore: bind with operator id

Posted by pc...@apache.org.
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 67f867144e52950eb93c664920c21dcd837b824f
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu May 4 16:16:45 2023 +0200

    chore: bind with operator id
---
 e2e/knative/kamelet_test.go       | 35 ++++++++++++-----------------------
 e2e/native/native_binding_test.go | 18 ++++--------------
 2 files changed, 16 insertions(+), 37 deletions(-)

diff --git a/e2e/knative/kamelet_test.go b/e2e/knative/kamelet_test.go
index 218b997d7..a89835fd0 100644
--- a/e2e/knative/kamelet_test.go
+++ b/e2e/knative/kamelet_test.go
@@ -39,32 +39,21 @@ import (
 // Test that a Pipe can be changed and the changes are propagated to the Integration
 func TestKameletChange(t *testing.T) {
 	RegisterTestingT(t)
+	timerPipe := "timer-binding"
 
 	knChannel := "test-kamelet-messages"
+	knChannelConf := fmt.Sprintf("%s:InMemoryChannel:%s", messaging.SchemeGroupVersion.String(), knChannel)
 	timerSource := "my-timer-source"
 	Expect(CreateTimerKamelet(ns, timerSource)()).To(Succeed())
 	Expect(CreateKnativeChannel(ns, knChannel)()).To(Succeed())
+	// Consumer route that will read from the KNative channel
 	Expect(KamelRunWithID(operatorID, ns, "files/test-kamelet-display.groovy", "-w").Execute()).To(Succeed())
 
-	from := corev1.ObjectReference{
-		Kind:       "Kamelet",
-		APIVersion: v1.SchemeGroupVersion.String(),
-		Name:       timerSource,
-	}
-
-	to := corev1.ObjectReference{
-		Kind:       "InMemoryChannel",
-		Name:       knChannel,
-		APIVersion: messaging.SchemeGroupVersion.String(),
-	}
-
-	timerPipe := "timer-binding"
-
 	// Create the Pipe
-	Expect(KamelBind(ns,
-		from.Name,
-		to.Name,
-		"-p", "source.message=message is Hello",
+	Expect(KamelBindWithID(operatorID, ns,
+		timerSource,
+		knChannelConf,
+		"-p", "source.message=HelloKNative!",
 		"--annotation", "trait.camel.apache.org/health.enabled=true",
 		"--annotation", "trait.camel.apache.org/health.readiness-initial-delay=10",
 		"--name", timerPipe,
@@ -72,7 +61,7 @@ func TestKameletChange(t *testing.T) {
 
 	Eventually(IntegrationPodPhase(ns, timerPipe), TestTimeoutLong).Should(Equal(corev1.PodRunning))
 	Eventually(IntegrationConditionStatus(ns, timerPipe, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-	Eventually(IntegrationLogs(ns, timerPipe), TestTimeoutShort).Should(ContainSubstring("message is Hello"))
+	Eventually(IntegrationLogs(ns, "test-kamelet-display"), TestTimeoutShort).Should(ContainSubstring("HelloKNative!"))
 
 	Eventually(PipeCondition(ns, timerPipe, v1.PipeConditionReady), TestTimeoutMedium).Should(And(
 		WithTransform(PipeConditionStatusExtract, Equal(corev1.ConditionTrue)),
@@ -81,9 +70,9 @@ func TestKameletChange(t *testing.T) {
 	))
 
 	// Update the Pipe
-	Expect(KamelBind(ns,
-		from.Name,
-		to.Name,
+	Expect(KamelBindWithID(operatorID, ns,
+		timerSource,
+		knChannelConf,
 		"-p", "source.message=message is Hi",
 		"--annotation", "trait.camel.apache.org/health.enabled=true",
 		"--annotation", "trait.camel.apache.org/health.readiness-initial-delay=10",
@@ -92,7 +81,7 @@ func TestKameletChange(t *testing.T) {
 
 	Eventually(IntegrationPodPhase(ns, timerPipe), TestTimeoutLong).Should(Equal(corev1.PodRunning))
 	Eventually(IntegrationConditionStatus(ns, timerPipe, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-	Eventually(IntegrationLogs(ns, timerPipe), TestTimeoutShort).Should(ContainSubstring("message is Hi"))
+	Eventually(IntegrationLogs(ns, "test-kamelet-display"), TestTimeoutShort).Should(ContainSubstring("message is Hi"))
 
 	Eventually(PipeCondition(ns, timerPipe, v1.PipeConditionReady), TestTimeoutMedium).
 		Should(And(
diff --git a/e2e/native/native_binding_test.go b/e2e/native/native_binding_test.go
index 8207e4d12..57e3cf9c9 100644
--- a/e2e/native/native_binding_test.go
+++ b/e2e/native/native_binding_test.go
@@ -55,24 +55,14 @@ func TestNativeBinding(t *testing.T) {
 			},
 		))
 
-		from := corev1.ObjectReference{
-			Kind:       "Kamelet",
-			Name:       "timer-source",
-			APIVersion: v1.SchemeGroupVersion.String(),
-		}
-		to := corev1.ObjectReference{
-			Kind:       "Kamelet",
-			Name:       "log-sink",
-			APIVersion: v1.SchemeGroupVersion.String(),
-		}
 		message := "Magicstring!"
 
 		t.Run("binding with native build", func(t *testing.T) {
 			bindingName := "native-binding"
-			Expect(KamelBind(ns,
-				from.Name,
-				to.Name,
-				"-p", "source.message=message",
+			Expect(KamelBindWithID(operatorID, ns,
+				"timer-source",
+				"log-sink",
+				"-p", "source.message="+message,
 				"--annotation", "trait.camel.apache.org/quarkus.package-type=native",
 				"--name", bindingName,
 			).Execute()).To(Succeed())


[camel-k] 04/05: chore: fix test after deprecation

Posted by pc...@apache.org.
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 e04fbbb2e40d06269d7e9dd18b88933eadb068f2
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu May 4 12:48:47 2023 +0200

    chore: fix test after deprecation
---
 e2e/common/misc/kamelet_test.go         |  4 +--
 e2e/common/misc/pipe_test.go            | 45 ++++++++-------------------------
 e2e/common/misc/pipe_with_image_test.go | 25 +++++-------------
 e2e/common/traits/health_test.go        | 22 ++++------------
 pkg/cmd/run.go                          |  3 +--
 pkg/cmd/run_support.go                  |  9 +++----
 6 files changed, 29 insertions(+), 79 deletions(-)

diff --git a/e2e/common/misc/kamelet_test.go b/e2e/common/misc/kamelet_test.go
index e54efd19c..97dd0b8f9 100644
--- a/e2e/common/misc/kamelet_test.go
+++ b/e2e/common/misc/kamelet_test.go
@@ -36,7 +36,7 @@ func TestKameletClasspathLoading(t *testing.T) {
 
 	// Store a configmap on the cluster
 	var cmData = make(map[string]string)
-	cmData["my-kamelet"] = `
+	cmData["my-timer-source.kamelet.yaml"] = `
 # ---------------------------------------------------------------------------
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -112,7 +112,7 @@ spec:
 	// Basic
 	t.Run("test basic case", func(t *testing.T) {
 		Expect(KamelRunWithID(operatorID, ns, "files/TimerKameletIntegration.java", "-t", "kamelets.enabled=false",
-			"--resource", "configmap:my-kamelet-cm@/kamelets/my-timer-source.kamelet.yaml",
+			"--resource", "configmap:my-kamelet-cm@/kamelets",
 			"-p camel.component.kamelet.location=file:/kamelets",
 			"-d", "camel:yaml-dsl",
 			// kamelet dependencies
diff --git a/e2e/common/misc/pipe_test.go b/e2e/common/misc/pipe_test.go
index b0eb5f573..213008169 100644
--- a/e2e/common/misc/pipe_test.go
+++ b/e2e/common/misc/pipe_test.go
@@ -41,23 +41,12 @@ func TestPipe(t *testing.T) {
 	t.Run("test error handler", func(t *testing.T) {
 		Expect(createErrorProducerKamelet(ns, "my-own-error-producer-source")()).To(Succeed())
 		Expect(CreateLogKamelet(ns, "my-own-log-sink")()).To(Succeed())
-		from := corev1.ObjectReference{
-			Kind:       "Kamelet",
-			Name:       "my-own-error-producer-source",
-			APIVersion: v1.SchemeGroupVersion.String(),
-		}
-
-		to := corev1.ObjectReference{
-			Kind:       "Kamelet",
-			Name:       "my-own-log-sink",
-			APIVersion: v1.SchemeGroupVersion.String(),
-		}
 
 		t.Run("throw error test", func(t *testing.T) {
-			Expect(KamelBind(ns,
-				from.Name,
-				to.Name,
-				"--error-handler", "sink:"+to.Name,
+			Expect(KamelBindWithID(operatorID, ns,
+				"my-own-error-producer-source",
+				"my-own-log-sink",
+				"--error-handler", "sink:my-own-log-sink",
 				"-p", "source.message=throw Error",
 				"-p", "sink.loggerName=integrationLogger",
 				"-p", "error-handler.loggerName=kameletErrorHandler",
@@ -71,10 +60,10 @@ func TestPipe(t *testing.T) {
 		})
 
 		t.Run("don't throw error test", func(t *testing.T) {
-			Expect(KamelBind(ns,
-				from.Name,
-				to.Name,
-				"--error-handler", "sink:"+to.Name,
+			Expect(KamelBindWithID(operatorID, ns,
+				"my-own-error-producer-source",
+				"my-own-log-sink",
+				"--error-handler", "sink:my-own-log-sink",
 				"-p", "source.message=true",
 				"-p", "sink.loggerName=integrationLogger",
 				"-p", "error-handler.loggerName=kameletErrorHandler",
@@ -93,21 +82,9 @@ func TestPipe(t *testing.T) {
 		Expect(CreateTimerKamelet(ns, "my-own-timer-source")()).To(Succeed())
 		// Log sink kamelet exists from previous test
 
-		from := corev1.ObjectReference{
-			Kind:       "Kamelet",
-			Name:       "my-own-timer-source",
-			APIVersion: v1.SchemeGroupVersion.String(),
-		}
-
-		to := corev1.ObjectReference{
-			Kind:       "Kamelet",
-			Name:       "my-own-log-sink",
-			APIVersion: v1.SchemeGroupVersion.String(),
-		}
-
-		Expect(KamelBind(ns,
-			from.Name,
-			to.Name,
+		Expect(KamelBindWithID(operatorID, ns,
+			"my-own-timer-source",
+			"my-own-log-sink",
 			"-p", "source.message=hello from test",
 			"-p", "sink.loggerName=integrationLogger",
 			"--annotation", "trait.camel.apache.org/camel.properties=[\"camel.prop1=a\",\"camel.prop2=b\"]",
diff --git a/e2e/common/misc/pipe_with_image_test.go b/e2e/common/misc/pipe_with_image_test.go
index 77ddf9348..d34e67d39 100644
--- a/e2e/common/misc/pipe_with_image_test.go
+++ b/e2e/common/misc/pipe_with_image_test.go
@@ -31,32 +31,19 @@ import (
 	corev1 "k8s.io/api/core/v1"
 
 	. "github.com/apache/camel-k/v2/e2e/support"
-	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 )
 
 func TestPipeWithImage(t *testing.T) {
 	RegisterTestingT(t)
 
-	from := corev1.ObjectReference{
-		Kind:       "Kamelet",
-		Name:       "my-own-timer-source",
-		APIVersion: v1.SchemeGroupVersion.String(),
-	}
-
-	to := corev1.ObjectReference{
-		Kind:       "Kamelet",
-		Name:       "my-own-log-sink",
-		APIVersion: v1.SchemeGroupVersion.String(),
-	}
-
 	bindingID := "with-image-binding"
 
 	t.Run("run with initial image", func(t *testing.T) {
 		expectedImage := "docker.io/jmalloc/echo-server:0.3.2"
 
-		Expect(KamelBind(ns,
-			from.Name,
-			to.Name,
+		Expect(KamelBindWithID(operatorID, ns,
+			"my-own-timer-source",
+			"my-own-log-sink",
 			"--annotation", "trait.camel.apache.org/container.image="+expectedImage,
 			"--annotation", "trait.camel.apache.org/jvm.enabled=false",
 			"--annotation", "trait.camel.apache.org/kamelets.enabled=false",
@@ -82,9 +69,9 @@ func TestPipeWithImage(t *testing.T) {
 	t.Run("run with new image", func(t *testing.T) {
 		expectedImage := "docker.io/jmalloc/echo-server:0.3.3"
 
-		Expect(KamelBind(ns,
-			from.Name,
-			to.Name,
+		Expect(KamelBindWithID(operatorID, ns,
+			"my-own-timer-source",
+			"my-own-log-sink",
 			"--annotation", "trait.camel.apache.org/container.image="+expectedImage,
 			"--annotation", "trait.camel.apache.org/jvm.enabled=false",
 			"--annotation", "trait.camel.apache.org/kamelets.enabled=false",
diff --git a/e2e/common/traits/health_test.go b/e2e/common/traits/health_test.go
index 2da0d25cf..ef994a7a9 100644
--- a/e2e/common/traits/health_test.go
+++ b/e2e/common/traits/health_test.go
@@ -138,24 +138,12 @@ func TestHealthTrait(t *testing.T) {
 	t.Run("Readiness condition with stopped binding", func(t *testing.T) {
 		name := "stopped-binding"
 
-		Expect(CreateTimerKamelet(ns, "my-own-timer-source")).To(Succeed())
-		Expect(CreateLogKamelet(ns, "my-own-log-sink")).To(Succeed())
+		Expect(CreateTimerKamelet(ns, "my-health-timer-source")()).To(Succeed())
+		Expect(CreateLogKamelet(ns, "my-health-log-sink")()).To(Succeed())
 
-		from := corev1.ObjectReference{
-			Kind:       "Kamelet",
-			Name:       "my-stopped-binding-timer-source",
-			APIVersion: camelv1.SchemeGroupVersion.String(),
-		}
-
-		to := corev1.ObjectReference{
-			Kind:       "Kamelet",
-			Name:       "my-stopped-binding-log-sink",
-			APIVersion: camelv1.SchemeGroupVersion.String(),
-		}
-
-		Expect(KamelBind(ns,
-			from.Name,
-			to.Name,
+		Expect(KamelBindWithID(operatorID, ns,
+			"my-health-timer-source",
+			"my-health-log-sink",
 			"-p", "source.message=Magicstring!",
 			"-p", "sink.loggerName=binding",
 			"--annotation", "trait.camel.apache.org/health.enabled=true",
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index 87f7edc9c..c2da4f6ad 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -742,8 +742,7 @@ func (o *runCmdOptions) parseAndConvertToTrait(cmd *cobra.Command,
 		if err != nil {
 			return err
 		}
-		// We try to autogenerate a configmap
-		if _, err := parseConfigAndGenCm(o.Context, cmd, c, config, integration); err != nil {
+		if err := parseConfig(o.Context, cmd, c, config, integration); err != nil {
 			return err
 		}
 		o.Traits = append(o.Traits, convertToTrait(convert(config), traitParam))
diff --git a/pkg/cmd/run_support.go b/pkg/cmd/run_support.go
index b3fde6146..68ba2d81f 100644
--- a/pkg/cmd/run_support.go
+++ b/pkg/cmd/run_support.go
@@ -39,7 +39,6 @@ import (
 	"github.com/magiconair/properties"
 	"github.com/pkg/errors"
 	"github.com/spf13/cobra"
-	corev1 "k8s.io/api/core/v1"
 )
 
 func addDependency(cmd *cobra.Command, it *v1.Integration, dependency string, catalog *camel.RuntimeCatalog) {
@@ -48,14 +47,14 @@ func addDependency(cmd *cobra.Command, it *v1.Integration, dependency string, ca
 	it.Spec.AddDependency(normalized)
 }
 
-func parseConfigAndGenCm(ctx context.Context, cmd *cobra.Command, c client.Client, config *resource.Config, integration *v1.Integration) (*corev1.ConfigMap, error) {
+func parseConfig(ctx context.Context, cmd *cobra.Command, c client.Client, config *resource.Config, integration *v1.Integration) error {
 	switch config.StorageType() {
 	case resource.StorageTypeConfigmap:
 		cm := kubernetes.LookupConfigmap(ctx, c, integration.Namespace, config.Name())
 		if cm == nil {
 			fmt.Fprintln(cmd.ErrOrStderr(), "Warn:", config.Name(), "Configmap not found in", integration.Namespace, "namespace, make sure to provide it before the Integration can run")
 		} else if config.ContentType() != resource.ContentTypeData && cm.BinaryData != nil {
-			return nil, fmt.Errorf("you cannot provide a binary config, use a text file instead")
+			return fmt.Errorf("you cannot provide a binary config, use a text file instead")
 		}
 	case resource.StorageTypeSecret:
 		secret := kubernetes.LookupSecret(ctx, c, integration.Namespace, config.Name())
@@ -64,10 +63,10 @@ func parseConfigAndGenCm(ctx context.Context, cmd *cobra.Command, c client.Clien
 		}
 	default:
 		// Should never reach this
-		return nil, fmt.Errorf("invalid option type %s", config.StorageType())
+		return fmt.Errorf("invalid option type %s", config.StorageType())
 	}
 
-	return nil, nil
+	return nil
 }
 
 func filterFileLocation(maybeFileLocations []string) []string {


[camel-k] 03/05: chore: update documentation

Posted by pc...@apache.org.
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 992d77142f58f64f0f2b42efbdfe6e79e372abd7
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu May 4 10:47:16 2023 +0200

    chore: update documentation
---
 docs/modules/ROOT/pages/cli/cli.adoc               |  4 ----
 .../ROOT/pages/configuration/runtime-config.adoc   | 28 ----------------------
 .../pages/configuration/runtime-resources.adoc     | 27 +--------------------
 docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc |  8 +++----
 4 files changed, 5 insertions(+), 62 deletions(-)

diff --git a/docs/modules/ROOT/pages/cli/cli.adoc b/docs/modules/ROOT/pages/cli/cli.adoc
index 6628071e2..0aadda5dd 100644
--- a/docs/modules/ROOT/pages/cli/cli.adoc
+++ b/docs/modules/ROOT/pages/cli/cli.adoc
@@ -31,10 +31,6 @@ Some of the most used commands are:
 |Obtain the full list of available commands
 |kamel help
 
-|init
-|Initialize empty Camel K files (besides Java you can also do this for other languages like Groovy, Kotlin, XML, YAML)
-|kamel init Routes.java
-
 |run
 |Run an integration on Kubernetes
 |kamel run Routes.java
diff --git a/docs/modules/ROOT/pages/configuration/runtime-config.adoc b/docs/modules/ROOT/pages/configuration/runtime-config.adoc
index 50fe95855..15edf435f 100644
--- a/docs/modules/ROOT/pages/configuration/runtime-config.adoc
+++ b/docs/modules/ROOT/pages/configuration/runtime-config.adoc
@@ -7,34 +7,6 @@ The *runtime configuration* files are expected to be encoded in `UTF-8` as they
 
 NOTE: the scope of `--config` global option had different meaning prior Camel K version 1.5. The old global `--config` has been replaced with `--kube-config` since Camel K version 1.5.
 
-[[runtime-config-file]]
-== Runtime file configuration
-
-The most classic way to provide a configuration is probably to have a file where you have certain text data stored. In this case you can use the `--config file:/path/to/file` flag that will copy that file and make it available at classpath level.
-
-[source,txt]
-.resources-data.txt
-----
-the file body
-----
-
-[source,groovy]
-.config-file-route.groovy
-----
-from('timer:config-file')
-    .setBody()
-        .simple("resource:classpath:resources-data.txt")
-    .log('resource file content is: ${body}')
-----
-
-We are referring to the file expected to be copied somewhere in the classpath, with the same name as the source file. In order to use it, we'll execute the following `--config` _file_ flag command:
-
-----
-kamel run --config file:resources-data.txt config-file-route.groovy
-----
-
-You can provide more than one single `config` at once by just adding the flag repeatedly (ie, `--config file:file1.txt ---config file:file2.txt ...`).
-
 [[runtime-config-configmap]]
 == Runtime configmap configuration
 
diff --git a/docs/modules/ROOT/pages/configuration/runtime-resources.adoc b/docs/modules/ROOT/pages/configuration/runtime-resources.adoc
index f3227e9a3..301920487 100644
--- a/docs/modules/ROOT/pages/configuration/runtime-resources.adoc
+++ b/docs/modules/ROOT/pages/configuration/runtime-resources.adoc
@@ -7,31 +7,6 @@ The *runtime resources* are expected to be any resource type (text or binary con
 
 NOTE: you'll find `--resource` is very similar to the `--config` run flag. The main difference is that a `resource` can have a binary content and it won't be parsed by the Camel Context.
 
-[[runtime-resource-file]]
-== Runtime file resource
-
-Most of the time you will deal with the need to provide your `Integration` with resource files you have stored in your local machine. In this case you can use the `--resource file:/path/to/file` flag that will copy that file under the _/etc/camel/resources/_ directory. You can look at the _resource destination path_ section at the bottom of this page to specify the destination file location.
-
-Let's see an example. We want to create an `Integration` unzipping and reading the content of a file we'll provide (ie, _resources-data.zip_):
-
-[source,groovy]
-.resource-file-binary-route.groovy
-----
-from('file:/etc/camel/resources/?fileName=resources-data.zip&noop=true&idempotent=false')
-    .unmarshal().zipFile()
-    .log('resource file unzipped content is: ${body}')
-----
-
-We have this file available locally, so we can use the `--resource` _file_ flag command to copy this file in the `Integration`:
-
-----
-kamel run --resource file:resources-data.zip resource-file-binary-route.groovy -d camel:zipfile
-----
-
-NOTE: when you're providing a resource file, we try to recognize if it's a binary file and process it accordingly creating a binary representation that will be decoded transparently in the `Integration`.
-
-You can provide more than one single `resource` at once by just adding the flag repeatedly (ie, `--resource file:file1.txt --resource file:file2.txt ...`).
-
 [[runtime-resource-configmap]]
 == Runtime configmap resource
 
@@ -109,7 +84,7 @@ from('file:/tmp/?fileName=input.txt&noop=true&idempotent=false')
 When running the `Integration`, you can specify where to mount the resource content (either a `File`, `Configmap` or `Secret`) with the _@path_ syntax:
 
 ----
-kamel run --resource file:resources-data.txt@/tmp/input.txt resource-file-location-route.groovy
+kamel run --resource configmap:my-cm@/tmp/input.txt resource-file-location-route.groovy
 ----
 
 You may check in the `Integration` `Pod` and verify that the file was mounted in the _tmp/input.txt_ destination.
diff --git a/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc b/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc
index ba70e270b..8f807688f 100644
--- a/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc
+++ b/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc
@@ -38,11 +38,11 @@ We're going to show an example shortly.
 Suppose that you want to provide a Kamelet that allows users to search data on Twitter, providing a stream of information about a given keyword.
 Creating such a Kamelet is a fairly easy task: we can use options of the "camel-twitter" component without adding much processing logic.
 
-So the procedure of writing a simple Kamelet starts with scaffolding a new Kamelet resource, which can be done with the `kamel` CLI:
+So the procedure of writing a simple Kamelet starts with scaffolding a new Kamelet resource, which can be done with the Camel JBang CLI (`camel`):
 
 [source]
 ----
-kamel init twitter-search-source.kamelet.yaml
+camel init twitter-search-source.kamelet.yaml
 ----
 
 This produces a YAML file like the following one:
@@ -352,11 +352,11 @@ We write it using the Java DSL because that is the language that most Apache Cam
 
 TIP: For a great developer experience, we suggest to use https://code.visualstudio.com/[Visual Studio Code] with the https://marketplace.visualstudio.com/items?itemName=redhat.apache-camel-extension-pack[Camel Extension Pack]
 
-We start from scratch by creating an integration file
+We start from scratch by creating an integration file with Camel JBang CLI:
 
 [source]
 ----
-kamel init Earthquake.java
+camel init Earthquake.java
 ----
 
 This will scaffold a Java source file with a timer-to-log integration, that we'll edit according to our need.