Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- kubernetesClient = new DefaultKubernetesClient()
- updateFlag = new AtomicBoolean(true)
- void watch() {
- println("Start watching")
- kubernetesClient.events().inNamespace(namespaceName).watch(new Watcher < Event > () {
- @Override void eventReceived(Action action, Event resource) {
- // println("Event " + action.name() + " " + resource.toString())
- updateFlag.set(true)
- }
- @Override void onClose(KubernetesClientException cause) {
- println("Watcher close due to " + cause) watch()
- }
- })
- }
Add Comment
Please, Sign In to add comment