<p>I've an operator which run a reconcile for some object changes, now I want to add ability to reconcile when specific <code>configmap</code> is changing, (my operator <strong>doesn't</strong> responsible on this CM just needs to listen to it and read on changes...) from the docs I think I need to use the <code>Owns(&amp;corev1.Configmap{})</code> but not sure how to do it and provide specific configmap name to watch,</p>
<p>How should I refer to specific configmap <code>name: foo</code> in <code>namespace=bar</code></p>
<p><a href="https://sdk.operatorframework.io/docs/building-operators/golang/references/event-filtering/#using-predicates" rel="nofollow noreferrer">https://sdk.operatorframework.io/docs/building-operators/golang/references/event-filtering/#using-predicates</a></p>

Jenney
<p>I haven't used this specific operator framework, but the concepts are familiar. Create a predicate function like this and use it when you are creating a controller by passing it into the SDK's <code>WithEventFilter</code> function:</p>
<pre><code>func specificConfigMap(name, namespace string) predicate.Predicate {
    return predicate.Funcs{
        UpdateFunc: func(e event.UpdateEvent) bool {
            configmap := e.NewObject.(*corev1.ConfigMap)
            if configmap.Name == name &amp;&amp; configmap.Namespace == namespace {
                return true
            }
            return false
        },
    }
}
</code></pre>
