Closed antoineco closed 3 years ago
Why is the finalizer on the Trigger object?
I think this Trigger is associated with a broker with broker.class: Kafka
, so it's not a channel-based broker, can you share the broker event-types
yaml?
Why kafka.triggers.eventing.knative.dev and not kafkasinks.eventing.knative.dev to follow the usual Eventing scheme?
Why should a trigger have a finalizer called kafkasinks.eventing.knative.dev
? 🤔
For a KafkaSink
object, the name should be kafkasinks.eventing.knative.dev
.
@pierDipi thanks for the answers! As mentioned, I am not using the Kafka broker class, only the Kafka sink. The broker itself is a Channel-based broker based on an IMC channel.
apiVersion: eventing.knative.dev/v1
kind: Broker
metadata:
annotations:
eventing.knative.dev/broker.class: MTChannelBasedBroker
eventing.knative.dev/creator: myuser
eventing.knative.dev/lastModifier: myuser
kapp.k14s.io/identity: v1;myuser/eventing.knative.dev/Broker/event-types;eventing.knative.dev/v1
kapp.k14s.io/original: '{"apiVersion":"eventing.knative.dev/v1","kind":"Broker","metadata":{"labels":{"kapp.k14s.io/app":"1620120245002031000","kapp.k14s.io/association":"v1.e732cc9e1e1e5795a6a6daa70e87f177"},"name":"event-types","namespace":"myuser"}}'
kapp.k14s.io/original-diff-md5: 0eedb135bc5a4c0e007516355c4db463
creationTimestamp: "2021-05-04T09:24:14Z"
generation: 1
labels:
kapp.k14s.io/app: "1620120245002031000"
kapp.k14s.io/association: v1.e732cc9e1e1e5795a6a6daa70e87f177
name: event-types
namespace: myuser
resourceVersion: "210533885"
selfLink: /apis/eventing.knative.dev/v1/namespaces/myuser/brokers/event-types
uid: 4db19133-76d3-4827-9072-89881385776c
spec:
config:
apiVersion: v1
kind: ConfigMap
name: config-br-default-channel
namespace: knative-eventing
status:
address:
url: http://broker-ingress.knative-eventing.svc.cluster.local/myuser/event-types
annotations:
knative.dev/channelAPIVersion: messaging.knative.dev/v1
knative.dev/channelAddress: http://event-types-kne-trigger-kn-channel.myuser.svc.cluster.local
knative.dev/channelKind: InMemoryChannel
knative.dev/channelName: event-types-kne-trigger
conditions:
- lastTransitionTime: "2021-05-04T09:24:14Z"
status: "True"
type: Addressable
- lastTransitionTime: "2021-05-04T09:24:14Z"
status: "True"
type: FilterReady
- lastTransitionTime: "2021-05-04T09:24:14Z"
status: "True"
type: IngressReady
- lastTransitionTime: "2021-05-04T09:24:14Z"
status: "True"
type: Ready
- lastTransitionTime: "2021-05-04T09:24:14Z"
status: "True"
type: TriggerChannelReady
observedGeneration: 1
apiVersion: v1
data:
channelTemplateSpec: |
apiVersion: messaging.knative.dev/v1
kind: InMemoryChannel
kind: ConfigMap
metadata:
labels:
eventing.knative.dev/release: v0.22.0
name: config-br-default-channel
namespace: knative-eventing
ownerReferences:
- apiVersion: operator.knative.dev/v1alpha1
blockOwnerDeletion: true
controller: true
kind: KnativeEventing
name: knative-eventing
uid: 3db27998-a16d-4cd1-bc34-d82aec46cc23
resourceVersion: "137838252"
selfLink: /api/v1/namespaces/knative-eventing/configmaps/config-br-default-channel
uid: a36bd943-fb5f-4266-b68f-52240067c13b
We see a trigger without a broker (at least in the cache), we (wrongly) queue it since it passes the filter function, and then the generated reconciler adds the finalizer. Eventually, we don't do anything with it
So, this should become false https://github.com/knative-sandbox/eventing-kafka-broker/blob/bec304b7e5dc53658334b70a60b82b8935877300/control-plane/pkg/reconciler/trigger/controller.go#L128
/assign
Describe the bug
(using the Channel-based broker with an IMC channel)
The deletion of a Trigger pointing to a KafkaSink is always blocked by the
kafka.triggers.eventing.knative.dev
finalizer.I also have a few questions:
kafka.triggers.eventing.knative.dev
and notkafkasinks.eventing.knative.dev
to follow the usual Eventing scheme?Expected behavior
No finalizer (?) If the finalizer is really mandatory, at least the controller should behave properly and not block the deletion of objects. For example, it should give up and throw a "warning" Kubernetes event if an error is unrecoverable.
To Reproduce
See previous manifest.
Knative release version
v0.22.0
Additional context