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 2024/03/22 09:05:21 UTC

(camel-k) branch main updated (2f595d154 -> 196020d06)

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 2f595d154 feat(catalog): support placeholders
     new fa5927938 chore(trait): add executed trait condition
     new 196020d06 chore(trait): polish conditions

The 2 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:
 addons/master/master.go              |  2 +-
 addons/telemetry/telemetry.go        |  1 +
 e2e/common/runtimes/runtimes_test.go |  6 +++---
 e2e/common/traits/builder_test.go    | 18 +++++++++---------
 pkg/controller/build/monitor_pod.go  |  2 +-
 pkg/trait/builder.go                 |  4 ++--
 pkg/trait/builder_test.go            |  6 +++---
 pkg/trait/container.go               |  1 +
 pkg/trait/container_probes_test.go   | 13 +++++++------
 pkg/trait/container_test.go          | 11 ++++++-----
 pkg/trait/cron.go                    |  6 +++++-
 pkg/trait/cron_test.go               | 14 +++++++-------
 pkg/trait/deployment.go              |  2 ++
 pkg/trait/environment_test.go        |  8 ++++----
 pkg/trait/gc.go                      |  2 +-
 pkg/trait/gc_test.go                 |  1 +
 pkg/trait/ingress.go                 |  1 +
 pkg/trait/ingress_test.go            |  1 +
 pkg/trait/istio_test.go              |  8 ++++----
 pkg/trait/jvm.go                     |  8 ++++----
 pkg/trait/jvm_test.go                |  3 +++
 pkg/trait/kamelets.go                |  2 +-
 pkg/trait/knative.go                 |  2 +-
 pkg/trait/knative_service.go         |  4 ++++
 pkg/trait/knative_test.go            |  2 +-
 pkg/trait/logging.go                 |  2 +-
 pkg/trait/logging_test.go            |  4 ++--
 pkg/trait/mount.go                   |  3 +++
 pkg/trait/mount_test.go              |  6 +++---
 pkg/trait/owner.go                   |  2 +-
 pkg/trait/pod.go                     |  2 +-
 pkg/trait/pull_secret.go             |  2 +-
 pkg/trait/quarkus.go                 |  2 +-
 pkg/trait/registry.go                |  1 +
 pkg/trait/route.go                   |  1 +
 pkg/trait/route_test.go              | 20 ++++++++++----------
 pkg/trait/service.go                 |  4 +++-
 pkg/trait/service_binding.go         |  2 +-
 pkg/trait/service_test.go            | 30 ++++++++++++++----------------
 pkg/trait/trait_catalog.go           | 22 +++++++++++++---------
 pkg/trait/trait_condition_types.go   | 26 +++++++++++++++++---------
 pkg/trait/trait_test.go              | 16 ++++++++++++++++
 42 files changed, 163 insertions(+), 110 deletions(-)


(camel-k) 01/02: chore(trait): add executed trait condition

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 fa59279386f00782124c3cc71b981768ba8c9c27
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu Mar 21 11:47:10 2024 +0100

    chore(trait): add executed trait condition
---
 pkg/trait/builder_test.go          |  6 +++---
 pkg/trait/container_probes_test.go |  7 +++----
 pkg/trait/container_test.go        | 10 +++++-----
 pkg/trait/cron_test.go             |  8 +++-----
 pkg/trait/environment_test.go      |  8 ++++----
 pkg/trait/istio_test.go            |  8 ++++----
 pkg/trait/knative_test.go          |  2 +-
 pkg/trait/logging_test.go          |  4 ++--
 pkg/trait/mount_test.go            |  6 +++---
 pkg/trait/route_test.go            | 17 ++++++++---------
 pkg/trait/service_test.go          | 15 ++++-----------
 pkg/trait/trait_catalog.go         | 21 +++++++++++++--------
 pkg/trait/trait_test.go            | 15 +++++++++++++++
 13 files changed, 68 insertions(+), 59 deletions(-)

diff --git a/pkg/trait/builder_test.go b/pkg/trait/builder_test.go
index b31952b2b..dd831b640 100644
--- a/pkg/trait/builder_test.go
+++ b/pkg/trait/builder_test.go
@@ -48,7 +48,7 @@ func TestBuilderTraitNotAppliedBecauseOfNilKit(t *testing.T) {
 			conditions, err := NewBuilderTestCatalog().apply(e)
 
 			require.NoError(t, err)
-			assert.Empty(t, conditions)
+			assert.NotEmpty(t, conditions)
 			assert.NotEmpty(t, e.ExecutedTraits)
 			assert.Nil(t, e.GetTrait("builder"))
 			assert.Empty(t, e.Pipeline)
@@ -69,7 +69,7 @@ func TestBuilderTraitNotAppliedBecauseOfNilPhase(t *testing.T) {
 			conditions, err := NewBuilderTestCatalog().apply(e)
 
 			require.NoError(t, err)
-			assert.Empty(t, conditions)
+			assert.NotEmpty(t, conditions)
 			assert.NotEmpty(t, e.ExecutedTraits)
 			assert.Nil(t, e.GetTrait("builder"))
 			assert.Empty(t, e.Pipeline)
@@ -82,7 +82,7 @@ func TestS2IBuilderTrait(t *testing.T) {
 	conditions, err := NewBuilderTestCatalog().apply(env)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, env.ExecutedTraits)
 	assert.NotNil(t, env.GetTrait("builder"))
 	assert.NotEmpty(t, env.Pipeline)
diff --git a/pkg/trait/container_probes_test.go b/pkg/trait/container_probes_test.go
index 071a5cea2..d756af65d 100644
--- a/pkg/trait/container_probes_test.go
+++ b/pkg/trait/container_probes_test.go
@@ -81,7 +81,7 @@ func TestProbesDependencies(t *testing.T) {
 
 	conditions, err := env.Catalog.apply(&env)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.Contains(t, env.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus:camel-quarkus-microprofile-health")
 }
 
@@ -106,7 +106,7 @@ func TestProbesOnDeployment(t *testing.T) {
 
 	conditions, err := env.Catalog.apply(&env)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 
 	container := env.GetIntegrationContainer()
 
@@ -144,7 +144,7 @@ func TestProbesOnDeploymentWithCustomScheme(t *testing.T) {
 
 	conditions, err := env.Catalog.apply(&env)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 
 	container := env.GetIntegrationContainer()
 
@@ -199,7 +199,6 @@ func TestProbesOnKnativeService(t *testing.T) {
 
 	conditions, err := env.Catalog.apply(&env)
 	require.NoError(t, err)
-	assert.Len(t, conditions, 2)
 	assert.Contains(t, conditions, ctrlStrategyCondition)
 	assert.Contains(t, conditions, serviceOverrideCondition)
 
diff --git a/pkg/trait/container_test.go b/pkg/trait/container_test.go
index 7867e3b0d..551503e92 100644
--- a/pkg/trait/container_test.go
+++ b/pkg/trait/container_test.go
@@ -89,7 +89,7 @@ func TestContainerWithDefaults(t *testing.T) {
 	conditions, err := traitCatalog.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("deployment"))
 	assert.NotNil(t, environment.GetTrait("container"))
@@ -170,7 +170,7 @@ func TestContainerWithOpenshift(t *testing.T) {
 	conditions, err := traitCatalog.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("deployment"))
 	assert.NotNil(t, environment.GetTrait("container"))
@@ -238,7 +238,7 @@ func TestContainerWithCustomName(t *testing.T) {
 	conditions, err := traitCatalog.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("deployment"))
 	assert.NotNil(t, environment.GetTrait("container"))
@@ -304,7 +304,7 @@ func TestContainerWithCustomImage(t *testing.T) {
 	conditions, err := traitCatalog.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 
 	for _, postAction := range environment.PostActions {
 		require.NoError(t, postAction(&environment))
@@ -428,7 +428,7 @@ func TestContainerWithImagePullPolicy(t *testing.T) {
 	conditions, err := traitCatalog.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 
 	container := environment.GetIntegrationContainer()
 
diff --git a/pkg/trait/cron_test.go b/pkg/trait/cron_test.go
index 13492bc58..4e446600b 100644
--- a/pkg/trait/cron_test.go
+++ b/pkg/trait/cron_test.go
@@ -288,7 +288,7 @@ func TestCronDeps(t *testing.T) {
 	conditions, err := tc.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 
 	ct, _ := environment.GetTrait("cron").(*cronTrait)
@@ -370,7 +370,7 @@ func TestCronMultipleScheduleFallback(t *testing.T) {
 	conditions, err := tc.apply(&environment)
 
 	assert.Nil(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 
 	ct, _ := environment.GetTrait("cron").(*cronTrait)
@@ -448,7 +448,7 @@ func TestCronDepsFallback(t *testing.T) {
 	conditions, err := tc.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 
 	ct, _ := environment.GetTrait("cron").(*cronTrait)
@@ -529,7 +529,6 @@ func TestCronWithActiveDeadline(t *testing.T) {
 	)
 	conditions, err := tc.apply(&environment)
 	require.NoError(t, err)
-	assert.Len(t, conditions, 1)
 	assert.Contains(t, conditions, expectedCondition)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 
@@ -618,7 +617,6 @@ func TestCronWithBackoffLimit(t *testing.T) {
 	)
 	conditions, err := tc.apply(&environment)
 	require.NoError(t, err)
-	assert.Len(t, conditions, 1)
 	assert.Contains(t, conditions, expectedCondition)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 
diff --git a/pkg/trait/environment_test.go b/pkg/trait/environment_test.go
index 2fc0991d9..f83043702 100644
--- a/pkg/trait/environment_test.go
+++ b/pkg/trait/environment_test.go
@@ -44,7 +44,7 @@ func TestDefaultEnvironment(t *testing.T) {
 
 	conditions, err := NewEnvironmentTestCatalog().apply(&env)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 
 	ns := false
 	name := false
@@ -93,7 +93,7 @@ func TestEnabledContainerMetaDataEnvVars(t *testing.T) {
 
 	conditions, err := NewEnvironmentTestCatalog().apply(&env)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 
 	ns := false
 	name := false
@@ -133,7 +133,7 @@ func TestDisabledContainerMetaDataEnvVars(t *testing.T) {
 
 	conditions, err := NewEnvironmentTestCatalog().apply(&env)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 
 	ns := false
 	name := false
@@ -172,7 +172,7 @@ func TestCustomEnvVars(t *testing.T) {
 
 	conditions, err := NewEnvironmentTestCatalog().apply(&env)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 
 	userK1 := false
 	userK2 := false
diff --git a/pkg/trait/istio_test.go b/pkg/trait/istio_test.go
index ccc7b7dbe..1e758bb4d 100644
--- a/pkg/trait/istio_test.go
+++ b/pkg/trait/istio_test.go
@@ -102,7 +102,7 @@ func TestIstioInject(t *testing.T) {
 	env := NewIstioTestEnv(t, &d, &s, true)
 	conditions, err := env.Catalog.apply(&env)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.Empty(t, s.Spec.ConfigurationSpec.Template.Annotations[istioSidecarInjectAnnotation])
 	assert.NotEmpty(t, d.Spec.Template.Annotations[istioSidecarInjectAnnotation])
 }
@@ -127,7 +127,7 @@ func TestIstioForcedInjectTrue(t *testing.T) {
 
 	conditions, err := env.Catalog.apply(&env)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.Equal(t, "true", s.Spec.ConfigurationSpec.Template.Annotations[istioSidecarInjectAnnotation])
 	assert.Equal(t, "true", d.Spec.Template.Annotations[istioSidecarInjectAnnotation])
 }
@@ -152,7 +152,7 @@ func TestIstioForcedInjectFalse(t *testing.T) {
 
 	conditions, err := env.Catalog.apply(&env)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.Equal(t, "false", s.Spec.ConfigurationSpec.Template.Annotations[istioSidecarInjectAnnotation])
 	assert.Equal(t, "false", d.Spec.Template.Annotations[istioSidecarInjectAnnotation])
 }
@@ -175,6 +175,6 @@ func TestIstioDisabled(t *testing.T) {
 
 	conditions, err := env.Catalog.apply(&env)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotContains(t, env.ExecutedTraits, "istio")
 }
diff --git a/pkg/trait/knative_test.go b/pkg/trait/knative_test.go
index 0375c26ba..adc47978a 100644
--- a/pkg/trait/knative_test.go
+++ b/pkg/trait/knative_test.go
@@ -341,7 +341,7 @@ func TestKnativePlatformHttpDependencies(t *testing.T) {
 
 			conditions, err := tc.apply(&environment)
 			require.NoError(t, err)
-			assert.Empty(t, conditions)
+			assert.NotEmpty(t, conditions)
 			assert.Contains(t, environment.Integration.Status.Capabilities, v1.CapabilityPlatformHTTP)
 			assert.Contains(t, environment.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus:camel-quarkus-platform-http")
 		})
diff --git a/pkg/trait/logging_test.go b/pkg/trait/logging_test.go
index 0a0df7a45..0947cb132 100644
--- a/pkg/trait/logging_test.go
+++ b/pkg/trait/logging_test.go
@@ -114,7 +114,7 @@ func TestEmptyLoggingTrait(t *testing.T) {
 	conditions, err := NewLoggingTestCatalog().apply(env)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, env.ExecutedTraits)
 
 	quarkusConsoleColor := false
@@ -167,7 +167,7 @@ func TestJsonLoggingTrait(t *testing.T) {
 	conditions, err := NewLoggingTestCatalog().apply(env)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, env.ExecutedTraits)
 
 	quarkusConsoleColor := false
diff --git a/pkg/trait/mount_test.go b/pkg/trait/mount_test.go
index 6191b2ae6..f64186878 100644
--- a/pkg/trait/mount_test.go
+++ b/pkg/trait/mount_test.go
@@ -46,7 +46,7 @@ func TestMountVolumesEmpty(t *testing.T) {
 	conditions, err := traitCatalog.apply(environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("mount"))
 
@@ -69,7 +69,7 @@ func TestMountVolumesIntegrationPhaseDeploying(t *testing.T) {
 	conditions, err := traitCatalog.apply(environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("mount"))
 
@@ -118,7 +118,7 @@ func TestMountVolumesIntegrationPhaseInitialization(t *testing.T) {
 	conditions, err := traitCatalog.apply(environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.Nil(t, environment.GetTrait("mount"))
 
diff --git a/pkg/trait/route_test.go b/pkg/trait/route_test.go
index 8956ff61f..00c9527db 100644
--- a/pkg/trait/route_test.go
+++ b/pkg/trait/route_test.go
@@ -208,7 +208,7 @@ func TestRoute_Default(t *testing.T) {
 
 	conditions, err := traitsCatalog.apply(environment)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("container"))
 	assert.NotNil(t, environment.GetTrait("route"))
@@ -243,7 +243,6 @@ func TestRoute_Disabled(t *testing.T) {
 	traitsCatalog := environment.Catalog
 	conditions, err := traitsCatalog.apply(environment)
 	require.NoError(t, err)
-	assert.Len(t, conditions, 1)
 	assert.Contains(t, conditions, expectedCondition)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.Nil(t, environment.GetTrait("route"))
@@ -284,7 +283,7 @@ func TestRoute_Host(t *testing.T) {
 	conditions, err := traitsCatalog.apply(environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("route"))
 
@@ -315,7 +314,7 @@ func TestRoute_TLS_From_Secret_reencrypt(t *testing.T) {
 	conditions, err := traitsCatalog.apply(environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("route"))
 
@@ -435,7 +434,7 @@ func TestRoute_TLS_reencrypt(t *testing.T) {
 	}
 	conditions, err := traitsCatalog.apply(environment)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("route"))
 
@@ -469,7 +468,7 @@ func TestRoute_TLS_edge(t *testing.T) {
 	}
 	conditions, err := traitsCatalog.apply(environment)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("route"))
 
@@ -501,7 +500,7 @@ func TestRoute_TLS_passthrough(t *testing.T) {
 	}
 	conditions, err := traitsCatalog.apply(environment)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("route"))
 
@@ -531,7 +530,7 @@ func TestRoute_WithCustomServicePort(t *testing.T) {
 	traitsCatalog := environment.Catalog
 	conditions, err := traitsCatalog.apply(environment)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("container"))
 	assert.NotNil(t, environment.GetTrait("route"))
@@ -565,7 +564,7 @@ func TestRouteAnnotation(t *testing.T) {
 	traitsCatalog := environment.Catalog
 	conditions, err := traitsCatalog.apply(environment)
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
+	assert.NotEmpty(t, conditions)
 
 	route := environment.Resources.GetRoute(func(r *routev1.Route) bool {
 		return r.ObjectMeta.Name == name
diff --git a/pkg/trait/service_test.go b/pkg/trait/service_test.go
index 1509c6076..edbd412eb 100644
--- a/pkg/trait/service_test.go
+++ b/pkg/trait/service_test.go
@@ -109,10 +109,9 @@ func TestServiceWithDefaults(t *testing.T) {
 	}
 	environment.Platform.ResyncStatusFullConfig()
 
-	conditions, err := traitCatalog.apply(&environment)
+	_, err = traitCatalog.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("deployment"))
 	assert.NotNil(t, environment.GetTrait("service"))
@@ -217,10 +216,9 @@ func TestService(t *testing.T) {
 	}
 	environment.Platform.ResyncStatusFullConfig()
 
-	conditions, err := traitCatalog.apply(&environment)
+	_, err = traitCatalog.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("deployment"))
 	assert.NotNil(t, environment.GetTrait("service"))
@@ -305,10 +303,9 @@ func TestServiceWithCustomContainerName(t *testing.T) {
 	}
 	environment.Platform.ResyncStatusFullConfig()
 
-	conditions, err := traitCatalog.apply(&environment)
+	_, err = traitCatalog.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("deployment"))
 	assert.NotNil(t, environment.GetTrait("service"))
@@ -397,10 +394,9 @@ func TestServiceWithNodePort(t *testing.T) {
 	}
 	environment.Platform.ResyncStatusFullConfig()
 
-	conditions, err := traitCatalog.apply(&environment)
+	_, err = traitCatalog.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Empty(t, conditions)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait("deployment"))
 	assert.NotNil(t, environment.GetTrait("service"))
@@ -507,7 +503,6 @@ func TestServiceWithKnativeServiceEnabled(t *testing.T) {
 	conditions, err := traitCatalog.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Len(t, conditions, 2)
 	assert.Contains(t, conditions, deploymentCondition)
 	assert.Contains(t, conditions, serviceCondition)
 	assert.NotEmpty(t, environment.ExecutedTraits)
@@ -585,7 +580,6 @@ func TestServicesWithKnativeProfile(t *testing.T) {
 	conditions, err := traitCatalog.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Len(t, conditions, 2)
 	assert.Contains(t, conditions, deploymentCondition)
 	assert.Contains(t, conditions, serviceCondition)
 	assert.NotEmpty(t, environment.ExecutedTraits)
@@ -665,7 +659,6 @@ func TestServiceWithKnativeServiceDisabledInIntegrationPlatform(t *testing.T) {
 	conditions, err := traitCatalog.apply(&environment)
 
 	require.NoError(t, err)
-	assert.Len(t, conditions, 1)
 	assert.Contains(t, conditions, expectedCondition)
 	assert.NotEmpty(t, environment.ExecutedTraits)
 	assert.NotNil(t, environment.GetTrait(serviceTraitID))
diff --git a/pkg/trait/trait_catalog.go b/pkg/trait/trait_catalog.go
index 3169f563c..8bbcf4bd3 100644
--- a/pkg/trait/trait_catalog.go
+++ b/pkg/trait/trait_catalog.go
@@ -26,6 +26,7 @@ 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/util/log"
+	corev1 "k8s.io/api/core/v1"
 )
 
 // Catalog collects all information about traits in one place.
@@ -115,9 +116,7 @@ func (c *Catalog) apply(environment *Environment) ([]*TraitCondition, error) {
 			if err != nil {
 				return traitsConditions, fmt.Errorf("%s trait execution failed: %w", trait.ID(), err)
 			}
-
 			environment.ExecutedTraits = append(environment.ExecutedTraits, trait)
-
 			// execute post step processors
 			for _, processor := range environment.PostStepProcessors {
 				err := processor(environment)
@@ -127,12 +126,7 @@ func (c *Catalog) apply(environment *Environment) ([]*TraitCondition, error) {
 			}
 		}
 	}
-
-	traitIds := make([]string, 0)
-	for _, trait := range environment.ExecutedTraits {
-		traitIds = append(traitIds, string(trait.ID()))
-	}
-	c.L.Debugf("Applied traits: %s", strings.Join(traitIds, ","))
+	traitsConditions = append(traitsConditions, c.executedTraitCondition(environment.ExecutedTraits))
 
 	if !applicable && environment.PlatformInPhase(v1.IntegrationPlatformPhaseReady) {
 		return traitsConditions, errors.New("no trait can be executed because of no ready platform found")
@@ -148,6 +142,17 @@ func (c *Catalog) apply(environment *Environment) ([]*TraitCondition, error) {
 	return traitsConditions, nil
 }
 
+func (c *Catalog) executedTraitCondition(executedTrait []Trait) *TraitCondition {
+	traitIds := make([]string, 0)
+	for _, trait := range executedTrait {
+		traitIds = append(traitIds, string(trait.ID()))
+	}
+	message := fmt.Sprintf("Applied traits: %s", strings.Join(traitIds, ","))
+	c.L.Debugf(message)
+
+	return NewIntegrationCondition(v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, message)
+}
+
 // GetTrait returns the trait with the given ID.
 func (c *Catalog) GetTrait(id string) Trait {
 	for _, t := range c.AllTraits() {
diff --git a/pkg/trait/trait_test.go b/pkg/trait/trait_test.go
index 509e70e84..ce750a199 100644
--- a/pkg/trait/trait_test.go
+++ b/pkg/trait/trait_test.go
@@ -549,3 +549,18 @@ func createTestEnv(t *testing.T, cluster v1.IntegrationPlatformCluster, script s
 func NewTraitTestCatalog() *Catalog {
 	return NewCatalog(nil)
 }
+
+func TestExecutedTraitsCondition(t *testing.T) {
+	env := createTestEnv(t, v1.IntegrationPlatformClusterOpenShift, "camel:core")
+	catalog := NewTraitTestCatalog()
+	conditions, err := catalog.apply(env)
+	require.NoError(t, err)
+
+	expectedCondition := NewIntegrationCondition(
+		v1.IntegrationConditionTraitInfo,
+		corev1.ConditionTrue,
+		"TraitConfiguration",
+		"Applied traits: camel,environment,logging,deployer,deployment,gc,container,mount,quarkus,jvm,owner",
+	)
+	assert.Contains(t, conditions, expectedCondition)
+}


(camel-k) 02/02: chore(trait): polish conditions

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 196020d065469b00019cd044cea02514e6665904
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu Mar 21 17:26:59 2024 +0100

    chore(trait): polish conditions
    
    Closes #5027
---
 addons/master/master.go              |  2 +-
 addons/telemetry/telemetry.go        |  1 +
 e2e/common/runtimes/runtimes_test.go |  6 +++---
 e2e/common/traits/builder_test.go    | 18 +++++++++---------
 pkg/controller/build/monitor_pod.go  |  2 +-
 pkg/trait/builder.go                 |  4 ++--
 pkg/trait/container.go               |  1 +
 pkg/trait/container_probes_test.go   |  6 ++++--
 pkg/trait/container_test.go          |  1 +
 pkg/trait/cron.go                    |  6 +++++-
 pkg/trait/cron_test.go               |  6 ++++--
 pkg/trait/deployment.go              |  2 ++
 pkg/trait/gc.go                      |  2 +-
 pkg/trait/gc_test.go                 |  1 +
 pkg/trait/ingress.go                 |  1 +
 pkg/trait/ingress_test.go            |  1 +
 pkg/trait/jvm.go                     |  8 ++++----
 pkg/trait/jvm_test.go                |  3 +++
 pkg/trait/kamelets.go                |  2 +-
 pkg/trait/knative.go                 |  2 +-
 pkg/trait/knative_service.go         |  4 ++++
 pkg/trait/logging.go                 |  2 +-
 pkg/trait/mount.go                   |  3 +++
 pkg/trait/owner.go                   |  2 +-
 pkg/trait/pod.go                     |  2 +-
 pkg/trait/pull_secret.go             |  2 +-
 pkg/trait/quarkus.go                 |  2 +-
 pkg/trait/registry.go                |  1 +
 pkg/trait/route.go                   |  1 +
 pkg/trait/route_test.go              |  3 ++-
 pkg/trait/service.go                 |  4 +++-
 pkg/trait/service_binding.go         |  2 +-
 pkg/trait/service_test.go            | 15 ++++++++++-----
 pkg/trait/trait_catalog.go           |  3 +--
 pkg/trait/trait_condition_types.go   | 26 +++++++++++++++++---------
 pkg/trait/trait_test.go              |  1 +
 36 files changed, 96 insertions(+), 52 deletions(-)

diff --git a/addons/master/master.go b/addons/master/master.go
index b28730784..476f68bf8 100644
--- a/addons/master/master.go
+++ b/addons/master/master.go
@@ -112,7 +112,7 @@ func (t *masterTrait) Configure(e *trait.Environment) (bool, *trait.TraitConditi
 			}
 		}
 		if !pointer.BoolDeref(t.Enabled, false) {
-			return false, trait.NewIntegrationConditionUserDisabled(), nil
+			return false, trait.NewIntegrationConditionUserDisabled("Master"), nil
 		}
 		if t.IncludeDelegateDependencies == nil || *t.IncludeDelegateDependencies {
 			t.delegateDependencies = findAdditionalDependencies(e, meta)
diff --git a/addons/telemetry/telemetry.go b/addons/telemetry/telemetry.go
index a3975bd04..e77f8b97b 100644
--- a/addons/telemetry/telemetry.go
+++ b/addons/telemetry/telemetry.go
@@ -103,6 +103,7 @@ func (t *telemetryTrait) Configure(e *trait.Environment) (bool, *trait.TraitCond
 				if endpoint != "" {
 					t.L.Infof("Using tracing endpoint: %s", endpoint)
 					condition = trait.NewIntegrationCondition(
+						"Telemetry",
 						v1.IntegrationConditionTraitInfo,
 						corev1.ConditionTrue,
 						"TracingEndpoint",
diff --git a/e2e/common/runtimes/runtimes_test.go b/e2e/common/runtimes/runtimes_test.go
index 45829d674..dee3ae100 100644
--- a/e2e/common/runtimes/runtimes_test.go
+++ b/e2e/common/runtimes/runtimes_test.go
@@ -54,7 +54,7 @@ func TestSourceLessIntegrations(t *testing.T) {
 			g.Expect(KamelRunWithID(t, ctx, operatorID, ns, "--image", "docker.io/squakez/my-camel-main:1.0.0", "--resource", "configmap:my-cm-sourceless@/tmp/app/data").Execute()).To(Succeed())
 			g.Eventually(IntegrationPodPhase(t, ctx, ns, itName), TestTimeoutShort).Should(Equal(corev1.PodRunning))
 			g.Eventually(IntegrationConditionStatus(t, ctx, ns, itName, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-			g.Eventually(IntegrationCondition(t, ctx, ns, itName, v1.IntegrationConditionTraitInfo)().Message).Should(Equal("explicitly disabled by the platform: integration kit was not created via Camel K operator"))
+			g.Eventually(IntegrationCondition(t, ctx, ns, itName, v1.IntegrationConditionType("JVMTraitInfo"))().Message).Should(Equal("explicitly disabled by the platform: integration kit was not created via Camel K operator"))
 			g.Eventually(IntegrationLogs(t, ctx, ns, itName), TestTimeoutShort).Should(ContainSubstring(cmData["my-file.txt"]))
 			g.Eventually(IntegrationLogs(t, ctx, ns, itName), TestTimeoutShort).Should(ContainSubstring("Apache Camel (Main)"))
 		})
@@ -64,7 +64,7 @@ func TestSourceLessIntegrations(t *testing.T) {
 			g.Expect(KamelRunWithID(t, ctx, operatorID, ns, "--image", "docker.io/squakez/my-camel-sb:1.0.0", "--resource", "configmap:my-cm-sourceless@/tmp/app/data").Execute()).To(Succeed())
 			g.Eventually(IntegrationPodPhase(t, ctx, ns, itName), TestTimeoutShort).Should(Equal(corev1.PodRunning))
 			g.Eventually(IntegrationConditionStatus(t, ctx, ns, itName, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-			g.Eventually(IntegrationCondition(t, ctx, ns, itName, v1.IntegrationConditionTraitInfo)().Message).Should(Equal("explicitly disabled by the platform: integration kit was not created via Camel K operator"))
+			g.Eventually(IntegrationCondition(t, ctx, ns, itName, v1.IntegrationConditionType("JVMTraitInfo"))().Message).Should(Equal("explicitly disabled by the platform: integration kit was not created via Camel K operator"))
 			g.Eventually(IntegrationLogs(t, ctx, ns, itName), TestTimeoutShort).Should(ContainSubstring(cmData["my-file.txt"]))
 			g.Eventually(IntegrationLogs(t, ctx, ns, itName), TestTimeoutShort).Should(ContainSubstring("Spring Boot"))
 		})
@@ -74,7 +74,7 @@ func TestSourceLessIntegrations(t *testing.T) {
 			g.Expect(KamelRunWithID(t, ctx, operatorID, ns, "--image", "docker.io/squakez/my-camel-quarkus:1.0.0", "--resource", "configmap:my-cm-sourceless@/tmp/app/data").Execute()).To(Succeed())
 			g.Eventually(IntegrationPodPhase(t, ctx, ns, itName), TestTimeoutShort).Should(Equal(corev1.PodRunning))
 			g.Eventually(IntegrationConditionStatus(t, ctx, ns, itName, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
-			g.Eventually(IntegrationCondition(t, ctx, ns, itName, v1.IntegrationConditionTraitInfo)().Message).Should(Equal("explicitly disabled by the platform: integration kit was not created via Camel K operator"))
+			g.Eventually(IntegrationCondition(t, ctx, ns, itName, v1.IntegrationConditionType("JVMTraitInfo"))().Message).Should(Equal("explicitly disabled by the platform: integration kit was not created via Camel K operator"))
 			g.Eventually(IntegrationLogs(t, ctx, ns, itName), TestTimeoutShort).Should(ContainSubstring(cmData["my-file.txt"]))
 			g.Eventually(IntegrationLogs(t, ctx, ns, itName), TestTimeoutShort).Should(ContainSubstring("powered by Quarkus"))
 		})
diff --git a/e2e/common/traits/builder_test.go b/e2e/common/traits/builder_test.go
index e52dc1447..b329f5c2d 100644
--- a/e2e/common/traits/builder_test.go
+++ b/e2e/common/traits/builder_test.go
@@ -185,17 +185,17 @@ func TestBuilderTrait(t *testing.T) {
 			// Check containers conditions
 			g.Eventually(Build(t, ctx, integrationKitNamespace, integrationKitName), TestTimeoutShort).ShouldNot(BeNil())
 			g.Eventually(
-				Build(t, ctx, integrationKitNamespace, integrationKitName)().Status.GetCondition(v1.BuildConditionType("Container custom1 succeeded")).Status,
+				Build(t, ctx, integrationKitNamespace, integrationKitName)().Status.GetCondition(v1.BuildConditionType("Containercustom1Succeeded")).Status,
 				TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
 			g.Eventually(
-				Build(t, ctx, integrationKitNamespace, integrationKitName)().Status.GetCondition(v1.BuildConditionType("Container custom1 succeeded")).Message,
+				Build(t, ctx, integrationKitNamespace, integrationKitName)().Status.GetCondition(v1.BuildConditionType("Containercustom1Succeeded")).Message,
 				TestTimeoutShort).Should(ContainSubstring("generated-bytecode.jar"))
 			g.Eventually(Build(t, ctx, integrationKitNamespace, integrationKitName), TestTimeoutShort).ShouldNot(BeNil())
 			g.Eventually(
-				Build(t, ctx, integrationKitNamespace, integrationKitName)().Status.GetCondition(v1.BuildConditionType("Container custom2 succeeded")).Status,
+				Build(t, ctx, integrationKitNamespace, integrationKitName)().Status.GetCondition(v1.BuildConditionType("Containercustom2Succeeded")).Status,
 				TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
 			g.Eventually(
-				Build(t, ctx, integrationKitNamespace, integrationKitName)().Status.GetCondition(v1.BuildConditionType("Container custom2 succeeded")).Message,
+				Build(t, ctx, integrationKitNamespace, integrationKitName)().Status.GetCondition(v1.BuildConditionType("Containercustom2Succeeded")).Message,
 				TestTimeoutShort).Should(ContainSubstring("</project>"))
 
 			// Check logs
@@ -215,12 +215,12 @@ func TestBuilderTrait(t *testing.T) {
 			// Check containers conditions
 			g.Eventually(Build(t, ctx, integrationKitNamespace, integrationKitName), TestTimeoutLong).ShouldNot(BeNil())
 			g.Eventually(BuildConditions(t, ctx, integrationKitNamespace, integrationKitName), TestTimeoutLong).ShouldNot(BeNil())
-			g.Eventually(BuildCondition(t, ctx, integrationKitNamespace, integrationKitName, v1.BuildConditionType("Container custom1 succeeded")), TestTimeoutMedium).ShouldNot(BeNil())
+			g.Eventually(BuildCondition(t, ctx, integrationKitNamespace, integrationKitName, v1.BuildConditionType("Containercustom1Succeeded")), TestTimeoutMedium).ShouldNot(BeNil())
 			g.Eventually(
-				BuildCondition(t, ctx, integrationKitNamespace, integrationKitName, v1.BuildConditionType("Container custom1 succeeded"))().Status,
+				BuildCondition(t, ctx, integrationKitNamespace, integrationKitName, v1.BuildConditionType("Containercustom1Succeeded"))().Status,
 				TestTimeoutShort).Should(Equal(corev1.ConditionFalse))
 			g.Eventually(
-				BuildCondition(t, ctx, integrationKitNamespace, integrationKitName, v1.BuildConditionType("Container custom1 succeeded"))().Message,
+				BuildCondition(t, ctx, integrationKitNamespace, integrationKitName, v1.BuildConditionType("Containercustom1Succeeded"))().Message,
 				TestTimeoutShort).Should(ContainSubstring("No such file or directory"))
 
 			g.Expect(Kamel(t, ctx, "delete", "--all", "-n", ns).Execute()).To(Succeed())
@@ -252,10 +252,10 @@ func TestBuilderTrait(t *testing.T) {
 			// Check containers conditions
 			g.Eventually(Build(t, ctx, integrationKitNamespace, integrationKitName), TestTimeoutShort).ShouldNot(BeNil())
 			g.Eventually(
-				Build(t, ctx, integrationKitNamespace, integrationKitName)().Status.GetCondition(v1.BuildConditionType("Container custom1 succeeded")).Status,
+				Build(t, ctx, integrationKitNamespace, integrationKitName)().Status.GetCondition(v1.BuildConditionType("Containercustom1Succeeded")).Status,
 				TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
 			g.Eventually(
-				Build(t, ctx, integrationKitNamespace, integrationKitName)().Status.GetCondition(v1.BuildConditionType("Container custom1 succeeded")).Message,
+				Build(t, ctx, integrationKitNamespace, integrationKitName)().Status.GetCondition(v1.BuildConditionType("Containercustom1Succeeded")).Message,
 				TestTimeoutShort).Should(ContainSubstring("</project>"))
 
 			// Check logs
diff --git a/pkg/controller/build/monitor_pod.go b/pkg/controller/build/monitor_pod.go
index 506fe105b..e58a85038 100644
--- a/pkg/controller/build/monitor_pod.go
+++ b/pkg/controller/build/monitor_pod.go
@@ -308,7 +308,7 @@ func (action *monitorPodAction) setConditionsFromTerminationMessages(ctx context
 			var err error
 			terminationMessage := t.Message
 			// Dynamic condition type (it depends on each container name)
-			containerConditionType := v1.BuildConditionType(fmt.Sprintf("Container %s succeeded", container.Name))
+			containerConditionType := v1.BuildConditionType(fmt.Sprintf("Container%sSucceeded", container.Name))
 			containerSucceeded := corev1.ConditionTrue
 			if t.ExitCode != 0 {
 				containerSucceeded = corev1.ConditionFalse
diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go
index d60d4ca8a..48ad9dab0 100644
--- a/pkg/trait/builder.go
+++ b/pkg/trait/builder.go
@@ -165,7 +165,7 @@ func (t *builderTrait) adaptDeprecatedFields() *TraitCondition {
 		m := "The limit-memory parameter is deprecated and may be removed in future releases. Make sure to use tasks-limit-memory parameter instead."
 		t.L.Info(m)
 		if condition == nil {
-			condition = NewIntegrationCondition(v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, "")
+			condition = NewIntegrationCondition("Builder", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, "")
 		}
 		condition = newOrAppend(condition, m)
 		t.TasksLimitMemory = append(t.TasksLimitMemory, fmt.Sprintf("builder:%s", t.LimitMemory))
@@ -176,7 +176,7 @@ func (t *builderTrait) adaptDeprecatedFields() *TraitCondition {
 
 func newOrAppend(condition *TraitCondition, message string) *TraitCondition {
 	if condition == nil {
-		condition = NewIntegrationCondition(v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, message)
+		condition = NewIntegrationCondition("Builder", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, message)
 	} else {
 		condition.message += "; " + message
 	}
diff --git a/pkg/trait/container.go b/pkg/trait/container.go
index e4384f25a..b58842df1 100644
--- a/pkg/trait/container.go
+++ b/pkg/trait/container.go
@@ -88,6 +88,7 @@ func (t *containerTrait) Configure(e *Environment) (bool, *TraitCondition, error
 			t.L.ForIntegration(e.Integration).Infof("Integration %s/%s contains knative endpoint that cannot run, as knative is not installed in the cluster.", e.Integration.Namespace, e.Integration.Name)
 			err := errors.New("integration cannot run, as knative is not installed in the cluster")
 			return false, NewIntegrationCondition(
+				"Container",
 				v1.IntegrationConditionKnativeAvailable,
 				corev1.ConditionFalse,
 				v1.IntegrationConditionKnativeNotInstalledReason,
diff --git a/pkg/trait/container_probes_test.go b/pkg/trait/container_probes_test.go
index d756af65d..87a070f94 100644
--- a/pkg/trait/container_probes_test.go
+++ b/pkg/trait/container_probes_test.go
@@ -185,15 +185,17 @@ func TestProbesOnKnativeService(t *testing.T) {
 	env.Integration.Status.Phase = v1.IntegrationPhaseDeploying
 
 	serviceOverrideCondition := NewIntegrationCondition(
+		"Service",
 		v1.IntegrationConditionTraitInfo,
 		corev1.ConditionTrue,
-		"serviceTraitConfiguration",
+		"TraitConfiguration",
 		"explicitly disabled by the platform: knative-service trait has priority over this trait",
 	)
 	ctrlStrategyCondition := NewIntegrationCondition(
+		"Deployment",
 		v1.IntegrationConditionDeploymentAvailable,
 		corev1.ConditionFalse,
-		"deploymentTraitConfiguration",
+		"DeploymentAvailable",
 		"controller strategy: knative-service",
 	)
 
diff --git a/pkg/trait/container_test.go b/pkg/trait/container_test.go
index 551503e92..6d039cda8 100644
--- a/pkg/trait/container_test.go
+++ b/pkg/trait/container_test.go
@@ -450,6 +450,7 @@ func TestRunKnativeEndpointWithKnativeNotInstalled(t *testing.T) {
 		},
 	}
 	expectedCondition := NewIntegrationCondition(
+		"Container",
 		v1.IntegrationConditionKnativeAvailable,
 		corev1.ConditionFalse,
 		v1.IntegrationConditionKnativeNotInstalledReason,
diff --git a/pkg/trait/cron.go b/pkg/trait/cron.go
index 0a7a69cb0..adf04f0c3 100644
--- a/pkg/trait/cron.go
+++ b/pkg/trait/cron.go
@@ -78,7 +78,7 @@ func (t *cronTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
 		return false, nil, nil
 	}
 	if !pointer.BoolDeref(t.Enabled, true) {
-		return false, NewIntegrationConditionUserDisabled(), nil
+		return false, NewIntegrationConditionUserDisabled("Cron"), nil
 	}
 	if !e.IntegrationInPhase(v1.IntegrationPhaseInitialization) && !e.IntegrationInRunningPhases() {
 		return false, nil, nil
@@ -86,6 +86,7 @@ func (t *cronTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
 
 	if _, ok := e.CamelCatalog.Runtime.Capabilities[v1.CapabilityCron]; !ok {
 		return false, NewIntegrationCondition(
+			"Cron",
 			v1.IntegrationConditionCronJobAvailable,
 			corev1.ConditionFalse,
 			v1.IntegrationConditionCronJobNotAvailableReason,
@@ -97,6 +98,7 @@ func (t *cronTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
 		globalCron, err := t.getGlobalCron(e)
 		if err != nil {
 			return false, NewIntegrationCondition(
+				"Cron",
 				v1.IntegrationConditionCronJobAvailable,
 				corev1.ConditionFalse,
 				v1.IntegrationConditionCronJobNotAvailableReason,
@@ -140,6 +142,7 @@ func (t *cronTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
 		var condition *TraitCondition
 		if e.IntegrationInPhase(v1.IntegrationPhaseDeploying) {
 			condition = NewIntegrationCondition(
+				"Cron",
 				v1.IntegrationConditionCronJobAvailable,
 				corev1.ConditionFalse,
 				v1.IntegrationConditionCronJobNotAvailableReason,
@@ -153,6 +156,7 @@ func (t *cronTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
 	strategy, err := e.DetermineControllerStrategy()
 	if err != nil {
 		return false, NewIntegrationCondition(
+			"Cron",
 			v1.IntegrationConditionCronJobAvailable,
 			corev1.ConditionFalse,
 			v1.IntegrationConditionCronJobNotAvailableReason,
diff --git a/pkg/trait/cron_test.go b/pkg/trait/cron_test.go
index 4e446600b..1f1084469 100644
--- a/pkg/trait/cron_test.go
+++ b/pkg/trait/cron_test.go
@@ -522,9 +522,10 @@ func TestCronWithActiveDeadline(t *testing.T) {
 	tc := NewCatalog(c)
 
 	expectedCondition := NewIntegrationCondition(
+		"Deployment",
 		v1.IntegrationConditionDeploymentAvailable,
 		corev1.ConditionFalse,
-		"deploymentTraitConfiguration",
+		"DeploymentAvailable",
 		"controller strategy: cron-job",
 	)
 	conditions, err := tc.apply(&environment)
@@ -610,9 +611,10 @@ func TestCronWithBackoffLimit(t *testing.T) {
 	tc := NewCatalog(c)
 
 	expectedCondition := NewIntegrationCondition(
+		"Deployment",
 		v1.IntegrationConditionDeploymentAvailable,
 		corev1.ConditionFalse,
-		"deploymentTraitConfiguration",
+		"DeploymentAvailable",
 		"controller strategy: cron-job",
 	)
 	conditions, err := tc.apply(&environment)
diff --git a/pkg/trait/deployment.go b/pkg/trait/deployment.go
index 84ab52eac..600a843f0 100644
--- a/pkg/trait/deployment.go
+++ b/pkg/trait/deployment.go
@@ -57,6 +57,7 @@ func (t *deploymentTrait) Configure(e *Environment) (bool, *TraitCondition, erro
 	strategy, err := e.DetermineControllerStrategy()
 	if err != nil {
 		return false, NewIntegrationCondition(
+			"Deployment",
 			v1.IntegrationConditionDeploymentAvailable,
 			corev1.ConditionFalse,
 			v1.IntegrationConditionDeploymentAvailableReason,
@@ -66,6 +67,7 @@ func (t *deploymentTrait) Configure(e *Environment) (bool, *TraitCondition, erro
 
 	if strategy != ControllerStrategyDeployment {
 		return false, NewIntegrationCondition(
+			"Deployment",
 			v1.IntegrationConditionDeploymentAvailable,
 			corev1.ConditionFalse,
 			v1.IntegrationConditionDeploymentAvailableReason,
diff --git a/pkg/trait/gc.go b/pkg/trait/gc.go
index ef309c9eb..5598c1c70 100644
--- a/pkg/trait/gc.go
+++ b/pkg/trait/gc.go
@@ -66,7 +66,7 @@ func (t *gcTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
 		return false, nil, nil
 	}
 	if !pointer.BoolDeref(t.Enabled, true) {
-		return false, NewIntegrationConditionUserDisabled(), nil
+		return false, NewIntegrationConditionUserDisabled("GC"), nil
 	}
 
 	return e.IntegrationInPhase(v1.IntegrationPhaseInitialization) || e.IntegrationInRunningPhases(), nil, nil
diff --git a/pkg/trait/gc_test.go b/pkg/trait/gc_test.go
index 6908df715..406b00e45 100644
--- a/pkg/trait/gc_test.go
+++ b/pkg/trait/gc_test.go
@@ -44,6 +44,7 @@ func TestConfigureDisabledGCTraitDoesNotSucceed(t *testing.T) {
 	gcTrait.Enabled = pointer.Bool(false)
 
 	expectedCondition := NewIntegrationCondition(
+		"GC",
 		v1.IntegrationConditionTraitInfo,
 		corev1.ConditionTrue,
 		"TraitConfiguration",
diff --git a/pkg/trait/ingress.go b/pkg/trait/ingress.go
index f240f10d9..a9742cfbc 100644
--- a/pkg/trait/ingress.go
+++ b/pkg/trait/ingress.go
@@ -61,6 +61,7 @@ func (t *ingressTrait) Configure(e *Environment) (bool, *TraitCondition, error)
 	}
 	if !pointer.BoolDeref(t.Enabled, true) {
 		return false, NewIntegrationCondition(
+			"Ingress",
 			v1.IntegrationConditionExposureAvailable,
 			corev1.ConditionFalse,
 			v1.IntegrationConditionIngressNotAvailableReason,
diff --git a/pkg/trait/ingress_test.go b/pkg/trait/ingress_test.go
index df71b2d68..29e9ddc94 100644
--- a/pkg/trait/ingress_test.go
+++ b/pkg/trait/ingress_test.go
@@ -50,6 +50,7 @@ func TestConfigureDisabledIngressTraitDoesNotSucceed(t *testing.T) {
 	ingressTrait.Enabled = pointer.Bool(false)
 
 	expectedCondition := NewIntegrationCondition(
+		"Ingress",
 		v1.IntegrationConditionExposureAvailable,
 		corev1.ConditionFalse,
 		v1.IntegrationConditionIngressNotAvailableReason,
diff --git a/pkg/trait/jvm.go b/pkg/trait/jvm.go
index ab11617ff..c9e3b3264 100644
--- a/pkg/trait/jvm.go
+++ b/pkg/trait/jvm.go
@@ -57,7 +57,7 @@ func newJvmTrait() Trait {
 
 func (t *jvmTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
 	if !pointer.BoolDeref(t.Enabled, true) {
-		return false, NewIntegrationConditionUserDisabled(), nil
+		return false, NewIntegrationConditionUserDisabled("JVM"), nil
 	}
 	if !e.IntegrationKitInPhase(v1.IntegrationKitPhaseReady) || !e.IntegrationInRunningPhases() {
 		return false, nil, nil
@@ -66,15 +66,15 @@ func (t *jvmTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
 	// The JVM trait must be disabled in case the current IntegrationKit corresponds to a native build
 	if qt := e.Catalog.GetTrait(quarkusTraitID); qt != nil {
 		if quarkus, ok := qt.(*quarkusTrait); ok && quarkus.isNativeIntegration(e) {
-			return false, newIntegrationConditionPlatformDisabledWithMessage("quarkus native build"), nil
+			return false, newIntegrationConditionPlatformDisabledWithMessage("JVM", "quarkus native build"), nil
 		}
 	}
 
 	if e.IntegrationKit != nil && e.IntegrationKit.IsExternal() {
 		if pointer.BoolDeref(t.Enabled, false) {
-			return true, NewIntegrationConditionUserEnabledWithMessage("integration kit was not created via Camel K operator"), nil
+			return true, NewIntegrationConditionUserEnabledWithMessage("JVM", "integration kit was not created via Camel K operator"), nil
 		} else {
-			return false, newIntegrationConditionPlatformDisabledWithMessage("integration kit was not created via Camel K operator"), nil
+			return false, newIntegrationConditionPlatformDisabledWithMessage("JVM", "integration kit was not created via Camel K operator"), nil
 		}
 	}
 
diff --git a/pkg/trait/jvm_test.go b/pkg/trait/jvm_test.go
index f48d890db..b3f33f65d 100644
--- a/pkg/trait/jvm_test.go
+++ b/pkg/trait/jvm_test.go
@@ -81,6 +81,7 @@ func TestConfigureJvmTraitInWrongJvmDisabled(t *testing.T) {
 	trait.Enabled = pointer.Bool(false)
 
 	expectedCondition := NewIntegrationCondition(
+		"JVM",
 		v1.IntegrationConditionTraitInfo,
 		corev1.ConditionTrue,
 		"TraitConfiguration",
@@ -97,6 +98,7 @@ func TestConfigureJvmTraitInWrongIntegrationKitPhaseExternal(t *testing.T) {
 	trait, environment := createNominalJvmTest(v1.IntegrationKitTypeExternal)
 
 	expectedCondition := NewIntegrationCondition(
+		"JVM",
 		v1.IntegrationConditionTraitInfo,
 		corev1.ConditionTrue,
 		"TraitConfiguration",
@@ -114,6 +116,7 @@ func TestConfigureJvmTraitInRightIntegrationKitPhaseExternalAndJvmEnabled(t *tes
 	trait.Enabled = pointer.Bool(true)
 
 	expectedCondition := NewIntegrationCondition(
+		"JVM",
 		v1.IntegrationConditionTraitInfo,
 		corev1.ConditionTrue,
 		"TraitConfiguration",
diff --git a/pkg/trait/kamelets.go b/pkg/trait/kamelets.go
index 607d41a05..280501848 100644
--- a/pkg/trait/kamelets.go
+++ b/pkg/trait/kamelets.go
@@ -77,7 +77,7 @@ func (t *kameletsTrait) Configure(e *Environment) (bool, *TraitCondition, error)
 		return false, nil, nil
 	}
 	if !pointer.BoolDeref(t.Enabled, true) {
-		return false, NewIntegrationConditionUserDisabled(), nil
+		return false, NewIntegrationConditionUserDisabled("Kamelets"), nil
 	}
 	if !e.IntegrationInPhase(v1.IntegrationPhaseInitialization) && !e.IntegrationInRunningPhases() {
 		return false, nil, nil
diff --git a/pkg/trait/knative.go b/pkg/trait/knative.go
index 5de71160c..312a1af4b 100644
--- a/pkg/trait/knative.go
+++ b/pkg/trait/knative.go
@@ -71,7 +71,7 @@ func (t *knativeTrait) Configure(e *Environment) (bool, *TraitCondition, error)
 		return false, nil, nil
 	}
 	if !pointer.BoolDeref(t.Enabled, true) {
-		return false, NewIntegrationConditionUserDisabled(), nil
+		return false, NewIntegrationConditionUserDisabled("Knative"), nil
 	}
 	if !e.IntegrationInPhase(v1.IntegrationPhaseInitialization) && !e.IntegrationInRunningPhases() {
 		return false, nil, nil
diff --git a/pkg/trait/knative_service.go b/pkg/trait/knative_service.go
index 7d667881a..e8baaf7d6 100644
--- a/pkg/trait/knative_service.go
+++ b/pkg/trait/knative_service.go
@@ -75,6 +75,7 @@ func (t *knativeServiceTrait) Configure(e *Environment) (bool, *TraitCondition,
 	}
 	if !pointer.BoolDeref(t.Enabled, true) {
 		return false, NewIntegrationCondition(
+			"KnativeService",
 			v1.IntegrationConditionKnativeServiceAvailable,
 			corev1.ConditionFalse,
 			v1.IntegrationConditionKnativeServiceNotAvailableReason,
@@ -89,6 +90,7 @@ func (t *knativeServiceTrait) Configure(e *Environment) (bool, *TraitCondition,
 	if e.Resources.GetDeploymentForIntegration(e.Integration) != nil {
 		// A controller is already present for the integration
 		return false, NewIntegrationCondition(
+			"KnativeService",
 			v1.IntegrationConditionKnativeServiceAvailable,
 			corev1.ConditionFalse,
 			v1.IntegrationConditionKnativeServiceNotAvailableReason,
@@ -99,6 +101,7 @@ func (t *knativeServiceTrait) Configure(e *Environment) (bool, *TraitCondition,
 	strategy, err := e.DetermineControllerStrategy()
 	if err != nil {
 		return false, NewIntegrationCondition(
+			"KnativeService",
 			v1.IntegrationConditionKnativeServiceAvailable,
 			corev1.ConditionFalse,
 			v1.IntegrationConditionKnativeServiceNotAvailableReason,
@@ -107,6 +110,7 @@ func (t *knativeServiceTrait) Configure(e *Environment) (bool, *TraitCondition,
 	}
 	if strategy != ControllerStrategyKnativeService {
 		return false, NewIntegrationCondition(
+			"KnativeService",
 			v1.IntegrationConditionKnativeServiceAvailable,
 			corev1.ConditionFalse,
 			v1.IntegrationConditionKnativeServiceNotAvailableReason,
diff --git a/pkg/trait/logging.go b/pkg/trait/logging.go
index dafd331a7..97b028b85 100644
--- a/pkg/trait/logging.go
+++ b/pkg/trait/logging.go
@@ -54,7 +54,7 @@ func (l loggingTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
 	}
 
 	if !pointer.BoolDeref(l.Enabled, true) {
-		return false, NewIntegrationConditionUserDisabled(), nil
+		return false, NewIntegrationConditionUserDisabled("Logging"), nil
 	}
 
 	return e.IntegrationInRunningPhases(), nil, nil
diff --git a/pkg/trait/mount.go b/pkg/trait/mount.go
index e48e15353..76cd01d0e 100644
--- a/pkg/trait/mount.go
+++ b/pkg/trait/mount.go
@@ -190,6 +190,7 @@ func (t *mountTrait) addImplicitKameletsSecrets(e *Environment) *TraitCondition
 		kamelets, ok := trait.(*kameletsTrait)
 		if !ok {
 			return NewIntegrationCondition(
+				"Mount",
 				v1.IntegrationConditionTraitInfo,
 				corev1.ConditionTrue,
 				traitConfigurationReason,
@@ -202,6 +203,7 @@ func (t *mountTrait) addImplicitKameletsSecrets(e *Environment) *TraitCondition
 		implicitKameletSecrets, err := kamelets.listConfigurationSecrets(e)
 		if err != nil {
 			return NewIntegrationCondition(
+				"Mount",
 				v1.IntegrationConditionTraitInfo,
 				corev1.ConditionTrue,
 				traitConfigurationReason,
@@ -216,6 +218,7 @@ func (t *mountTrait) addImplicitKameletsSecrets(e *Environment) *TraitCondition
 
 	if featureUsed {
 		return NewIntegrationCondition(
+			"Mount",
 			v1.IntegrationConditionTraitInfo,
 			corev1.ConditionTrue,
 			traitConfigurationReason,
diff --git a/pkg/trait/owner.go b/pkg/trait/owner.go
index 20bab1952..3b5c8f428 100644
--- a/pkg/trait/owner.go
+++ b/pkg/trait/owner.go
@@ -44,7 +44,7 @@ func (t *ownerTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
 		return false, nil, nil
 	}
 	if !pointer.BoolDeref(t.Enabled, true) {
-		return false, NewIntegrationConditionUserDisabled(), nil
+		return false, NewIntegrationConditionUserDisabled("Owner"), nil
 	}
 
 	return e.IntegrationInPhase(v1.IntegrationPhaseInitialization) || e.IntegrationInRunningPhases(), nil, nil
diff --git a/pkg/trait/pod.go b/pkg/trait/pod.go
index 5233bd513..12fc35df6 100644
--- a/pkg/trait/pod.go
+++ b/pkg/trait/pod.go
@@ -49,7 +49,7 @@ func (t *podTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
 		return false, nil, nil
 	}
 	if !pointer.BoolDeref(t.Enabled, true) {
-		return false, NewIntegrationConditionUserDisabled(), nil
+		return false, NewIntegrationConditionUserDisabled("Pod"), nil
 	}
 	if e.Integration.Spec.PodTemplate == nil {
 		return false, nil, nil
diff --git a/pkg/trait/pull_secret.go b/pkg/trait/pull_secret.go
index 829a7920f..c2fb33a67 100644
--- a/pkg/trait/pull_secret.go
+++ b/pkg/trait/pull_secret.go
@@ -49,7 +49,7 @@ func (t *pullSecretTrait) Configure(e *Environment) (bool, *TraitCondition, erro
 		return false, nil, nil
 	}
 	if !pointer.BoolDeref(t.Enabled, true) {
-		return false, NewIntegrationConditionUserDisabled(), nil
+		return false, NewIntegrationConditionUserDisabled("PullSecret"), nil
 	}
 	if !e.IntegrationInRunningPhases() {
 		return false, nil, nil
diff --git a/pkg/trait/quarkus.go b/pkg/trait/quarkus.go
index 6b75d4b97..1140029be 100644
--- a/pkg/trait/quarkus.go
+++ b/pkg/trait/quarkus.go
@@ -161,7 +161,7 @@ func (t *quarkusTrait) adaptDeprecatedFields() *TraitCondition {
 				t.Modes = append(t.Modes, traitv1.JvmQuarkusMode)
 			}
 		}
-		return NewIntegrationCondition(v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, message)
+		return NewIntegrationCondition("Quarkus", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, message)
 	}
 
 	return nil
diff --git a/pkg/trait/registry.go b/pkg/trait/registry.go
index 906e6f7fa..29c9c3497 100644
--- a/pkg/trait/registry.go
+++ b/pkg/trait/registry.go
@@ -62,6 +62,7 @@ func (t *registryTrait) Configure(e *Environment) (bool, *TraitCondition, error)
 	enabled := e.IntegrationKitInPhase(v1.IntegrationKitPhaseBuildSubmitted)
 	if enabled {
 		condition := NewIntegrationCondition(
+			"Registry",
 			v1.IntegrationConditionTraitInfo,
 			corev1.ConditionTrue,
 			traitConfigurationReason,
diff --git a/pkg/trait/route.go b/pkg/trait/route.go
index 101f5c326..6816352e7 100644
--- a/pkg/trait/route.go
+++ b/pkg/trait/route.go
@@ -60,6 +60,7 @@ func (t *routeTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
 	}
 	if !pointer.BoolDeref(t.Enabled, true) {
 		return false, NewIntegrationCondition(
+			"Route",
 			v1.IntegrationConditionExposureAvailable,
 			corev1.ConditionFalse,
 			v1.IntegrationConditionRouteNotAvailableReason,
diff --git a/pkg/trait/route_test.go b/pkg/trait/route_test.go
index 00c9527db..0c1bd2238 100644
--- a/pkg/trait/route_test.go
+++ b/pkg/trait/route_test.go
@@ -235,9 +235,10 @@ func TestRoute_Disabled(t *testing.T) {
 	}
 
 	expectedCondition := NewIntegrationCondition(
+		"Route",
 		v1.IntegrationConditionExposureAvailable,
 		corev1.ConditionFalse,
-		"routeTraitConfiguration",
+		"RouteNotAvailable",
 		"explicitly disabled",
 	)
 	traitsCatalog := environment.Catalog
diff --git a/pkg/trait/service.go b/pkg/trait/service.go
index 1bcb499e5..b2e081ab2 100644
--- a/pkg/trait/service.go
+++ b/pkg/trait/service.go
@@ -49,6 +49,7 @@ func (t *serviceTrait) Configure(e *Environment) (bool, *TraitCondition, error)
 	}
 	if !pointer.BoolDeref(t.Enabled, true) {
 		return false, NewIntegrationCondition(
+			"Service",
 			v1.IntegrationConditionServiceAvailable,
 			corev1.ConditionFalse,
 			v1.IntegrationConditionServiceNotAvailableReason,
@@ -61,7 +62,7 @@ func (t *serviceTrait) Configure(e *Environment) (bool, *TraitCondition, error)
 	if e.GetTrait(knativeServiceTraitID) != nil {
 		knativeServiceTrait, _ := e.GetTrait(knativeServiceTraitID).(*knativeServiceTrait)
 		if pointer.BoolDeref(knativeServiceTrait.Enabled, true) {
-			return false, newIntegrationConditionPlatformDisabledWithMessage("knative-service trait has priority over this trait"), nil
+			return false, newIntegrationConditionPlatformDisabledWithMessage("Service", "knative-service trait has priority over this trait"), nil
 		}
 	}
 
@@ -74,6 +75,7 @@ func (t *serviceTrait) Configure(e *Environment) (bool, *TraitCondition, error)
 		var condition *TraitCondition
 		if err != nil {
 			condition = NewIntegrationCondition(
+				"Service",
 				v1.IntegrationConditionServiceAvailable,
 				corev1.ConditionFalse,
 				v1.IntegrationConditionServiceNotAvailableReason,
diff --git a/pkg/trait/service_binding.go b/pkg/trait/service_binding.go
index 2bb1758ee..5921499af 100644
--- a/pkg/trait/service_binding.go
+++ b/pkg/trait/service_binding.go
@@ -68,7 +68,7 @@ func (t *serviceBindingTrait) Configure(e *Environment) (bool, *TraitCondition,
 		return false, nil, nil
 	}
 	if !pointer.BoolDeref(t.Enabled, true) {
-		return false, NewIntegrationConditionUserDisabled(), nil
+		return false, NewIntegrationConditionUserDisabled("ServiceBinding"), nil
 	}
 	if len(t.Services) == 0 {
 		return false, nil, nil
diff --git a/pkg/trait/service_test.go b/pkg/trait/service_test.go
index edbd412eb..1769110f9 100644
--- a/pkg/trait/service_test.go
+++ b/pkg/trait/service_test.go
@@ -489,15 +489,17 @@ func TestServiceWithKnativeServiceEnabled(t *testing.T) {
 	environment.Platform.ResyncStatusFullConfig()
 
 	deploymentCondition := NewIntegrationCondition(
+		"Deployment",
 		v1.IntegrationConditionDeploymentAvailable,
 		corev1.ConditionFalse,
-		"deploymentTraitConfiguration",
+		"DeploymentAvailable",
 		"controller strategy: knative-service",
 	)
 	serviceCondition := NewIntegrationCondition(
+		"Service",
 		v1.IntegrationConditionTraitInfo,
 		corev1.ConditionTrue,
-		"serviceTraitConfiguration",
+		"TraitConfiguration",
 		"explicitly disabled by the platform: knative-service trait has priority over this trait",
 	)
 	conditions, err := traitCatalog.apply(&environment)
@@ -566,15 +568,17 @@ func TestServicesWithKnativeProfile(t *testing.T) {
 	environment.Platform.ResyncStatusFullConfig()
 
 	deploymentCondition := NewIntegrationCondition(
+		"Deployment",
 		v1.IntegrationConditionDeploymentAvailable,
 		corev1.ConditionFalse,
-		"deploymentTraitConfiguration",
+		"DeploymentAvailable",
 		"controller strategy: knative-service",
 	)
 	serviceCondition := NewIntegrationCondition(
+		"Service",
 		v1.IntegrationConditionTraitInfo,
 		corev1.ConditionTrue,
-		"serviceTraitConfiguration",
+		"TraitConfiguration",
 		"explicitly disabled by the platform: knative-service trait has priority over this trait",
 	)
 	conditions, err := traitCatalog.apply(&environment)
@@ -651,9 +655,10 @@ func TestServiceWithKnativeServiceDisabledInIntegrationPlatform(t *testing.T) {
 	environment.Platform.ResyncStatusFullConfig()
 
 	expectedCondition := NewIntegrationCondition(
+		"KnativeService",
 		v1.IntegrationConditionKnativeServiceAvailable,
 		corev1.ConditionFalse,
-		"knative-serviceTraitConfiguration",
+		"KnativeServiceNotAvailable",
 		"explicitly disabled",
 	)
 	conditions, err := traitCatalog.apply(&environment)
diff --git a/pkg/trait/trait_catalog.go b/pkg/trait/trait_catalog.go
index 8bbcf4bd3..867c75814 100644
--- a/pkg/trait/trait_catalog.go
+++ b/pkg/trait/trait_catalog.go
@@ -104,7 +104,6 @@ func (c *Catalog) apply(environment *Environment) ([]*TraitCondition, error) {
 		applicable = true
 		enabled, condition, err := trait.Configure(environment)
 		if condition != nil {
-			condition.reason = fmt.Sprintf("%sTraitConfiguration", trait.ID())
 			traitsConditions = append(traitsConditions, condition)
 		}
 		if err != nil {
@@ -150,7 +149,7 @@ func (c *Catalog) executedTraitCondition(executedTrait []Trait) *TraitCondition
 	message := fmt.Sprintf("Applied traits: %s", strings.Join(traitIds, ","))
 	c.L.Debugf(message)
 
-	return NewIntegrationCondition(v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, message)
+	return NewIntegrationCondition("", v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, message)
 }
 
 // GetTrait returns the trait with the given ID.
diff --git a/pkg/trait/trait_condition_types.go b/pkg/trait/trait_condition_types.go
index 05f9ac4a4..2f245ea8e 100644
--- a/pkg/trait/trait_condition_types.go
+++ b/pkg/trait/trait_condition_types.go
@@ -35,6 +35,7 @@ const (
 // TraitCondition is used to get all information/warning about a trait configuration.
 // It should either use an IntegrationConditionType or IntegrationKitConditionType.
 type TraitCondition struct {
+	traitID                     string
 	integrationConditionType    v1.IntegrationConditionType
 	integrationKitConditionType v1.IntegrationKitConditionType
 	conditionStatus             corev1.ConditionStatus
@@ -42,8 +43,9 @@ type TraitCondition struct {
 	reason                      string
 }
 
-func NewIntegrationCondition(ict v1.IntegrationConditionType, cs corev1.ConditionStatus, reason, message string) *TraitCondition {
+func NewIntegrationCondition(traitID string, ict v1.IntegrationConditionType, cs corev1.ConditionStatus, reason, message string) *TraitCondition {
 	return &TraitCondition{
+		traitID:                  traitID,
 		integrationConditionType: ict,
 		conditionStatus:          cs,
 		reason:                   reason,
@@ -51,22 +53,28 @@ func NewIntegrationCondition(ict v1.IntegrationConditionType, cs corev1.Conditio
 	}
 }
 
-func NewIntegrationConditionUserDisabled() *TraitCondition {
-	return NewIntegrationCondition(v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, userDisabledMessage)
+func NewIntegrationConditionUserDisabled(traitID string) *TraitCondition {
+	return NewIntegrationCondition(traitID, v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, userDisabledMessage)
 }
 
-func NewIntegrationConditionUserEnabledWithMessage(message string) *TraitCondition {
-	return NewIntegrationCondition(v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, fmt.Sprintf("%s: %s", userEnabledMessage, message))
+func NewIntegrationConditionUserEnabledWithMessage(traitID string, message string) *TraitCondition {
+	return NewIntegrationCondition(traitID, v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, fmt.Sprintf("%s: %s", userEnabledMessage, message))
 }
 
-func newIntegrationConditionPlatformDisabledWithMessage(message string) *TraitCondition {
-	return NewIntegrationCondition(v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, fmt.Sprintf("%s: %s", platformDisabledMessage, message))
+func newIntegrationConditionPlatformDisabledWithMessage(traitID string, message string) *TraitCondition {
+	return NewIntegrationCondition(traitID, v1.IntegrationConditionTraitInfo, corev1.ConditionTrue, traitConfigurationReason, fmt.Sprintf("%s: %s", platformDisabledMessage, message))
 }
 
 func (tc *TraitCondition) integrationCondition() (v1.IntegrationConditionType, corev1.ConditionStatus, string, string) {
-	return tc.integrationConditionType, tc.conditionStatus, tc.reason, tc.message
+	return v1.IntegrationConditionType(fmt.Sprintf("%s%s", tc.traitID, tc.integrationConditionType)),
+		tc.conditionStatus,
+		tc.reason,
+		tc.message
 }
 
 func (tc *TraitCondition) integrationKitCondition() (v1.IntegrationKitConditionType, corev1.ConditionStatus, string, string) {
-	return tc.integrationKitConditionType, tc.conditionStatus, tc.reason, tc.message
+	return v1.IntegrationKitConditionType(fmt.Sprintf("%s%s", tc.traitID, tc.integrationKitConditionType)),
+		tc.conditionStatus,
+		tc.reason,
+		tc.message
 }
diff --git a/pkg/trait/trait_test.go b/pkg/trait/trait_test.go
index ce750a199..db1dc7cf8 100644
--- a/pkg/trait/trait_test.go
+++ b/pkg/trait/trait_test.go
@@ -557,6 +557,7 @@ func TestExecutedTraitsCondition(t *testing.T) {
 	require.NoError(t, err)
 
 	expectedCondition := NewIntegrationCondition(
+		"",
 		v1.IntegrationConditionTraitInfo,
 		corev1.ConditionTrue,
 		"TraitConfiguration",