code: public void start() {
          doClose();
  
          Watcher<PipelineActivity> listener = new Watcher<PipelineActivity>() {
              @Override
              public void eventReceived(Action action, PipelineActivity pipelineActivity) {
                  onEventReceived(action, pipelineActivity);
              }
  
              @Override
              public void onClose(KubernetesClientException e) {
                  // TODO should we start watching again?
                  LOG.warn("Pipeline watcher is closed: " + e, e);
  
                  for (Watcher<PipelineActivity> listener : listeners) {
                      listener.onClose(e);
                  }
              }
          };
          this.watcher = this.pipelines.watch(listener);
          PipelineActivityList list = this.pipelines.list();
          if (list != null) {
              List<PipelineActivity> items = list.getItems();
              if (items != null) {
                  for (PipelineActivity item : items) {
                      onEventReceived(Watcher.Action.ADDED, item);
                  }
              }
          }
      }
docs: Starts listing and watching the pipelines in the namespace and firing events.