Skip to content

Commit

Permalink
chore(e2e): fix missing namespace values in knative references
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro committed Oct 5, 2020
1 parent 23e1b2b commit 5fb0a89
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/trait/knative.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 5fb0a89

Please sign in to comment.