You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2021/03/03 12:56:38 UTC

[camel-k] 06/08: Fix #1799: fix catalog location

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

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

commit c11d9d55cad9e3047e7748f57db284ffc0e6bbc7
Author: nicolaferraro <ni...@gmail.com>
AuthorDate: Tue Mar 2 10:47:17 2021 +0100

    Fix #1799: fix catalog location
---
 pkg/trait/trait_types.go | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/pkg/trait/trait_types.go b/pkg/trait/trait_types.go
index a489a9b..29a7914 100644
--- a/pkg/trait/trait_types.go
+++ b/pkg/trait/trait_types.go
@@ -343,15 +343,16 @@ func (e *Environment) GetIntegrationPodSpec() *corev1.PodSpec {
 
 // DetermineCatalogNamespace --
 func (e *Environment) DetermineCatalogNamespace() string {
+	// Catalog is expected to be together with the platform
+	if e.Platform != nil && e.Platform.Namespace != "" {
+		return e.Platform.Namespace
+	}
 	if e.Integration != nil && e.Integration.Status.IntegrationKit != nil && e.Integration.Status.IntegrationKit.Namespace != "" {
 		return e.Integration.Status.IntegrationKit.Namespace
 	}
 	if e.Integration != nil && e.Integration.Spec.IntegrationKit != nil && e.Integration.Spec.IntegrationKit.Namespace != "" {
 		return e.Integration.Spec.IntegrationKit.Namespace
 	}
-	if e.Platform != nil && e.Platform.Namespace != "" {
-		return e.Platform.Namespace
-	}
 	if e.IntegrationKit != nil && e.IntegrationKit.Namespace != "" {
 		return e.IntegrationKit.Namespace
 	}