<p>I am on fabric8 kubernetes client v6.8.0 and initializing a sharedIndexInformer for a CRD like this:</p>
<pre><code>SharedIndexInformer&lt;MyResource&gt; informer =
                sharedInformerFactory.sharedIndexInformerFor(MyResource.class, 30 * 1000L);
informer.addEventHandler(myEventHandler);
</code></pre>
<p>I only want to receive events from resources with certain labels.</p>
<p>This seemed straightforward in earlier version of the client, with label selection being one of the arguments in <code>sharedIndexInformerFor</code>.</p>
<pre><code>SharedIndexInformer&lt;MyResource&gt; informer =
                    sharedInformerFactory.sharedIndexInformerFor(
MyResource.class, 
myLabelSelector,
30 * 1000L);
</code></pre>
<p>How to achieve this in v6.8.0+?</p>

xerocool
<p>For more fine grained control over informers filtering, you can use the <code>inform()</code> method available on Resource DSL:</p>
<pre class="lang-java prettyprint-override"><code>SharedIndexInformer&lt;MyResource&gt; informer = client.resources(MyResource.class)
  .inNamespace(&quot;default&quot;)
  .withLabel(&quot;app&quot;, &quot;test-operator&quot;)
  .inform(myEventHandler, 30 * 1000L);
</code></pre>
