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

Commit

Permalink
Added kubeclient to context for new adapter creation (#1406)
Browse files Browse the repository at this point in the history
Signed-off-by: Calum Murray <[email protected]>
  • Loading branch information
Cali0707 authored Oct 12, 2023
1 parent 2265ebe commit 7bd87d1
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 7bd87d1

Please sign in to comment.