Describe the bug
Today the IMC Dispatcher uses finalizers:
|
func (r *Reconciler) FinalizeKind(ctx context.Context, imc *v1.InMemoryChannel) reconciler.Event { |
|
if imc.Status.Address != nil && |
|
imc.Status.Address.URL != nil { |
|
if hostName := imc.Status.Address.URL.Host; hostName != "" { |
|
logging.FromContext(ctx).Info("Removing dispatcher") |
|
r.multiChannelMessageHandler.DeleteChannelHandler(hostName) |
|
} |
|
} |
|
return nil |
|
} |
Expected behavior
When everything is in-memory, it makes more sense to actually do this kind of work directly in the informer callback rather than effectively blocking resource deletion on finalizer handling.
Knative release version
HEAD
Additional context
Due to the awkward handling of Finalizers on CRDs in Kubernetes, we should (IMO) limit our use of them to where it's absolutely needed, otherwise uninstall gets needlessly complex.
cc @vaikas
Describe the bug
Today the IMC Dispatcher uses finalizers:
eventing/pkg/reconciler/inmemorychannel/dispatcher/inmemorychannel.go
Lines 96 to 105 in 66db463
Expected behavior
When everything is in-memory, it makes more sense to actually do this kind of work directly in the informer callback rather than effectively blocking resource deletion on finalizer handling.
Knative release version
HEAD
Additional context
Due to the awkward handling of Finalizers on CRDs in Kubernetes, we should (IMO) limit our use of them to where it's absolutely needed, otherwise uninstall gets needlessly complex.
cc @vaikas