private void watchConfigMapList() { if (configWatch) { KubernetesClient client = kubernetesClient.get(); if (client != null) { FilterWatchListDeletable<ConfigMap, ConfigMapList, Boolean, Watch, Watcher<ConfigMap>> configMapsSelector = client.configMaps().withLabel(pidLabel); for( String key : filters.keySet() ){ configMapsSelector.withLabelIn(key, filters.get(key).toArray(new String[filters.get(key).size()])); } watch = configMapsSelector.watch(this); } else { throw new RuntimeException("KubernetesClient not set"); } } }
public Watch watchPods(String uuid, Watcher<Pod> podWatcher) { return client.pods().withLabel("enmasse.io/infra", uuid).watch(podWatcher); }
try (Watch watch = client.pods().inNamespace(namespace).withLabel("job-name").watch(new Watcher<Pod>() { @Override public void eventReceived(Action action, Pod aPod) {
public void watch() { watch = kubeClient().extensions().deployments().withLabel("kafka-operator", "inject-credentials").watch(new DeploymentWatcher()); log.info("Watching Deployments for credential requests."); }
protected Watch watchInAnyNamespace(Labels selector, Watcher<T> watcher) { return operation().inAnyNamespace().withLabels(selector.toMap()).watch(watcher); }
nextForwardedPod[0] = newPod; final Watch watch = KubernetesClientUtil.withSelector(kubernetes.pods(), podSelector, log).watch(new Watcher<Pod>() {
protected Watch watchInNamespace(String namespace, Labels selector, Watcher<T> watcher) { return operation().inNamespace(namespace).withLabels(selector.toMap()).watch(watcher); }
@Override public void watch() { log.debug("Watcihing {} for {} changes", resourceKind(), kubeClient().getNamespace()); getClient().withLabels(labels()).watch(this); }
@Override public void watch() { log.debug("Watcihing {} for ConfigMap changes", kubeClient().getNamespace()); watch = kubeClient().configMaps().withLabels(labels()).watch(this); }
podWatcher = pods.watch(new Watcher<Pod>() { @Override public void eventReceived(Watcher.Action action, Pod pod) {
podWatcher = pods.watch(new Watcher<Pod>() { @Override public void eventReceived(Action action, Pod pod) {