Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ public boolean hasSynced() {
}

@Override
@Deprecated(forRemoval = true)
public boolean isWatching() {
return informer.isWatching();
}
Expand Down
Loading