I'm trying to understand how multicluster-controller works and I would like to to configure a Watch to a specific namespace. I tried to update this part specifiying a namespace:
p := v1.Pod{
TypeMeta: metav1.TypeMeta{
Kind: "Pod",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Namespace: namespace,
},
}
if err := co.WatchResourceReconcileObject(cluster1, &p, controller.WatchOptions{}); err != nil {
return nil, fmt.Errorf("setting up Pod watch in cluster1 cluster: %v", err)
}
But at runtime, the watch show me all pods cluster-wide..
How can I configure it to watch a namespace correctly ?
Hello,
I'm trying to understand how multicluster-controller works and I would like to to configure a Watch to a specific namespace. I tried to update this part specifiying a namespace:
But at runtime, the watch show me all pods cluster-wide..
How can I configure it to watch a namespace correctly ?
thanks
sébastien