<p>I developed a k8s Operator, after I deploy the first Operator in first namespace, it works well. Then I deploy the 2nd Operator in second namespace, I saw the 2nd controller to get the request that's namespace still is the first name, but the expected namespace should be second.</p>
<p>Please see the following code, when I play with second operator in the second namespace, request's namespace still is the first namespace.</p>
<pre><code>func (r *AnexampleReconciler) Reconcile(request ctrl.Request) (ctrl.Result, error) {

    log := r.Log.WithValues(&quot;Anexample&quot;, request.NamespacedName)

    instance := &amp;v1alpha1.Anexample{}
    err := r.Get(context.TODO(), request.NamespacedName, instance)
    if err != nil {
        if errors.IsNotFound(err) {
            log.Info(&quot;Anexample resource not found. Ignoring since object must be deleted.&quot;)
            return reconcile.Result{}, nil
        }

        log.Error(err, &quot;Failed to get Anexample.&quot;)
        return reconcile.Result{}, err
    }
</code></pre>
<p>I suspect it might be related to election, but I don't understand them.</p>
<pre><code>    mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
        Scheme:             scheme,
        MetricsBindAddress: metricsAddr,
        Port:               9443,
        LeaderElection:     enableLeaderElection,
        LeaderElectionID:   &quot;2eeda3e4.com.aaa.bbb.ccc&quot;,
    })
    if err != nil {
        setupLog.Error(err, &quot;unable to start manager&quot;)
        os.Exit(1)
    }
</code></pre>
<p>what happen in Controller? How to fix it?</p>

<p>We are seeing a similar issue. The issue is about getting the wrong namespace. Might be a bug in controller-runtime.</p>
<p>request.NamespacedName from controller-runtime is returning the wrong namespace.</p>
