From b206c82aba0037b5c1bd97eb665f25702e7c8de3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Thu, 30 Apr 2026 13:33:47 +0200 Subject: [PATCH 1/3] improve: deprecated isWatching method for informers health indicator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This method is not suitable as a health indicator Signed-off-by: Attila Mészáros --- .../operator/health/InformerHealthIndicator.java | 6 ++++++ .../processing/event/source/informer/InformerWrapper.java | 1 + 2 files changed, 7 insertions(+) diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/health/InformerHealthIndicator.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/health/InformerHealthIndicator.java index 6c39a2601b..037deaa214 100644 --- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/health/InformerHealthIndicator.java +++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/health/InformerHealthIndicator.java @@ -19,6 +19,12 @@ public interface InformerHealthIndicator extends EventSourceHealthIndicator { boolean hasSynced(); + /** + * @deprecated this method is not suitable for health check, it is expected + * that the watches sometimes fail. + * @return if the watch is established at the moment. + */ + @Deprecated(forRemoval = true) boolean isWatching(); boolean isRunning(); diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerWrapper.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerWrapper.java index 2f57f879b8..541068aa93 100644 --- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerWrapper.java +++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerWrapper.java @@ -210,6 +210,7 @@ public boolean hasSynced() { } @Override + @Deprecated(forRemoval = true) public boolean isWatching() { return informer.isWatching(); } From 753123037a484057c882a05d5d6c16f4e3ccdd03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Thu, 30 Apr 2026 13:37:39 +0200 Subject: [PATCH 2/3] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .../content/en/docs/documentation/operations/health-probes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/en/docs/documentation/operations/health-probes.md b/docs/content/en/docs/documentation/operations/health-probes.md index 6766c59be0..931e1c3a07 100644 --- a/docs/content/en/docs/documentation/operations/health-probes.md +++ b/docs/content/en/docs/documentation/operations/health-probes.md @@ -17,7 +17,7 @@ API. | `isStarted()` | `true` once the operator and all its controllers have fully started | | `allEventSourcesAreHealthy()` | `true` when every registered event source (informers, polling sources, etc.) reports a healthy status | | `unhealthyEventSources()` | returns a map of controller name → unhealthy event sources, useful for diagnostics | -| `unhealthyInformerWrappingEventSourceHealthIndicator()` | returns a map of controller name → unhealthy informer-wrapping event sources, each exposing per-informer details via `InformerHealthIndicator` (`hasSynced()`, `isWatching()`, `isRunning()`, `getTargetNamespace()`) | +| `unhealthyInformerWrappingEventSourceHealthIndicator()` | returns a map of controller name → unhealthy informer-wrapping event sources, each exposing per-informer details via `InformerHealthIndicator` (`hasSynced()`, `isRunning()`, `getTargetNamespace()`) | In most cases a single readiness probe backed by `allEventSourcesAreHealthy()` is sufficient: before the operator has fully started the informers will not have synced yet, so the check naturally covers the startup @@ -27,7 +27,7 @@ case as well. Once running, it detects runtime degradation such as a lost watch For advanced use cases — such as exposing per-informer health in a diagnostic endpoint or logging which specific namespace lost its watch — `unhealthyInformerWrappingEventSourceHealthIndicator()` gives access to -individual `InformerHealthIndicator` instances. Each indicator exposes `hasSynced()`, `isWatching()`, +individual `InformerHealthIndicator` instances. Each indicator exposes `hasSynced()`, `isRunning()`, and `getTargetNamespace()`. This is typically not needed for a standard health probe but can be valuable for operational dashboards or troubleshooting. From 79e3e3dff052da2b5a08d571783c6f7b5297242e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Thu, 30 Apr 2026 14:40:31 +0200 Subject: [PATCH 3/3] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .../operator/health/InformerHealthIndicator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/health/InformerHealthIndicator.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/health/InformerHealthIndicator.java index 037deaa214..0bb03246e8 100644 --- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/health/InformerHealthIndicator.java +++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/health/InformerHealthIndicator.java @@ -20,8 +20,8 @@ public interface InformerHealthIndicator extends EventSourceHealthIndicator { boolean hasSynced(); /** - * @deprecated this method is not suitable for health check, it is expected - * that the watches sometimes fail. + * @deprecated this method is not suitable for health check, it is expected that the watches + * sometimes fail. * @return if the watch is established at the moment. */ @Deprecated(forRemoval = true)