Skip to content

Commit

Permalink
Propose knative#4515
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
  • Loading branch information
slinkydeveloper committed Dec 15, 2020
1 parent ece1741 commit 633e66b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
8 changes: 8 additions & 0 deletions docs/spec/broker.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ The attributes filter specifying a list of key-value pairs MUST be supported by
Trigger. Events that pass the attributes filter MUST include context or
extension attributes that match all key-value pairs exactly.

### Delivery Spec

Both BrokerSpec and TriggerSpec has a `Delivery` field of type `duck.DeliverySpec` (per `v1`).
This field allows the user to define the dead letter sink and retries.
The `BrokerSpec.Delivery` field is global across all the Triggers registered to that particular
Broker, while the `TriggerSpec.Delivery`, if configured, fully overrides `BrokerSpec.Delivery` for
that particular Trigger.

## Data Plane

### Ingress
Expand Down
5 changes: 3 additions & 2 deletions pkg/apis/eventing/v1/broker_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ type BrokerSpec struct {
// +optional
Config *duckv1.KReference `json:"config,omitempty"`

// Delivery is the delivery specification for Events within the Broker mesh.
// This includes things like retries, DLQ, etc.
// Delivery contains the default delivery spec for each trigger
// to this Broker. Each trigger delivery spec, if any, overrides this
// global delivery spec.
// +optional
Delivery *eventingduckv1.DeliverySpec `json:"delivery,omitempty"`
}
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/eventing/v1/trigger_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"knative.dev/pkg/apis"
duckv1 "knative.dev/pkg/apis/duck/v1"
"knative.dev/pkg/kmeta"

eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1"
)

const (
Expand Down Expand Up @@ -84,6 +86,10 @@ type TriggerSpec struct {
// Subscriber is the addressable that receives events from the Broker that pass the Filter. It
// is required.
Subscriber duckv1.Destination `json:"subscriber"`

// Delivery configuration
// +optional
Delivery *eventingduckv1.DeliverySpec `json:"delivery,omitempty"`
}

type TriggerFilter struct {
Expand Down

0 comments on commit 633e66b

Please sign in to comment.