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 0c19dfb9e8e10e87da3606f422e9b07c6d70ae9a Author: Pasquale Congiusti <[email protected]> AuthorDate: Tue Feb 17 12:58:47 2026 +0100 chore: deprecate Synthetic Integrations favoring Camel Dashboard --- docs/modules/ROOT/pages/running/synthetic.adoc | 2 + e2e/advanced/synthetic_test.go | 131 ------------------------- pkg/cmd/operator/operator.go | 5 +- 3 files changed, 4 insertions(+), 134 deletions(-) diff --git a/docs/modules/ROOT/pages/running/synthetic.adoc b/docs/modules/ROOT/pages/running/synthetic.adoc index 1496fcbca..f16a56b9b 100644 --- a/docs/modules/ROOT/pages/running/synthetic.adoc +++ b/docs/modules/ROOT/pages/running/synthetic.adoc @@ -1,5 +1,7 @@ = Synthetic Integrations +WARNING: the feature is deprecated and replaced by https://camel-tooling.github.io/camel-dashboard/docs/[Camel Dashboard monitoring] instead, see the new project official documentation. + You may have already a Camel application running on your cluster. You may have created it via a manual deployment, a CICD or any other deployment mechanism you have in place. Since the Camel K operator is meant to operate any Camel application out there, then, you will be able to import it and monitor in a similar fashion of any other Camel K **managed Integration**. These Integrations are known as **Synthetic Integrations** == Importing existing Camel applications diff --git a/e2e/advanced/synthetic_test.go b/e2e/advanced/synthetic_test.go deleted file mode 100644 index e5ec2d086..000000000 --- a/e2e/advanced/synthetic_test.go +++ /dev/null @@ -1,131 +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 advanced - -import ( - "context" - "strconv" - "testing" - - . "github.com/onsi/gomega" - - . "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/envvar" - . "github.com/onsi/gomega/gstruct" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" -) - -func TestSyntheticIntegrationOff(t *testing.T) { - t.Parallel() - - WithNewTestNamespace(t, func(ctx context.Context, g *WithT, ns string) { - // Install Camel K without synthetic Integration feature variable (default) - InstallOperator(t, ctx, g, ns) - - // Run the external deployment - ExpectExecSucceed(t, g, Kubectl("apply", "-f", "files/deploy.yaml", "-n", ns)) - g.Eventually(DeploymentCondition(t, ctx, ns, "my-camel-sb-svc", appsv1.DeploymentProgressing), TestTimeoutShort). - Should(MatchFields(IgnoreExtras, Fields{ - "Status": Equal(corev1.ConditionTrue), - "Reason": Equal("NewReplicaSetAvailable"), - })) - - // Label the deployment --> Verify the Integration is not created - ExpectExecSucceed(t, g, Kubectl("label", "deploy", "my-camel-sb-svc", "camel.apache.org/integration=my-it", "-n", ns)) - g.Eventually(Integration(t, ctx, ns, "my-it"), TestTimeoutShort).Should(BeNil()) - }) -} -func TestSyntheticIntegrationFromDeployment(t *testing.T) { - t.Parallel() - - WithNewTestNamespace(t, func(ctx context.Context, g *WithT, ns string) { - // Install Camel K with the proper configuration support - InstallOperatorWithConf(t, ctx, g, ns, "", false, - map[string]string{ - "CAMEL_K_SYNTHETIC_INTEGRATIONS": strconv.FormatBool(true), - }, - ) - g.Eventually(OperatorPodHas(t, ctx, ns, func(op *corev1.Pod) bool { - if envVar := envvar.Get(op.Spec.Containers[0].Env, "CAMEL_K_SYNTHETIC_INTEGRATIONS"); envVar != nil { - return envVar.Value == strconv.FormatBool(true) - } - return false - - }), TestTimeoutShort).Should(BeTrue()) - - // Run the external deployment - ExpectExecSucceed(t, g, Kubectl("apply", "-f", "files/deploy.yaml", "-n", ns)) - g.Eventually(DeploymentCondition(t, ctx, ns, "my-camel-sb-svc", appsv1.DeploymentProgressing), TestTimeoutShort). - Should(MatchFields(IgnoreExtras, Fields{ - "Status": Equal(corev1.ConditionTrue), - "Reason": Equal("NewReplicaSetAvailable"), - })) - - // Label the deployment --> Verify the Integration is created (cannot still monitor) - ExpectExecSucceed(t, g, Kubectl("label", "deploy", "my-camel-sb-svc", "camel.apache.org/integration=my-it", "-n", ns)) - g.Eventually(IntegrationPhase(t, ctx, ns, "my-it"), TestTimeoutMedium).Should(Equal(v1.IntegrationPhaseRunning)) - g.Eventually(IntegrationConditionStatus(t, ctx, ns, "my-it", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionFalse)) - g.Eventually(IntegrationCondition(t, ctx, ns, "my-it", v1.IntegrationConditionReady), TestTimeoutShort).Should( - WithTransform(IntegrationConditionReason, Equal(v1.IntegrationConditionMonitoringPodsAvailableReason))) - - // Label the deployment template --> Verify the Integration is monitored - ExpectExecSucceed(t, g, Kubectl("patch", "deployment", "my-camel-sb-svc", "--patch", `{"spec": {"template": {"metadata": {"labels": {"camel.apache.org/integration": "my-it"}}}}}`, "-n", ns)) - g.Eventually(IntegrationPhase(t, ctx, ns, "my-it"), TestTimeoutMedium).Should(Equal(v1.IntegrationPhaseRunning)) - g.Eventually(IntegrationConditionStatus(t, ctx, ns, "my-it", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue)) - one := int32(1) - g.Eventually(IntegrationStatusReplicas(t, ctx, ns, "my-it"), TestTimeoutShort).Should(Equal(&one)) - - // Delete the deployment --> Verify the Integration is eventually garbage collected - ExpectExecSucceed(t, g, Kubectl("delete", "deploy", "my-camel-sb-svc", "-n", ns)) - g.Eventually(Integration(t, ctx, ns, "my-it"), TestTimeoutShort).Should(BeNil()) - - // Recreate the deployment and label --> Verify the Integration is monitored - ExpectExecSucceed(t, g, Kubectl("apply", "-f", "files/deploy.yaml", "-n", ns)) - ExpectExecSucceed(t, g, Kubectl("label", "deploy", "my-camel-sb-svc", "camel.apache.org/integration=my-it", "-n", ns)) - ExpectExecSucceed(t, g, Kubectl("patch", "deployment", "my-camel-sb-svc", "--patch", `{"spec": {"template": {"metadata": {"labels": {"camel.apache.org/integration": "my-it"}}}}}`, "-n", ns)) - g.Eventually(IntegrationPhase(t, ctx, ns, "my-it"), TestTimeoutMedium).Should(Equal(v1.IntegrationPhaseRunning)) - g.Eventually(IntegrationConditionStatus(t, ctx, ns, "my-it", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue)) - g.Eventually(IntegrationStatusReplicas(t, ctx, ns, "my-it"), TestTimeoutShort).Should(Equal(&one)) - - // Remove label from the deployment --> Verify the Integration is deleted - ExpectExecSucceed(t, g, Kubectl("label", "deploy", "my-camel-sb-svc", "camel.apache.org/integration-", "-n", ns)) - g.Eventually(Integration(t, ctx, ns, "my-it"), TestTimeoutShort).Should(BeNil()) - - // Add label back to the deployment --> Verify the Integration is created - ExpectExecSucceed(t, g, Kubectl("label", "deploy", "my-camel-sb-svc", "camel.apache.org/integration=my-it", "-n", ns)) - g.Eventually(IntegrationPhase(t, ctx, ns, "my-it"), TestTimeoutMedium).Should(Equal(v1.IntegrationPhaseRunning)) - g.Eventually(IntegrationConditionStatus(t, ctx, ns, "my-it", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue)) - g.Eventually(IntegrationStatusReplicas(t, ctx, ns, "my-it"), TestTimeoutShort).Should(Equal(&one)) - // Scale the deployment --> verify replicas are correctly set - ExpectExecSucceed(t, g, Kubectl("scale", "deploy", "my-camel-sb-svc", "--replicas", "2", "-n", ns)) - two := int32(2) - g.Eventually(IntegrationStatusReplicas(t, ctx, ns, "my-it"), TestTimeoutShort).Should(Equal(&two)) - - // Delete Integration and deployments --> verify no Integration exists any longer - g.Expect(Kamel(t, ctx, "delete", "--all", "-n", ns).Execute()).To(Succeed()) - ExpectExecSucceed(t, g, Kubectl("delete", "deploy", "my-camel-sb-svc", "-n", ns)) - g.Eventually(Integration(t, ctx, ns, "my-it"), TestTimeoutShort).Should(BeNil()) - }) -} diff --git a/pkg/cmd/operator/operator.go b/pkg/cmd/operator/operator.go index 94e063234..92f463e48 100644 --- a/pkg/cmd/operator/operator.go +++ b/pkg/cmd/operator/operator.go @@ -227,10 +227,9 @@ func Run(healthPort, monitoringPort int32, leaderElection bool, leaderElectionID synthEnvVal, synth := os.LookupEnv("CAMEL_K_SYNTHETIC_INTEGRATIONS") if synth && synthEnvVal == "true" { - log.Info("Starting the synthetic Integration manager") + log.Info("Starting the synthetic Integration manager. " + + "WARNING: this is a deprecated feature and will be removed in future versions, use Camel Dashboard project instead.") exitOnError(synthetic.ManageSyntheticIntegrations(ctx, ctrlClient, mgr.GetCache()), "synthetic Integration manager error") - } else { - log.Info("Synthetic Integration manager not configured, skipping") } log.Info("Starting the manager") exitOnError(mgr.Start(ctx), "manager exited non-zero")
