Skip to content

Commit 3255383

Browse files
committed
always use factory client for dependent reconcilers
1 parent c805f17 commit 3255383

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pkg/component/reconciler.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,13 +509,7 @@ func (r *Reconciler[T]) getClientForComponent(component T) (cluster.Client, erro
509509
placementConfiguration, havePlacementConfiguration := assertPlacementConfiguration(component)
510510
clientConfiguration, haveClientConfiguration := assertClientConfiguration(component)
511511
impersonationConfiguration, haveImpersonationConfiguration := assertImpersonationConfiguration(component)
512-
haveCustomScheme := func() bool { _, ok := r.resourceGenerator.(types.SchemeBuilder); return ok }() || r.options.SchemeBuilder != nil
513-
// TODO: we should always return a factory client, even in the default case;
514-
// however this would be an incompatible change; people who previously supplied a custom scheme via the manager's client
515-
// would now have to do the same by adding AddToScheme() to the used generator.
516-
if !haveClientConfiguration && !haveImpersonationConfiguration && !haveCustomScheme {
517-
return r.client, nil
518-
}
512+
519513
var kubeconfig []byte
520514
var impersonationUser string
521515
var impersonationGroups []string

0 commit comments

Comments
 (0)