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

Added kubeclient to context for new adapter creation #1406

Merged
merged 1 commit into from
Oct 12, 2023
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
4 changes: 3 additions & 1 deletion pkg/source/mtadapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ func (a *Adapter) Update(ctx context.Context, obj *v1beta1.KafkaSource) error {
URL: sinkURI,
}

adapter := a.adapterCtor(ctx, &config, sink, reporter)
// Need kubeclient in the context to make the adapter
adapterCtx := context.WithValue(ctx, kubeclient.Key{}, a.kubeClient)
adapter := a.adapterCtor(adapterCtx, &config, sink, reporter)

// TODO: define Limit interface.
if sta, ok := adapter.(*stadapter.Adapter); ok {
Expand Down
Loading