Registering to events only from selected namespaces #4554
-
Hi Team , Below is my requirement , Currently , in our Java project we listen to configmap ADD/UPDATE/DELETE events and taken some action on them . And we observed that configmap events from all the workspaces are being received. Instead , we wanted to listen to events only from a particular namespace(s). If this possible with the current fabric8 java client. I couldnt find any way of doing this at the moment, so I tried making few changes and started using Roles instead of ClusterRoles. But with this , the informer is never getting synced. My question is , is there a way to listen to events only from a selected namespaces? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Use inNamespace and one of the Informable methods: client.configMaps().inNamespace("namespace").inform() |
Beta Was this translation helpful? Give feedback.
Use inNamespace and one of the Informable methods:
client.configMaps().inNamespace("namespace").inform()