Skip to content
This repository has been archived by the owner on Jun 19, 2022. It is now read-only.

Commit

Permalink
feat/trigger: enable trigger to send to different namespace (#2016)
Browse files Browse the repository at this point in the history
After this change, when the namepsace is specified in the subscriber
the URI can be resolved correctly to the specified namespace instead
of forcing it to the be same as the trigger namespace.
  • Loading branch information
Zhongduo Lin (Jimmy) authored Dec 22, 2020
1 parent 026dc07 commit c0e6cfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/reconciler/trigger/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (r *Reconciler) FinalizeKind(ctx context.Context, t *brokerv1beta1.Trigger)
}

func (r *Reconciler) resolveSubscriber(ctx context.Context, t *brokerv1beta1.Trigger, b *brokerv1beta1.Broker) error {
if t.Spec.Subscriber.Ref != nil {
if t.Spec.Subscriber.Ref != nil && t.Spec.Subscriber.Ref.Namespace == "" {
// To call URIFromDestination(dest apisv1alpha1.Destination, parent interface{}), dest.Ref must have a Namespace
// We will use the Namespace of Trigger as the Namespace of dest.Ref
t.Spec.Subscriber.Ref.Namespace = t.GetNamespace()
Expand Down

0 comments on commit c0e6cfb

Please sign in to comment.