File tree Expand file tree Collapse file tree 4 files changed +18
-9
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler Expand file tree Collapse file tree 4 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 6
6
import io .fabric8 .kubernetes .api .model .HasMetadata ;
7
7
import io .fabric8 .kubernetes .client .KubernetesClient ;
8
8
import io .javaoperatorsdk .operator .api .reconciler .dependent .managed .ManagedWorkflowAndDependentResourceContext ;
9
+ import io .javaoperatorsdk .operator .api .reconciler .expectation .ExpectationResult ;
9
10
import io .javaoperatorsdk .operator .processing .event .source .IndexerResourceCache ;
10
11
11
12
public interface Context <P extends HasMetadata > extends CacheAware <P > {
@@ -52,4 +53,6 @@ public interface Context<P extends HasMetadata> extends CacheAware<P> {
52
53
* @return {@code true} is another reconciliation is already scheduled, {@code false} otherwise
53
54
*/
54
55
boolean isNextReconciliationImminent ();
56
+
57
+ Optional <ExpectationResult > expectationResult ();
55
58
}
Original file line number Diff line number Diff line change 11
11
import io .javaoperatorsdk .operator .api .config .ControllerConfiguration ;
12
12
import io .javaoperatorsdk .operator .api .reconciler .dependent .managed .DefaultManagedWorkflowAndDependentResourceContext ;
13
13
import io .javaoperatorsdk .operator .api .reconciler .dependent .managed .ManagedWorkflowAndDependentResourceContext ;
14
+ import io .javaoperatorsdk .operator .api .reconciler .expectation .ExpectationResult ;
14
15
import io .javaoperatorsdk .operator .processing .Controller ;
15
16
import io .javaoperatorsdk .operator .processing .event .EventSourceRetriever ;
16
17
import io .javaoperatorsdk .operator .processing .event .NoEventSourceForClassException ;
@@ -119,6 +120,11 @@ public boolean isNextReconciliationImminent() {
119
120
.isNextReconciliationImminent (ResourceID .fromResource (primaryResource ));
120
121
}
121
122
123
+ @ Override
124
+ public Optional <ExpectationResult > expectationResult () {
125
+ return Optional .empty ();
126
+ }
127
+
122
128
public DefaultContext <P > setRetryInfo (RetryInfo retryInfo ) {
123
129
this .retryInfo = retryInfo ;
124
130
return this ;
Original file line number Diff line number Diff line change 2
2
3
3
public class ExpectationResult {
4
4
5
- private ExpectationStatus status ;
5
+ private ExpectationStatus status ;
6
6
7
- public ExpectationResult (ExpectationStatus status ) {
8
- this .status = status ;
9
- }
7
+ public ExpectationResult (ExpectationStatus status ) {
8
+ this .status = status ;
9
+ }
10
10
11
- public ExpectationStatus getStatus () {
12
- return status ;
13
- }
11
+ public ExpectationStatus getStatus () {
12
+ return status ;
13
+ }
14
14
}
Original file line number Diff line number Diff line change 1
1
package io .javaoperatorsdk .operator .api .reconciler .expectation ;
2
2
3
3
public enum ExpectationStatus {
4
- TIMEOUT ,
5
- FULFILLED ;
4
+ TIMEOUT ,
5
+ FULFILLED ;
6
6
}
You can’t perform that action at this time.
0 commit comments