Skip to content

Commit acddd5a

Browse files
committed
do not short-circuit the PostgreSQLInstanceReadinessCheck check once one instance is down
1 parent 638359c commit acddd5a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

operator/src/main/java/it/aboutbits/postgresql/PostgreSQLInstanceReadinessCheck.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ public HealthCheckResponse call() {
3030
var connections = kubernetesClient.resources(ClusterConnection.class).list().getItems();
3131

3232
boolean allUp = connections.stream()
33-
.allMatch(connection -> checkInstance(
33+
.map(connection -> checkInstance(
3434
connection,
3535
builder
36-
));
36+
))
37+
.reduce(true, Boolean::logicalAnd);
3738

3839
return builder.status(allUp).build();
3940
}

0 commit comments

Comments
 (0)