Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

reduce apiserver requests for dispatcher #456

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pkg/channel/distributed/dispatcher/controller/kafkachannel.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ func (r Reconciler) Reconcile(ctx context.Context, key string) error {

r.logger.Info("Reconcile", zap.String("key", key))

// Only Reconcile KafkaChannel Associated With This Dispatcher
if r.channelKey != key {
return nil
}

// Convert the namespace/name string into a distinct namespace and name.
namespace, name, err := cache.SplitMetaNamespaceKey(key)
if err != nil {
Expand All @@ -132,11 +137,6 @@ func (r Reconciler) Reconcile(ctx context.Context, key string) error {
return err
}

// Only Reconcile KafkaChannel Associated With This Dispatcher
if r.channelKey != key {
return nil
}

if !original.Status.IsReady() {
return fmt.Errorf("channel is not ready - cannot configure and update subscriber status")
}
Expand Down