Skip to content

Commit

Permalink
Merge pull request #3614 from chaunceyjiang/dependencies
Browse files Browse the repository at this point in the history
feat: Support modification synchronization of custom resources as dependency
  • Loading branch information
karmada-bot committed Jun 26, 2023
2 parents cebb0ca + a10f895 commit 2840f91
Show file tree
Hide file tree
Showing 4 changed files with 492 additions and 240 deletions.
7 changes: 3 additions & 4 deletions cmd/controller-manager/app/controllermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,6 @@ func setupControllers(mgr controllerruntime.Manager, opts *options.Options, stop
}

controlPlaneInformerManager := genericmanager.NewSingleClusterInformerManager(dynamicClientSet, 0, stopChan)

// We need a service lister to build a resource interpreter with `ClusterIPServiceResolver`
// witch allows connection to the customized interpreter webhook without a cluster DNS service.
sharedFactory := informers.NewSharedInformerFactory(kubeClientSet, 0)
Expand Down Expand Up @@ -640,7 +639,6 @@ func setupControllers(mgr controllerruntime.Manager, opts *options.Options, stop
if err := mgr.Add(resourceDetector); err != nil {
klog.Fatalf("Failed to setup resource detector: %v", err)
}

if features.FeatureGate.Enabled(features.PropagateDeps) {
dependenciesDistributor := &dependenciesdistributor.DependenciesDistributor{
Client: mgr.GetClient(),
Expand All @@ -649,12 +647,13 @@ func setupControllers(mgr controllerruntime.Manager, opts *options.Options, stop
ResourceInterpreter: resourceInterpreter,
RESTMapper: mgr.GetRESTMapper(),
EventRecorder: mgr.GetEventRecorderFor("dependencies-distributor"),
RateLimiterOptions: opts.RateLimiterOpts,
GenericEvent: make(chan event.GenericEvent),
}
if err := mgr.Add(dependenciesDistributor); err != nil {
if err := dependenciesDistributor.SetupWithManager(mgr); err != nil {
klog.Fatalf("Failed to setup dependencies distributor: %v", err)
}
}

setupClusterAPIClusterDetector(mgr, opts, stopChan)
controllerContext := controllerscontext.Context{
Mgr: mgr,
Expand Down
Loading

0 comments on commit 2840f91

Please sign in to comment.