Skip to content
Closed
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
5 changes: 2 additions & 3 deletions apiexport/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/cluster"
"sigs.k8s.io/controller-runtime/pkg/log"

mcmanager "sigs.k8s.io/multicluster-runtime/pkg/manager"
"sigs.k8s.io/multicluster-runtime/pkg/multicluster"

kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache"
Expand Down Expand Up @@ -117,7 +116,7 @@ func New(cfg *rest.Config, options Options) (*Provider, error) {
}

// Run starts the provider and blocks.
func (p *Provider) Run(ctx context.Context, mgr mcmanager.Manager) error {
func (p *Provider) Run(ctx context.Context, aware multicluster.Aware) error {
g, ctx := errgroup.WithContext(ctx)

// Watch logical clusters and engage them as clusters in multicluster-runtime.
Expand Down Expand Up @@ -167,7 +166,7 @@ func (p *Provider) Run(ctx context.Context, mgr mcmanager.Manager) error {
p.lock.Unlock()

p.log.Info("engaging cluster", "cluster", clusterName)
if err := mgr.Engage(clusterCtx, clusterName.String(), cl); err != nil {
if err := aware.Engage(clusterCtx, clusterName.String(), cl); err != nil {
p.log.Error(err, "failed to engage cluster", "cluster", clusterName)
p.lock.Lock()
cancel()
Expand Down