Skip to content

Commit 70b8dbd

Browse files
committed
improve: deprecated isWatching method for informers health indicator
This method is not suitable as a health indicator Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
1 parent 1633475 commit 70b8dbd

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/health/InformerHealthIndicator.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ public interface InformerHealthIndicator extends EventSourceHealthIndicator {
1919

2020
boolean hasSynced();
2121

22+
/**
23+
* @deprecated this method is not suitable for health check, it is expected
24+
* that the watches sometimes fail.
25+
* @return if the watch is established at the moment.
26+
*/
27+
@Deprecated(forRemoval = true)
2228
boolean isWatching();
2329

2430
boolean isRunning();

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerWrapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ public boolean hasSynced() {
210210
}
211211

212212
@Override
213+
@Deprecated(forRemoval = true)
213214
public boolean isWatching() {
214215
return informer.isWatching();
215216
}

0 commit comments

Comments
 (0)