@@ -144,7 +144,7 @@ func (r *reconciler) ensureControllers(ctx context.Context, namespace, name stri
144144 }
145145
146146 processedSchemas [name ] = true // This is only schemas names (suffix)
147- isClusterScoped = schema .Spec .Scope == apiextensionsv1 . ClusterScoped || schema . Spec . InformerScope == kubebindv1alpha2 .ClusterScope
147+ isClusterScoped = schema .Spec .InformerScope == kubebindv1alpha2 .ClusterScope
148148 }
149149
150150 // Ensure controller for permission claims
@@ -267,16 +267,20 @@ func (r *reconciler) ensureControllerForSchema(ctx context.Context, export *kube
267267 return providerBindClient .KubeBindV1alpha2 ().APIServiceNamespaces (sn .Namespace ).Create (ctx , sn , metav1.CreateOptions {})
268268 })
269269
270- case export .Spec .ClusterScopedIsolation == kubebindv1alpha2 .IsolationNone :
270+ case export .Spec .Isolation == kubebindv1alpha2 .IsolationNone :
271+ logger .V (4 ).Info ("Using None isolation strategy" , "export" , export .Name )
271272 isolationStrategy = isolation .NewNone (r .providerNamespace , providerNamespaceUID )
272273
273- case export .Spec .ClusterScopedIsolation == kubebindv1alpha2 .IsolationPrefixed :
274+ case export .Spec .Isolation == kubebindv1alpha2 .IsolationPrefixed :
275+ logger .V (4 ).Info ("Using Prefixed isolation strategy" , "export" , export .Name )
274276 isolationStrategy = isolation .NewPrefixed (r .providerNamespace , providerNamespaceUID )
275277
276- case export .Spec .ClusterScopedIsolation == kubebindv1alpha2 .IsolationNamespaced :
278+ case export .Spec .Isolation == kubebindv1alpha2 .IsolationNamespaced :
279+ logger .V (4 ).Info ("Using Namespaced isolation strategy" , "export" , export .Name )
277280 isolationStrategy = isolation .NewNamespaced (r .providerNamespace )
278281 default :
279282 // Default to None isolation strategy if no valid isolation strategy is specified
283+ logger .V (4 ).Info ("Using default None isolation strategy" , "export" , export .Name )
280284 isolationStrategy = isolation .NewNone (r .providerNamespace , providerNamespaceUID )
281285 }
282286
@@ -343,7 +347,7 @@ func (r *reconciler) ensureControllersForPermissionClaims(
343347 ctx context.Context ,
344348 export * kubebindv1alpha2.APIServiceExport ,
345349 binding * kubebindv1alpha2.APIServiceBinding ,
346- isClusterScoped bool , // schema.Spec.Scope == apiextensionsv1.ClusterScoped || schema.Spec. InformerScope == kubebindv1alpha2.ClusterScope
350+ isClusterScoped bool , // schema.Spec.InformerScope == kubebindv1alpha2.ClusterScope
347351) error {
348352 logger := klog .FromContext (ctx )
349353
0 commit comments