@@ -251,7 +251,7 @@ func (r *reconciler) reconcile(ctx context.Context, clusterName string, cl clien
251251 }
252252
253253 // Handle resources and get kubeconfig
254- kfg , err := r .kubeManager .HandleResources (ctx , req .Spec .Author , req .Spec .ClusterIdentity .Identity , clusterName )
254+ result , err := r .kubeManager .HandleResources (ctx , req .Spec .Author , req .Spec .ClusterIdentity .Identity , clusterName )
255255 if err != nil {
256256 meta .SetStatusCondition (& req .Status .Conditions , metav1.Condition {
257257 Type : string (kubebindv1alpha2 .BindableResourcesRequestConditionReady ),
@@ -263,8 +263,11 @@ func (r *reconciler) reconcile(ctx context.Context, clusterName string, cl clien
263263 return ctrl.Result {}, fmt .Errorf ("failed to handle resources for cluster identity %q: %w" , req .Spec .ClusterIdentity .Identity , err )
264264 }
265265
266+ // Set the namespace in the status
267+ req .Status .Namespace = result .Namespace
268+
266269 // Create or update the BindingResourceResponse secret
267- if err := r .ensureBindingResponseSecret (ctx , cl , req , kfg , secretName , secretKey ); err != nil {
270+ if err := r .ensureBindingResponseSecret (ctx , cl , req , result . Kubeconfig , secretName , secretKey ); err != nil {
268271 meta .SetStatusCondition (& req .Status .Conditions , metav1.Condition {
269272 Type : string (kubebindv1alpha2 .BindableResourcesRequestConditionReady ),
270273 Status : metav1 .ConditionFalse ,
0 commit comments