knative / eventing

Event-driven application platform for Kubernetes
https://knative.dev/docs/eventing
Apache License 2.0
1.42k stars 595 forks source link

Broker (Channel based) delivery options updates are not propagated to Channels. #5832

Closed odacremolbap closed 3 years ago

odacremolbap commented 3 years ago

Describe the bug

Channel based Broker is not propagating updates to the the underlying physical channel.

Expected behavior

If an existing (channel based) broker is updated with a different delivery section than before, the underlying channel should consequently update the delivery section.

To Reproduce

(Using InMemoryChannel) Create a Broker with delivery options

apiVersion: v1
kind: Namespace
metadata:
  name: delivery-update
---
apiVersion: eventing.knative.dev/v1
kind: Broker
metadata:
  name: test
  namespace: delivery-update
  annotations:
    eventing.knative.dev/broker.class: MTChannelBasedBroker
spec:
  delivery:
    deadLetterSink:
      uri: https://dls.foo

Make sure that the channel got the delivery options propagated.

$ kubectl get  imc -n delivery-update test-kne-trigger -ojsonpath='{.spec.delivery}'

{"deadLetterSink":{"uri":"https://dls.foo"}}

Update the Broker pointing to a different DLS.

kubectl patch broker -n delivery-update test --type=merge -p '{"spec":{"delivery":{"deadLetterSink":{"uri":"https://dls.bar"}}}}'

Check if the channel got the new delivery options propagated. The channel delivery options have not been updated.

$ kubectl get  imc -n delivery-update test-kne-trigger -ojsonpath='{.spec.delivery}'

{"deadLetterSink":{"uri":"https://dls.foo"}}

(delete namespace)

Knative release version

v0.26

References

odacremolbap commented 3 years ago

/assign