From 5fb0a895f777c949d0e1d0335ff8054a2b63c5e2 Mon Sep 17 00:00:00 2001 From: nicolaferraro Date: Mon, 5 Oct 2020 16:49:46 +0200 Subject: [PATCH] chore(e2e): fix missing namespace values in knative references --- pkg/trait/knative.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/trait/knative.go b/pkg/trait/knative.go index ed41b6b62a..32df45f04f 100644 --- a/pkg/trait/knative.go +++ b/pkg/trait/knative.go @@ -343,6 +343,9 @@ func (t *knativeTrait) configureChannels(e *Environment, env *knativeapi.CamelEn } func (t *knativeTrait) createSubscription(e *Environment, ref *corev1.ObjectReference) error { + if ref.Namespace == "" { + ref.Namespace = e.Integration.Namespace + } sub := knativeutil.CreateSubscription(*ref, e.Integration.Name) e.Resources.Add(sub) return nil @@ -530,6 +533,9 @@ func (t *knativeTrait) createTrigger(e *Environment, ref *corev1.ObjectReference trigger.Spec.Filter.Attributes["type"] == eventType }) if !found { + if ref.Namespace == "" { + ref.Namespace = e.Integration.Namespace + } trigger := knativeutil.CreateTrigger(*ref, e.Integration.Name, eventType) e.Resources.Add(trigger) }