Skip to content
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
11 changes: 8 additions & 3 deletions cmd/olm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,14 @@ func main() {
// create a config that validates we're creating objects with labels
validatingConfig := validatingroundtripper.Wrap(config, mgr.GetScheme())

versionedConfigClient, err := configclientset.NewForConfig(config)
// Create separate config client for operator's proxy syncer to avoid
// SharedInformerFactory conflicts with the APIServer TLS syncer factory.
// The APIServer TLS syncer (in SetupAPIServerTLSConfig) creates its own
// factory, and the operator's proxy syncer creates another factory. Using
// separate client instances prevents watch conflicts between the two factories.
operatorConfigClient, err := configclientset.NewForConfig(config)
if err != nil {
logger.WithError(err).Fatal("error configuring openshift proxy client")
logger.WithError(err).Fatal("error configuring openshift config client for operator")
}
configClient, err := configv1client.NewForConfig(config)
if err != nil {
Expand Down Expand Up @@ -189,7 +194,7 @@ func main() {
olm.WithMetadataClient(metadataClient),
olm.WithOperatorClient(opClient),
olm.WithRestConfig(validatingConfig),
olm.WithConfigClient(versionedConfigClient),
olm.WithConfigClient(operatorConfigClient),
olm.WithProtectedCopiedCSVNamespaces(*protectedCopiedCSVNamespaces),
olm.WithOpenshiftConfigAPIExists(openshiftConfigAPIExists),
)
Expand Down