From 065567c32d5b0de45831bd8184cb85a196177ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Wenzel?= Date: Mon, 27 Jan 2020 22:53:07 +0100 Subject: [PATCH] bugfix for watch and also refresh not working anymore fixes #32 --- src/main/java/de/koudingspawn/vault/kubernetes/Watcher.java | 2 +- .../vault/kubernetes/scheduler/ScheduledRefresh.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/koudingspawn/vault/kubernetes/Watcher.java b/src/main/java/de/koudingspawn/vault/kubernetes/Watcher.java index 23e5f75..8c78648 100644 --- a/src/main/java/de/koudingspawn/vault/kubernetes/Watcher.java +++ b/src/main/java/de/koudingspawn/vault/kubernetes/Watcher.java @@ -30,7 +30,7 @@ public Watcher(EventHandler eventHandler, MixedOperation { - customResource.watch(new io.fabric8.kubernetes.client.Watcher() { + customResource.inAnyNamespace().watch(new io.fabric8.kubernetes.client.Watcher() { @Override public void eventReceived(Action action, Vault resource) { log.info("Received action: {} for {} in namespace {}", action.name(), resource.getMetadata().getName(), resource.getMetadata().getNamespace()); diff --git a/src/main/java/de/koudingspawn/vault/kubernetes/scheduler/ScheduledRefresh.java b/src/main/java/de/koudingspawn/vault/kubernetes/scheduler/ScheduledRefresh.java index 87463e7..b7a4445 100644 --- a/src/main/java/de/koudingspawn/vault/kubernetes/scheduler/ScheduledRefresh.java +++ b/src/main/java/de/koudingspawn/vault/kubernetes/scheduler/ScheduledRefresh.java @@ -36,7 +36,7 @@ public ScheduledRefresh( public void refreshCertificates() { log.info("Start refresh of secret..."); - VaultList list = customResource.list(); + VaultList list = customResource.inAnyNamespace().list(); for (Vault resource : list.getItems()) { RequiresRefresh requiresRefresh = typeRefreshFactory.get(resource.getSpec().getType().toString()); try {