From c11d9d55cad9e3047e7748f57db284ffc0e6bbc7 Mon Sep 17 00:00:00 2001 From: nicolaferraro Date: Tue, 2 Mar 2021 10:47:17 +0100 Subject: [PATCH] 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 a489a9b015..29a791434e 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 }